summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/drivers
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-10-03 09:27:22 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-10-03 09:27:22 +0000
commite52d60b7f8ce03e5c1f8c801fd5caa234b3aa3cf (patch)
treebe8ce4af035c60e33f580cf3a983cc3c9b684c75 /src/mess/drivers
parent92b1c4eebd358d5138fc51662daead09f4a4c72e (diff)
Replace some *_DEVICE_HANDLER with _MEMBER calls in MESS section (no whatsnew)
Diffstat (limited to 'src/mess/drivers')
-rw-r--r--src/mess/drivers/ace.c42
-rw-r--r--src/mess/drivers/adam.c12
-rw-r--r--src/mess/drivers/amstrad.c10
-rw-r--r--src/mess/drivers/apple2.c30
-rw-r--r--src/mess/drivers/apple2gs.c26
-rw-r--r--src/mess/drivers/bbc.c20
-rw-r--r--src/mess/drivers/bullet.c5
-rw-r--r--src/mess/drivers/bw12.c5
-rw-r--r--src/mess/drivers/cgenie.c2
-rw-r--r--src/mess/drivers/coleco.c12
-rw-r--r--src/mess/drivers/einstein.c32
-rw-r--r--src/mess/drivers/enterp.c46
-rw-r--r--src/mess/drivers/fm7.c26
-rw-r--r--src/mess/drivers/fmtowns.c59
-rw-r--r--src/mess/drivers/huebler.c18
-rw-r--r--src/mess/drivers/kaypro.c4
-rw-r--r--src/mess/drivers/kyocera.c10
-rw-r--r--src/mess/drivers/m5.c10
-rw-r--r--src/mess/drivers/msx.c15
-rw-r--r--src/mess/drivers/mtx.c36
-rw-r--r--src/mess/drivers/nascom1.c4
-rw-r--r--src/mess/drivers/nc.c90
-rw-r--r--src/mess/drivers/nes.c13
-rw-r--r--src/mess/drivers/ob68k1a.c14
-rw-r--r--src/mess/drivers/osi.c8
-rw-r--r--src/mess/drivers/pc.c6
-rw-r--r--src/mess/drivers/pce.c10
-rw-r--r--src/mess/drivers/pcw.c15
-rw-r--r--src/mess/drivers/pcw16.c46
-rw-r--r--src/mess/drivers/pes.c19
-rw-r--r--src/mess/drivers/pet.c4
-rw-r--r--src/mess/drivers/pokemini.c2
-rw-r--r--src/mess/drivers/portfoli.c6
-rw-r--r--src/mess/drivers/ql.c18
-rw-r--r--src/mess/drivers/rmnimbus.c2
-rw-r--r--src/mess/drivers/samcoupe.c20
-rw-r--r--src/mess/drivers/sg1000.c14
-rw-r--r--src/mess/drivers/sms.c16
-rw-r--r--src/mess/drivers/ssystem3.c86
-rw-r--r--src/mess/drivers/super6.c4
-rw-r--r--src/mess/drivers/svi318.c6
-rw-r--r--src/mess/drivers/tandy2k.c8
-rw-r--r--src/mess/drivers/tsispch.c24
-rw-r--r--src/mess/drivers/v1050.c30
-rw-r--r--src/mess/drivers/victor9k.c8
-rw-r--r--src/mess/drivers/x1.c6
-rw-r--r--src/mess/drivers/x68k.c170
-rw-r--r--src/mess/drivers/xerox820.c11
-rw-r--r--src/mess/drivers/xor100.c34
-rw-r--r--src/mess/drivers/z80ne.c4
50 files changed, 544 insertions, 574 deletions
diff --git a/src/mess/drivers/ace.c b/src/mess/drivers/ace.c
index e010463bfff..48c6ff7b82a 100644
--- a/src/mess/drivers/ace.c
+++ b/src/mess/drivers/ace.c
@@ -160,23 +160,27 @@ WRITE8_MEMBER( ace_state::ppi_control_w )
// pio_r -
//-------------------------------------------------
-static READ8_DEVICE_HANDLER( pio_ad_r )
+READ8_MEMBER(ace_state::pio_ad_r)
{
+ device_t *device = machine().device(Z80PIO_TAG);
return dynamic_cast<z80pio_device*>(device)->data_read(0);
}
-static READ8_DEVICE_HANDLER( pio_bd_r )
+READ8_MEMBER(ace_state::pio_bd_r)
{
+ device_t *device = machine().device(Z80PIO_TAG);
return dynamic_cast<z80pio_device*>(device)->data_read(1);
}
-static READ8_DEVICE_HANDLER( pio_ac_r )
+READ8_MEMBER(ace_state::pio_ac_r)
{
+ device_t *device = machine().device(Z80PIO_TAG);
return dynamic_cast<z80pio_device*>(device)->control_read();
}
-static READ8_DEVICE_HANDLER( pio_bc_r )
+READ8_MEMBER(ace_state::pio_bc_r)
{
+ device_t *device = machine().device(Z80PIO_TAG);
return dynamic_cast<z80pio_device*>(device)->control_read();
}
@@ -185,23 +189,27 @@ static READ8_DEVICE_HANDLER( pio_bc_r )
// pio_w -
//-------------------------------------------------
-static WRITE8_DEVICE_HANDLER( pio_ad_w )
+WRITE8_MEMBER(ace_state::pio_ad_w)
{
+ device_t *device = machine().device(Z80PIO_TAG);
dynamic_cast<z80pio_device*>(device)->data_write(0, data);
}
-static WRITE8_DEVICE_HANDLER( pio_bd_w )
+WRITE8_MEMBER(ace_state::pio_bd_w)
{
+ device_t *device = machine().device(Z80PIO_TAG);
dynamic_cast<z80pio_device*>(device)->data_write(1, data);
}
-static WRITE8_DEVICE_HANDLER( pio_ac_w )
+WRITE8_MEMBER(ace_state::pio_ac_w)
{
+ device_t *device = machine().device(Z80PIO_TAG);
dynamic_cast<z80pio_device*>(device)->control_write(0, data);
}
-static WRITE8_DEVICE_HANDLER( pio_bc_w )
+WRITE8_MEMBER(ace_state::pio_bc_w)
{
+ device_t *device = machine().device(Z80PIO_TAG);
dynamic_cast<z80pio_device*>(device)->control_write(1, data);
}
@@ -235,10 +243,10 @@ static ADDRESS_MAP_START( ace_io, AS_IO, 8, ace_state )
AM_RANGE(0x43, 0x43) AM_MIRROR(0xff80) AM_READWRITE(ppi_pb_r, ppi_pb_w)
AM_RANGE(0x45, 0x45) AM_MIRROR(0xff80) AM_READWRITE(ppi_pc_r, ppi_pc_w)
AM_RANGE(0x47, 0x47) AM_MIRROR(0xff80) AM_READWRITE(ppi_control_r, ppi_control_w)
- AM_RANGE(0x81, 0x81) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_ad_r, pio_ad_w)
- AM_RANGE(0x83, 0x83) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_bd_r, pio_bd_w)
- AM_RANGE(0x85, 0x85) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_ac_r, pio_ac_w)
- AM_RANGE(0x87, 0x87) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_bc_r, pio_bc_w)
+ AM_RANGE(0x81, 0x81) AM_MIRROR(0xff38) AM_READWRITE(pio_ad_r, pio_ad_w)
+ AM_RANGE(0x83, 0x83) AM_MIRROR(0xff38) AM_READWRITE(pio_bd_r, pio_bd_w)
+ AM_RANGE(0x85, 0x85) AM_MIRROR(0xff38) AM_READWRITE(pio_ac_r, pio_ac_w)
+ AM_RANGE(0x87, 0x87) AM_MIRROR(0xff38) AM_READWRITE(pio_bc_r, pio_bc_w)
AM_RANGE(0xfd, 0xfd) AM_MIRROR(0xff00) AM_DEVWRITE_LEGACY(AY8910_TAG, ay8910_address_w)
AM_RANGE(0xff, 0xff) AM_MIRROR(0xff00) AM_DEVREADWRITE_LEGACY(AY8910_TAG, ay8910_r, ay8910_data_w)
ADDRESS_MAP_END
@@ -468,8 +476,9 @@ static const sp0256_interface sp0256_intf =
// I8255A_INTERFACE( ppi_intf )
//-------------------------------------------------
-static READ8_DEVICE_HANDLER( sby_r )
+READ8_MEMBER(ace_state::sby_r)
{
+ device_t *device = machine().device(SP0256AL2_TAG);
/*
bit description
@@ -488,8 +497,9 @@ static READ8_DEVICE_HANDLER( sby_r )
return sp0256_sby_r(device);
}
-static WRITE8_DEVICE_HANDLER( ald_w )
+WRITE8_MEMBER(ace_state::ald_w)
{
+ device_t *device = machine().device(SP0256AL2_TAG);
/*
bit description
@@ -515,8 +525,8 @@ static I8255A_INTERFACE( ppi_intf )
{
DEVCB_NULL,
DEVCB_NULL,
- DEVCB_DEVICE_HANDLER(SP0256AL2_TAG, sby_r),
- DEVCB_DEVICE_HANDLER(SP0256AL2_TAG, ald_w),
+ DEVCB_DRIVER_MEMBER(ace_state,sby_r),
+ DEVCB_DRIVER_MEMBER(ace_state,ald_w),
DEVCB_NULL,
DEVCB_NULL
};
diff --git a/src/mess/drivers/adam.c b/src/mess/drivers/adam.c
index 6d0b40d7e81..3026f2127e8 100644
--- a/src/mess/drivers/adam.c
+++ b/src/mess/drivers/adam.c
@@ -1497,23 +1497,21 @@ INPUT_PORTS_END
// TMS9928a_interface tms9928a_interface
//-------------------------------------------------
-static WRITE_LINE_DEVICE_HANDLER(adam_vdp_interrupt)
+WRITE_LINE_MEMBER(adam_state::adam_vdp_interrupt)
{
- adam_state *driver_state = device->machine().driver_data<adam_state>();
-
- if (state && !driver_state->m_vdp_nmi)
+ if (state && !m_vdp_nmi)
{
- device->machine().device(Z80_TAG)->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+ machine().device(Z80_TAG)->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
- driver_state->m_vdp_nmi = state;
+ m_vdp_nmi = state;
}
static TMS9928A_INTERFACE(adam_tms9928a_interface)
{
"screen",
0x4000,
- DEVCB_LINE(adam_vdp_interrupt)
+ DEVCB_DRIVER_LINE_MEMBER(adam_state,adam_vdp_interrupt)
};
//-------------------------------------------------
diff --git a/src/mess/drivers/amstrad.c b/src/mess/drivers/amstrad.c
index 28a79a9ec52..8435ad9c214 100644
--- a/src/mess/drivers/amstrad.c
+++ b/src/mess/drivers/amstrad.c
@@ -126,12 +126,12 @@ Some bugs left :
-----------------------------*/
static I8255_INTERFACE( amstrad_ppi8255_interface )
{
- DEVCB_HANDLER(amstrad_ppi_porta_r), /* port A read */
- DEVCB_HANDLER(amstrad_ppi_porta_w), /* port A write */
- DEVCB_HANDLER(amstrad_ppi_portb_r), /* port B read */
+ DEVCB_DRIVER_MEMBER(amstrad_state,amstrad_ppi_porta_r), /* port A read */
+ DEVCB_DRIVER_MEMBER(amstrad_state,amstrad_ppi_porta_w), /* port A write */
+ DEVCB_DRIVER_MEMBER(amstrad_state,amstrad_ppi_portb_r), /* port B read */
DEVCB_NULL, /* port B write */
DEVCB_NULL, /* port C read */
- DEVCB_HANDLER(amstrad_ppi_portc_w) /* port C write */
+ DEVCB_DRIVER_MEMBER(amstrad_state,amstrad_ppi_portc_w) /* port C write */
};
@@ -148,7 +148,7 @@ static const upd765_interface amstrad_upd765_interface =
/* Aleste uses an 8272A, with the interrupt flag visible on PPI port B */
static const upd765_interface aleste_8272_interface =
{
- DEVCB_LINE(aleste_interrupt),
+ DEVCB_DRIVER_LINE_MEMBER(amstrad_state,aleste_interrupt),
DEVCB_NULL,
NULL,
UPD765_RDY_PIN_CONNECTED,
diff --git a/src/mess/drivers/apple2.c b/src/mess/drivers/apple2.c
index ff96f4ada4f..0be7ae17609 100644
--- a/src/mess/drivers/apple2.c
+++ b/src/mess/drivers/apple2.c
@@ -222,26 +222,20 @@ Apple 3.5 and Apple 5.25 drives - up to three devices
#define PADDLE_SENSITIVITY 10
#define PADDLE_AUTOCENTER 0
-static WRITE8_DEVICE_HANDLER(a2bus_irq_w)
+WRITE8_MEMBER(apple2_state::a2bus_irq_w)
{
- apple2_state *a2 = space.machine().driver_data<apple2_state>();
-
- a2->m_maincpu->set_input_line(M6502_IRQ_LINE, data);
+ m_maincpu->set_input_line(M6502_IRQ_LINE, data);
}
-static WRITE8_DEVICE_HANDLER(a2bus_nmi_w)
+WRITE8_MEMBER(apple2_state::a2bus_nmi_w)
{
- apple2_state *a2 = space.machine().driver_data<apple2_state>();
-
- a2->m_maincpu->set_input_line(INPUT_LINE_NMI, data);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, data);
}
-static WRITE8_DEVICE_HANDLER(a2bus_inh_w)
+WRITE8_MEMBER(apple2_state::a2bus_inh_w)
{
- apple2_state *a2 = space.machine().driver_data<apple2_state>();
-
- a2->m_inh_slot = data;
- apple2_update_memory(space.machine());
+ m_inh_slot = data;
+ apple2_update_memory(machine());
}
/***************************************************************************
@@ -596,16 +590,16 @@ static const cassette_interface apple2_cassette_interface =
static const struct a2bus_interface a2bus_intf =
{
// interrupt lines
- DEVCB_HANDLER(a2bus_irq_w),
- DEVCB_HANDLER(a2bus_nmi_w),
- DEVCB_HANDLER(a2bus_inh_w)
+ DEVCB_DRIVER_MEMBER(apple2_state,a2bus_irq_w),
+ DEVCB_DRIVER_MEMBER(apple2_state,a2bus_nmi_w),
+ DEVCB_DRIVER_MEMBER(apple2_state,a2bus_inh_w)
};
static const struct a2eauxslot_interface a2eauxbus_intf =
{
// interrupt lines
- DEVCB_HANDLER(a2bus_irq_w),
- DEVCB_HANDLER(a2bus_nmi_w)
+ DEVCB_DRIVER_MEMBER(apple2_state,a2bus_irq_w),
+ DEVCB_DRIVER_MEMBER(apple2_state,a2bus_nmi_w)
};
static SLOT_INTERFACE_START(apple2_slot0_cards)
diff --git a/src/mess/drivers/apple2gs.c b/src/mess/drivers/apple2gs.c
index 70fd6b3304d..de9d9e62362 100644
--- a/src/mess/drivers/apple2gs.c
+++ b/src/mess/drivers/apple2gs.c
@@ -182,39 +182,35 @@ static ADDRESS_MAP_START( apple2gs_map, AS_PROGRAM, 8, apple2gs_state )
/* nothing in the address map - everything is added dynamically */
ADDRESS_MAP_END
-static WRITE8_DEVICE_HANDLER(a2bus_irq_w)
+WRITE8_MEMBER(apple2gs_state::a2bus_irq_w)
{
if (data)
{
- apple2gs_add_irq(space.machine(), IRQ_SLOT);
+ apple2gs_add_irq(machine(), IRQ_SLOT);
}
else
{
- apple2gs_remove_irq(space.machine(), IRQ_SLOT);
+ apple2gs_remove_irq(machine(), IRQ_SLOT);
}
}
-static WRITE8_DEVICE_HANDLER(a2bus_nmi_w)
+WRITE8_MEMBER(apple2gs_state::a2bus_nmi_w)
{
- apple2gs_state *a2 = space.machine().driver_data<apple2gs_state>();
-
- a2->m_maincpu->set_input_line(INPUT_LINE_NMI, data);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, data);
}
-static WRITE8_DEVICE_HANDLER(a2bus_inh_w)
+WRITE8_MEMBER(apple2gs_state::a2bus_inh_w)
{
- apple2_state *a2 = space.machine().driver_data<apple2_state>();
-
- a2->m_inh_slot = data;
- apple2_update_memory(space.machine());
+ m_inh_slot = data;
+ apple2_update_memory(machine());
}
static const struct a2bus_interface a2bus_intf =
{
// interrupt lines
- DEVCB_HANDLER(a2bus_irq_w),
- DEVCB_HANDLER(a2bus_nmi_w),
- DEVCB_HANDLER(a2bus_inh_w)
+ DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_irq_w),
+ DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_nmi_w),
+ DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_inh_w)
};
static SLOT_INTERFACE_START(apple2_cards)
diff --git a/src/mess/drivers/bbc.c b/src/mess/drivers/bbc.c
index 084d66a9a2e..c5dc1c16142 100644
--- a/src/mess/drivers/bbc.c
+++ b/src/mess/drivers/bbc.c
@@ -717,25 +717,24 @@ static const cassette_interface bbc_cassette_interface =
};
-static WRITE_LINE_DEVICE_HANDLER(bbcb_ack_w)
+WRITE_LINE_MEMBER(bbc_state::bbcb_ack_w)
{
- via6522_device *via_1 = device->machine().device<via6522_device>("via6522_1");
+ via6522_device *via_1 = machine().device<via6522_device>("via6522_1");
via_1->write_ca1(!state); /* ack seems to be inverted? */
}
static const centronics_interface bbcb_centronics_config =
{
- DEVCB_DEVICE_LINE("via6522_1",bbcb_ack_w),
+ DEVCB_DRIVER_LINE_MEMBER(bbc_state,bbcb_ack_w),
DEVCB_NULL,
DEVCB_NULL
};
-static WRITE_LINE_DEVICE_HANDLER( bbcb_acia6850_irq_w )
+WRITE_LINE_MEMBER(bbc_state::bbcb_acia6850_irq_w)
{
- bbc_state *driver_state = device->machine().driver_data<bbc_state>();
- driver_state->m_acia_irq = state;
+ m_acia_irq = state;
- driver_state->check_interrupts();
+ check_interrupts();
}
static ACIA6850_INTERFACE( bbc_acia6850_interface )
@@ -747,7 +746,7 @@ static ACIA6850_INTERFACE( bbc_acia6850_interface )
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
- DEVCB_LINE(bbcb_acia6850_irq_w)
+ DEVCB_DRIVER_LINE_MEMBER(bbc_state,bbcb_acia6850_irq_w)
};
static LEGACY_FLOPPY_OPTIONS_START(bbc)
@@ -798,15 +797,16 @@ static const sn76496_config psg_intf =
DEVCB_NULL
};
-static WRITE_LINE_DEVICE_HANDLER( econet_clk_w )
+WRITE_LINE_MEMBER(bbc_state::econet_clk_w)
{
+ device_t *device = machine().device("mc6854");
mc6854_rxc_w(device, state);
mc6854_txc_w(device, state);
}
static ECONET_INTERFACE( econet_intf )
{
- DEVCB_DEVICE_LINE("mc6854", econet_clk_w),
+ DEVCB_DRIVER_LINE_MEMBER(bbc_state,econet_clk_w),
DEVCB_NULL
};
diff --git a/src/mess/drivers/bullet.c b/src/mess/drivers/bullet.c
index 783eba784b9..fc0418a2f85 100644
--- a/src/mess/drivers/bullet.c
+++ b/src/mess/drivers/bullet.c
@@ -683,8 +683,9 @@ TIMER_DEVICE_CALLBACK_MEMBER(bullet_state::ctc_tick)
m_ctc->trg2(0);
}
-static WRITE_LINE_DEVICE_HANDLER( dart_rxtxca_w )
+WRITE_LINE_MEMBER(bullet_state::dart_rxtxca_w)
{
+ device_t *device = machine().device(Z80DART_TAG);
z80dart_txca_w(device, state);
z80dart_rxca_w(device, state);
}
@@ -692,7 +693,7 @@ static WRITE_LINE_DEVICE_HANDLER( dart_rxtxca_w )
static Z80CTC_INTERFACE( ctc_intf )
{
DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), // interrupt handler
- DEVCB_DEVICE_LINE(Z80DART_TAG, dart_rxtxca_w), // ZC/TO0 callback
+ DEVCB_DRIVER_LINE_MEMBER(bullet_state,dart_rxtxca_w), // ZC/TO0 callback
DEVCB_DEVICE_LINE(Z80DART_TAG, z80dart_rxtxcb_w), // ZC/TO1 callback
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF, z80ctc_device, trg3) // ZC/TO2 callback
};
diff --git a/src/mess/drivers/bw12.c b/src/mess/drivers/bw12.c
index e0193b8676d..599a2148c47 100644
--- a/src/mess/drivers/bw12.c
+++ b/src/mess/drivers/bw12.c
@@ -541,8 +541,9 @@ static Z80DART_INTERFACE( sio_intf )
/* PIT8253 Interface */
-static WRITE_LINE_DEVICE_HANDLER( pit_out0_w )
+WRITE_LINE_MEMBER(bw12_state::pit_out0_w)
{
+ device_t *device = machine().device("DEVCB_DRIVER_LINE_MEMBER(Z80SIO_TAG, bw12_state,pit_out0_w)");
z80dart_txca_w(device, state);
z80dart_rxca_w(device, state);
}
@@ -558,7 +559,7 @@ static const struct pit8253_config pit_intf =
{
XTAL_1_8432MHz,
DEVCB_NULL,
- DEVCB_DEVICE_LINE(Z80SIO_TAG, pit_out0_w)
+ DEVCB_DRIVER_LINE_MEMBER(bw12_state,pit_out0_w)
},
{
XTAL_1_8432MHz,
diff --git a/src/mess/drivers/cgenie.c b/src/mess/drivers/cgenie.c
index 97ec03a1271..7c6fa274d40 100644
--- a/src/mess/drivers/cgenie.c
+++ b/src/mess/drivers/cgenie.c
@@ -60,7 +60,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START (cgenie_io, AS_IO, 8, cgenie_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0xf8, 0xf8) AM_DEVREADWRITE_LEGACY("ay8910", cgenie_sh_control_port_r, cgenie_sh_control_port_w )
+ AM_RANGE(0xf8, 0xf8) AM_READWRITE(cgenie_sh_control_port_r, cgenie_sh_control_port_w )
AM_RANGE(0xf9, 0xf9) AM_DEVREADWRITE_LEGACY("ay8910", ay8910_r, ay8910_data_w )
AM_RANGE(0xfa, 0xfa) AM_READWRITE_LEGACY(cgenie_index_r, cgenie_index_w )
AM_RANGE(0xfb, 0xfb) AM_READWRITE_LEGACY(cgenie_register_r, cgenie_register_w )
diff --git a/src/mess/drivers/coleco.c b/src/mess/drivers/coleco.c
index 6e9f09f3d0e..b0b9b0fe8d9 100644
--- a/src/mess/drivers/coleco.c
+++ b/src/mess/drivers/coleco.c
@@ -165,15 +165,13 @@ INPUT_PORTS_END
/* Interrupts */
-static WRITE_LINE_DEVICE_HANDLER(coleco_vdp_interrupt)
+WRITE_LINE_MEMBER(coleco_state::coleco_vdp_interrupt)
{
- coleco_state *drvstate = device->machine().driver_data<coleco_state>();
-
// NMI on rising edge
- if (state && !drvstate->m_last_nmi_state)
- drvstate->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+ if (state && !m_last_nmi_state)
+ m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
- drvstate->m_last_nmi_state = state;
+ m_last_nmi_state = state;
}
TIMER_CALLBACK_MEMBER(coleco_state::paddle_d7reset_callback)
@@ -240,7 +238,7 @@ static TMS9928A_INTERFACE(coleco_tms9928a_interface)
{
"screen",
0x4000,
- DEVCB_LINE(coleco_vdp_interrupt)
+ DEVCB_DRIVER_LINE_MEMBER(coleco_state,coleco_vdp_interrupt)
};
diff --git a/src/mess/drivers/einstein.c b/src/mess/drivers/einstein.c
index 7a4db3294b2..29a098379b3 100644
--- a/src/mess/drivers/einstein.c
+++ b/src/mess/drivers/einstein.c
@@ -132,10 +132,9 @@ static MC6845_UPDATE_ROW( einstein_6845_update_row )
}
}
-static WRITE_LINE_DEVICE_HANDLER( einstein_6845_de_changed )
+WRITE_LINE_MEMBER(einstein_state::einstein_6845_de_changed)
{
- einstein_state *einstein = device->machine().driver_data<einstein_state>();
- einstein->m_de=state;
+ m_de=state;
}
/* bit 0 - latched display enabled (DE) from 6845
@@ -236,31 +235,30 @@ READ8_MEMBER(einstein_state::einstein_keyboard_data_read)
FLOPPY DRIVES
***************************************************************************/
-static WRITE8_DEVICE_HANDLER( einstein_drsel_w )
+WRITE8_MEMBER(einstein_state::einstein_drsel_w)
{
- einstein_state *einstein = space.machine().driver_data<einstein_state>();
if(VERBOSE_DISK)
- logerror("%s: einstein_drsel_w %02x\n", space.machine().describe_context(), data);
+ logerror("%s: einstein_drsel_w %02x\n", machine().describe_context(), data);
/* bit 0 to 3 select the drive */
static const char *names[] = { "fd0", "fd1", "fd2", "fd3" };
floppy_image_device *floppy = 0;
for(int i=0; i<4; i++) {
if(BIT(data, i)) {
- floppy_connector *con = space.machine().device<floppy_connector>(names[i]);
+ floppy_connector *con = machine().device<floppy_connector>(names[i]);
if(con)
floppy = con->get_device();
}
}
/* double sided drive connected? */
- if (space.machine().root_device().ioport("config")->read() & data)
+ if (machine().root_device().ioport("config")->read() & data)
{
/* bit 4 selects the side then */
//floppy->ss_w(BIT(data, 4));
}
if (floppy) floppy->ss_w(0);
- einstein->m_fdc->set_floppy(floppy);
+ m_fdc->set_floppy(floppy);
}
@@ -283,15 +281,15 @@ TIMER_DEVICE_CALLBACK_MEMBER(einstein_state::einstein_ctc_trigger_callback)
UART
***************************************************************************/
-static WRITE_LINE_DEVICE_HANDLER( einstein_serial_transmit_clock )
+WRITE_LINE_MEMBER(einstein_state::einstein_serial_transmit_clock)
{
- i8251_device *uart = device->machine().device<i8251_device>(IC_I060);
+ i8251_device *uart = machine().device<i8251_device>(IC_I060);
uart->transmit_clock();
}
-static WRITE_LINE_DEVICE_HANDLER( einstein_serial_receive_clock )
+WRITE_LINE_MEMBER(einstein_state::einstein_serial_receive_clock)
{
- i8251_device *uart = device->machine().device<i8251_device>(IC_I060);
+ i8251_device *uart = machine().device<i8251_device>(IC_I060);
uart->receive_clock();
}
@@ -521,7 +519,7 @@ static ADDRESS_MAP_START( einstein_io, AS_IO, 8, einstein_state )
/* block 4, internal controls */
AM_RANGE(0x20, 0x20) AM_MIRROR(0xff00) AM_READWRITE(einstein_kybintmsk_r, einstein_kybintmsk_w)
AM_RANGE(0x21, 0x21) AM_MIRROR(0xff00) AM_WRITE(einstein_adcintmsk_w)
- AM_RANGE(0x23, 0x23) AM_MIRROR(0xff00) AM_DEVWRITE_LEGACY(IC_I042, einstein_drsel_w)
+ AM_RANGE(0x23, 0x23) AM_MIRROR(0xff00) AM_WRITE(einstein_drsel_w)
AM_RANGE(0x24, 0x24) AM_MIRROR(0xff00) AM_WRITE(einstein_rom_w)
AM_RANGE(0x25, 0x25) AM_MIRROR(0xff00) AM_WRITE(einstein_fire_int_w)
/* block 5, z80ctc */
@@ -692,8 +690,8 @@ INPUT_PORTS_END
static Z80CTC_INTERFACE( einstein_ctc_intf )
{
DEVCB_NULL,
- DEVCB_LINE(einstein_serial_transmit_clock),
- DEVCB_LINE(einstein_serial_receive_clock),
+ DEVCB_DRIVER_LINE_MEMBER(einstein_state,einstein_serial_transmit_clock),
+ DEVCB_DRIVER_LINE_MEMBER(einstein_state,einstein_serial_receive_clock),
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF, z80ctc_device, trg3)
};
@@ -733,7 +731,7 @@ static const mc6845_interface einstein_crtc6845_interface =
NULL,
einstein_6845_update_row,
NULL,
- DEVCB_LINE(einstein_6845_de_changed),
+ DEVCB_DRIVER_LINE_MEMBER(einstein_state,einstein_6845_de_changed),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/enterp.c b/src/mess/drivers/enterp.c
index ad36f8b2ceb..eb1d0a306ec 100644
--- a/src/mess/drivers/enterp.c
+++ b/src/mess/drivers/enterp.c
@@ -98,27 +98,25 @@ static void enterprise_update_memory_page(address_space &space, offs_t page, int
/* EP specific handling of dave register write */
-static WRITE8_DEVICE_HANDLER( enterprise_dave_reg_write )
+WRITE8_MEMBER(ep_state::enterprise_dave_reg_write)
{
- ep_state *ep = space.machine().driver_data<ep_state>();
-
switch (offset)
{
case 0x10:
case 0x11:
case 0x12:
case 0x13:
- enterprise_update_memory_page(space.machine().device("maincpu")->memory().space(AS_PROGRAM), offset - 0x0f, data);
+ enterprise_update_memory_page(machine().device("maincpu")->memory().space(AS_PROGRAM), offset - 0x0f, data);
break;
case 0x15:
- ep->keyboard_line = data & 15;
+ keyboard_line = data & 15;
break;
}
}
-static READ8_DEVICE_HANDLER( enterprise_dave_reg_read )
+READ8_MEMBER(ep_state::enterprise_dave_reg_read)
{
static const char *const keynames[] =
{
@@ -126,30 +124,28 @@ static READ8_DEVICE_HANDLER( enterprise_dave_reg_read )
"LINE5", "LINE6", "LINE7", "LINE8", "LINE9"
};
- ep_state *ep = space.machine().driver_data<ep_state>();
-
switch (offset)
{
case 0x015:
/* read keyboard line */
- dave_set_reg(device, 0x015, space.machine().root_device().ioport(keynames[ep->keyboard_line])->read());
+ dave_set_reg(machine().device("custom"), 0x015, machine().root_device().ioport(keynames[keyboard_line])->read());
break;
case 0x016:
{
int ExternalJoystickInputs;
- int ExternalJoystickPortInput = space.machine().root_device().ioport("JOY1")->read();
+ int ExternalJoystickPortInput = machine().root_device().ioport("JOY1")->read();
- if (ep->keyboard_line <= 4)
+ if (keyboard_line <= 4)
{
- ExternalJoystickInputs = ExternalJoystickPortInput>>(4-(ep->keyboard_line));
+ ExternalJoystickInputs = ExternalJoystickPortInput>>(4-(keyboard_line));
}
else
{
ExternalJoystickInputs = 1;
}
- dave_set_reg(device, 0x016, (0x0fe | (ExternalJoystickInputs & 0x01)));
+ dave_set_reg(machine().device("custom"), 0x016, (0x0fe | (ExternalJoystickInputs & 0x01)));
}
break;
@@ -164,8 +160,8 @@ to Enterprise. But these functions make it nice and easy to see
whats going on. */
static const dave_interface enterprise_dave_interface =
{
- DEVCB_HANDLER(enterprise_dave_reg_read),
- DEVCB_HANDLER(enterprise_dave_reg_write),
+ DEVCB_DRIVER_MEMBER(ep_state,enterprise_dave_reg_read),
+ DEVCB_DRIVER_MEMBER(ep_state,enterprise_dave_reg_write),
DEVCB_CPU_INPUT_LINE("maincpu", 0)
};
@@ -180,24 +176,20 @@ void ep_state::machine_reset()
FLOPPY/EXDOS
***************************************************************************/
-static WRITE_LINE_DEVICE_HANDLER( enterp_wd1770_intrq_w )
+WRITE_LINE_MEMBER(ep_state::enterp_wd1770_intrq_w)
{
- ep_state *ep = device->machine().driver_data<ep_state>();
-
if (state)
- ep->exdos_card_value |= 0x02;
+ exdos_card_value |= 0x02;
else
- ep->exdos_card_value &= ~0x02;
+ exdos_card_value &= ~0x02;
}
-static WRITE_LINE_DEVICE_HANDLER( enterp_wd1770_drq_w )
+WRITE_LINE_MEMBER(ep_state::enterp_wd1770_drq_w)
{
- ep_state *ep = device->machine().driver_data<ep_state>();
-
if (state)
- ep->exdos_card_value |= 0x80;
+ exdos_card_value |= 0x80;
else
- ep->exdos_card_value &= ~0x80;
+ exdos_card_value &= ~0x80;
}
@@ -417,8 +409,8 @@ INPUT_PORTS_END
static const wd17xx_interface enterp_wd1770_interface =
{
DEVCB_NULL,
- DEVCB_LINE(enterp_wd1770_intrq_w),
- DEVCB_LINE(enterp_wd1770_drq_w),
+ DEVCB_DRIVER_LINE_MEMBER(ep_state,enterp_wd1770_intrq_w),
+ DEVCB_DRIVER_LINE_MEMBER(ep_state,enterp_wd1770_drq_w),
{FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
};
diff --git a/src/mess/drivers/fm7.c b/src/mess/drivers/fm7.c
index 05772974e19..e6f13888548 100644
--- a/src/mess/drivers/fm7.c
+++ b/src/mess/drivers/fm7.c
@@ -396,16 +396,14 @@ WRITE8_MEMBER(fm7_state::fm7_init_en_w)
* Main CPU: I/O ports 0xfd18 - 0xfd1f
* Floppy Disk Controller (MB8877A)
*/
-static WRITE_LINE_DEVICE_HANDLER( fm7_fdc_intrq_w )
+WRITE_LINE_MEMBER(fm7_state::fm7_fdc_intrq_w)
{
- fm7_state *drvstate = device->machine().driver_data<fm7_state>();
- drvstate->m_fdc_irq_flag = state;
+ m_fdc_irq_flag = state;
}
-static WRITE_LINE_DEVICE_HANDLER( fm7_fdc_drq_w )
+WRITE_LINE_MEMBER(fm7_state::fm7_fdc_drq_w)
{
- fm7_state *drvstate = device->machine().driver_data<fm7_state>();
- drvstate->m_fdc_drq_flag = state;
+ m_fdc_drq_flag = state;
}
READ8_MEMBER(fm7_state::fm7_fdc_r)
@@ -940,14 +938,14 @@ READ8_MEMBER(fm7_state::fm7_fmirq_r)
return ret;
}
-static READ8_DEVICE_HANDLER( fm77av_joy_1_r )
+READ8_MEMBER(fm7_state::fm77av_joy_1_r)
{
- return space.machine().root_device().ioport("joy1")->read();
+ return machine().root_device().ioport("joy1")->read();
}
-static READ8_DEVICE_HANDLER( fm77av_joy_2_r )
+READ8_MEMBER(fm7_state::fm77av_joy_2_r)
{
- return space.machine().root_device().ioport("joy2")->read();
+ return machine().root_device().ioport("joy2")->read();
}
READ8_MEMBER(fm7_state::fm7_unknown_r)
@@ -1971,8 +1969,8 @@ void fm7_state::machine_reset()
static const wd17xx_interface fm7_mb8877a_interface =
{
DEVCB_NULL,
- DEVCB_LINE(fm7_fdc_intrq_w),
- DEVCB_LINE(fm7_fdc_drq_w),
+ DEVCB_DRIVER_LINE_MEMBER(fm7_state,fm7_fdc_intrq_w),
+ DEVCB_DRIVER_LINE_MEMBER(fm7_state,fm7_fdc_drq_w),
{FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
};
@@ -1991,8 +1989,8 @@ static const ym2203_interface fm7_ym_intf =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
- DEVCB_HANDLER(fm77av_joy_1_r),
- DEVCB_HANDLER(fm77av_joy_2_r),
+ DEVCB_DRIVER_MEMBER(fm7_state,fm77av_joy_1_r),
+ DEVCB_DRIVER_MEMBER(fm7_state,fm77av_joy_2_r),
DEVCB_NULL, /* portA write */
DEVCB_NULL /* portB write */
},
diff --git a/src/mess/drivers/fmtowns.c b/src/mess/drivers/fmtowns.c
index 8e68e9458f9..eb565dd93f7 100644
--- a/src/mess/drivers/fmtowns.c
+++ b/src/mess/drivers/fmtowns.c
@@ -133,7 +133,7 @@ enum
};
-static WRITE_LINE_DEVICE_HANDLER( towns_pic_irq );
+
INLINE UINT8 byte_to_bcd(UINT8 val)
{
@@ -1892,18 +1892,16 @@ static void towns_scsi_dma_w(running_machine &machine, UINT16 data)
state->m_scsi->fmscsi_data_w(data & 0xff);
}
-static WRITE_LINE_DEVICE_HANDLER( towns_scsi_irq )
+WRITE_LINE_MEMBER(towns_state::towns_scsi_irq)
{
- towns_state* tstate = device->machine().driver_data<towns_state>();
- pic8259_ir0_w(tstate->m_pic_slave, state);
+ pic8259_ir0_w(m_pic_slave, state);
if(IRQ_LOG)
logerror("PIC: IRQ8 (SCSI) set to %i\n",state);
}
-static WRITE_LINE_DEVICE_HANDLER( towns_scsi_drq )
+WRITE_LINE_MEMBER(towns_state::towns_scsi_drq)
{
- towns_state* tstate = device->machine().driver_data<towns_state>();
- upd71071_dmarq(tstate->m_dma_1,state,1); // SCSI HDs use channel 1
+ upd71071_dmarq(m_dma_1,state,1); // SCSI HDs use channel 1
}
@@ -2002,42 +2000,40 @@ static void towns_pcm_irq(device_t* device, int channel)
}
}
-static WRITE_LINE_DEVICE_HANDLER( towns_pic_irq )
+WRITE_LINE_MEMBER(towns_state::towns_pic_irq)
{
- device->machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
// logerror("PIC#1: set IRQ line to %i\n",interrupt);
}
-static WRITE_LINE_DEVICE_HANDLER( towns_pit_out0_changed )
+WRITE_LINE_MEMBER(towns_state::towns_pit_out0_changed)
{
- towns_state* tstate = device->machine().driver_data<towns_state>();
- device_t* dev = tstate->m_pic_master;
+ device_t* dev = m_pic_master;
- if(tstate->m_towns_timer_mask & 0x01)
+ if(m_towns_timer_mask & 0x01)
{
- tstate->m_timer0 = state;
+ m_timer0 = state;
if(IRQ_LOG) logerror("PIC: IRQ0 (PIT Timer ch0) set to %i\n",state);
}
else
- tstate->m_timer0 = 0;
+ m_timer0 = 0;
- pic8259_ir0_w(dev, tstate->m_timer0 || tstate->m_timer1);
+ pic8259_ir0_w(dev, m_timer0 || m_timer1);
}
-static WRITE_LINE_DEVICE_HANDLER( towns_pit_out1_changed )
+WRITE_LINE_MEMBER(towns_state::towns_pit_out1_changed)
{
- towns_state* tstate = device->machine().driver_data<towns_state>();
- device_t* dev = tstate->m_pic_master;
+ device_t* dev = m_pic_master;
- if(tstate->m_towns_timer_mask & 0x02)
+ if(m_towns_timer_mask & 0x02)
{
- tstate->m_timer1 = state;
+ m_timer1 = state;
if(IRQ_LOG) logerror("PIC: IRQ0 (PIT Timer ch1) set to %i\n",state);
}
else
- tstate->m_timer1 = 0;
+ m_timer1 = 0;
- pic8259_ir0_w(dev, tstate->m_timer0 || tstate->m_timer1);
+ pic8259_ir0_w(dev, m_timer0 || m_timer1);
}
WRITE_LINE_MEMBER( towns_state::pit_out2_changed )
@@ -2515,12 +2511,12 @@ static const struct pit8253_config towns_pit8253_config =
{
307200,
DEVCB_NULL,
- DEVCB_LINE(towns_pit_out0_changed)
+ DEVCB_DRIVER_LINE_MEMBER(towns_state,towns_pit_out0_changed)
},
{
307200,
DEVCB_NULL,
- DEVCB_LINE(towns_pit_out1_changed)
+ DEVCB_DRIVER_LINE_MEMBER(towns_state,towns_pit_out1_changed)
},
{
307200,
@@ -2551,19 +2547,18 @@ static const struct pit8253_config towns_pit8253_config_2 =
}
};
-static READ8_DEVICE_HANDLER( get_slave_ack )
+READ8_MEMBER(towns_state::get_slave_ack)
{
- towns_state* state = space.machine().driver_data<towns_state>();
if (offset==7) { // IRQ = 7
- return pic8259_acknowledge(state->m_pic_slave);
+ return pic8259_acknowledge(m_pic_slave);
}
return 0x00;
}
static const struct pic8259_interface towns_pic8259_master_config =
{
- DEVCB_LINE(towns_pic_irq),
+ DEVCB_DRIVER_LINE_MEMBER(towns_state,towns_pic_irq),
DEVCB_LINE_VCC,
- DEVCB_HANDLER(get_slave_ack)
+ DEVCB_DRIVER_MEMBER(towns_state,get_slave_ack)
};
@@ -2624,8 +2619,8 @@ static const rf5c68_interface rf5c68_intf =
static const FMSCSIinterface towns_scsi_config =
{
- DEVCB_LINE(towns_scsi_irq),
- DEVCB_LINE(towns_scsi_drq)
+ DEVCB_DRIVER_LINE_MEMBER(towns_state,towns_scsi_irq),
+ DEVCB_DRIVER_LINE_MEMBER(towns_state,towns_scsi_drq)
};
static const gfx_layout fnt_chars_16x16 =
diff --git a/src/mess/drivers/huebler.c b/src/mess/drivers/huebler.c
index 076c2e9a57d..afdf38526e1 100644
--- a/src/mess/drivers/huebler.c
+++ b/src/mess/drivers/huebler.c
@@ -247,11 +247,11 @@ UINT32 amu880_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
/* Z80-CTC Interface */
-static WRITE_LINE_DEVICE_HANDLER( ctc_z0_w )
+WRITE_LINE_MEMBER(amu880_state::ctc_z0_w)
{
}
-static WRITE_LINE_DEVICE_HANDLER( ctc_z2_w )
+WRITE_LINE_MEMBER(amu880_state::ctc_z2_w)
{
/* cassette transmit/receive clock */
}
@@ -259,9 +259,9 @@ static WRITE_LINE_DEVICE_HANDLER( ctc_z2_w )
static Z80CTC_INTERFACE( ctc_intf )
{
DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), /* interrupt handler */
- DEVCB_LINE(ctc_z0_w), /* ZC/TO0 callback */
+ DEVCB_DRIVER_LINE_MEMBER(amu880_state,ctc_z0_w), /* ZC/TO0 callback */
DEVCB_DEVICE_LINE(Z80SIO_TAG, z80dart_rxtxcb_w), /* ZC/TO1 callback */
- DEVCB_LINE(ctc_z2_w) /* ZC/TO2 callback */
+ DEVCB_DRIVER_LINE_MEMBER(amu880_state,ctc_z2_w) /* ZC/TO2 callback */
};
/* Z80-PIO Interface */
@@ -290,14 +290,16 @@ static Z80PIO_INTERFACE( pio2_intf )
/* Z80-SIO Interface */
-static READ_LINE_DEVICE_HANDLER( cassette_r )
+READ_LINE_MEMBER(amu880_state::cassette_r)
{
+ device_t *device = machine().device(CASSETTE_TAG);
cassette_image_device* dev = dynamic_cast<cassette_image_device*>(device);
return dev->input() < 0.0;
}
-static WRITE_LINE_DEVICE_HANDLER( cassette_w )
+WRITE_LINE_MEMBER(amu880_state::cassette_w)
{
+ device_t *device = machine().device(CASSETTE_TAG);
cassette_image_device* dev = dynamic_cast<cassette_image_device*>(device);
dev->output(state ? -1.0 : +1.0);
}
@@ -306,8 +308,8 @@ static Z80DART_INTERFACE( sio_intf )
{
0, 0, 0, 0,
- DEVCB_DEVICE_LINE(CASSETTE_TAG, cassette_r),
- DEVCB_DEVICE_LINE(CASSETTE_TAG, cassette_w),
+ DEVCB_DRIVER_LINE_MEMBER(amu880_state, cassette_r),
+ DEVCB_DRIVER_LINE_MEMBER(amu880_state, cassette_w),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/kaypro.c b/src/mess/drivers/kaypro.c
index 55a538e50cb..a968b6f5d6d 100644
--- a/src/mess/drivers/kaypro.c
+++ b/src/mess/drivers/kaypro.c
@@ -50,7 +50,7 @@ static ADDRESS_MAP_START( kayproii_io, AS_IO, 8, kaypro_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00, 0x03) AM_DEVWRITE("brg", com8116_device, stt_w)
- AM_RANGE(0x04, 0x07) AM_DEVREADWRITE_LEGACY("z80sio", kaypro_sio_r, kaypro_sio_w)
+ AM_RANGE(0x04, 0x07) AM_READWRITE(kaypro_sio_r, kaypro_sio_w)
AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("z80pio_g", z80pio_device, read_alt, write_alt)
AM_RANGE(0x0c, 0x0f) AM_DEVWRITE("brg", com8116_device, str_w)
AM_RANGE(0x10, 0x13) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_r, wd17xx_w)
@@ -61,7 +61,7 @@ static ADDRESS_MAP_START( kaypro2x_io, AS_IO, 8, kaypro_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00, 0x03) AM_DEVWRITE("brg", com8116_device, str_w)
- AM_RANGE(0x04, 0x07) AM_DEVREADWRITE_LEGACY("z80sio", kaypro_sio_r, kaypro_sio_w)
+ AM_RANGE(0x04, 0x07) AM_READWRITE(kaypro_sio_r, kaypro_sio_w)
AM_RANGE(0x08, 0x0b) AM_DEVWRITE("brg", com8116_device, stt_w)
AM_RANGE(0x0c, 0x0f) AM_DEVREADWRITE("z80sio_2x", z80sio_device, read, write)
AM_RANGE(0x10, 0x13) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_r, wd17xx_w)
diff --git a/src/mess/drivers/kyocera.c b/src/mess/drivers/kyocera.c
index 371f5d9d4bd..bf7121e4601 100644
--- a/src/mess/drivers/kyocera.c
+++ b/src/mess/drivers/kyocera.c
@@ -1269,13 +1269,15 @@ static const cassette_interface kc85_cassette_interface =
NULL
};
-static WRITE_LINE_DEVICE_HANDLER( kc85_sod_w )
+WRITE_LINE_MEMBER(kc85_state::kc85_sod_w)
{
+ device_t *device = machine().device(CASSETTE_TAG);
dynamic_cast<cassette_image_device *>(device)->output(state ? +1.0 : -1.0);
}
-static READ_LINE_DEVICE_HANDLER( kc85_sid_r )
+READ_LINE_MEMBER(kc85_state::kc85_sid_r)
{
+ device_t *device = machine().device(CASSETTE_TAG);
return dynamic_cast<cassette_image_device *>(device)->input() > 0.0;
}
@@ -1283,8 +1285,8 @@ static I8085_CONFIG( kc85_i8085_config )
{
DEVCB_NULL, /* STATUS changed callback */
DEVCB_NULL, /* INTE changed callback */
- DEVCB_DEVICE_LINE(CASSETTE_TAG, kc85_sid_r), /* SID changed callback (I8085A only) */
- DEVCB_DEVICE_LINE(CASSETTE_TAG, kc85_sod_w) /* SOD changed callback (I8085A only) */
+ DEVCB_DRIVER_LINE_MEMBER(kc85_state,kc85_sid_r), /* SID changed callback (I8085A only) */
+ DEVCB_DRIVER_LINE_MEMBER(kc85_state,kc85_sod_w) /* SOD changed callback (I8085A only) */
};
TIMER_DEVICE_CALLBACK_MEMBER(tandy200_state::tandy200_tp_tick)
diff --git a/src/mess/drivers/m5.c b/src/mess/drivers/m5.c
index df95cb12542..1d78c9c5263 100644
--- a/src/mess/drivers/m5.c
+++ b/src/mess/drivers/m5.c
@@ -432,14 +432,12 @@ static const cassette_interface cassette_intf =
// TMS9928a_interface vdp_intf
//-------------------------------------------------
-static WRITE_LINE_DEVICE_HANDLER(sordm5_video_interrupt_callback)
+WRITE_LINE_MEMBER(m5_state::sordm5_video_interrupt_callback)
{
- m5_state *driver_state = device->machine().driver_data<m5_state>();
-
if (state)
{
- driver_state->m_ctc->trg3(1);
- driver_state->m_ctc->trg3(0);
+ m_ctc->trg3(1);
+ m_ctc->trg3(0);
}
}
@@ -447,7 +445,7 @@ static TMS9928A_INTERFACE(m5_tms9928a_interface)
{
"screen",
0x4000,
- DEVCB_LINE(sordm5_video_interrupt_callback)
+ DEVCB_DRIVER_LINE_MEMBER(m5_state,sordm5_video_interrupt_callback)
};
diff --git a/src/mess/drivers/msx.c b/src/mess/drivers/msx.c
index 68aafd7c914..f4c2b6ce976 100644
--- a/src/mess/drivers/msx.c
+++ b/src/mess/drivers/msx.c
@@ -341,8 +341,9 @@ static ADDRESS_MAP_START ( msx_memory_map, AS_PROGRAM, 8, msx_state )
ADDRESS_MAP_END
-static WRITE8_DEVICE_HANDLER( msx_ay8910_w )
+WRITE8_MEMBER(msx_state::msx_ay8910_w)
{
+ device_t *device = machine().device("ay8910");
if ( offset & 1 )
ay8910_data_w( device, space, offset, data );
else
@@ -355,9 +356,9 @@ static ADDRESS_MAP_START ( msx_io_map, AS_IO, 8, msx_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE( 0x77, 0x77) AM_WRITE(msx_90in1_w)
AM_RANGE( 0x7c, 0x7d) AM_WRITE(msx_fmpac_w)
- AM_RANGE( 0x90, 0x90) AM_DEVREADWRITE_LEGACY("centronics", msx_printer_status_r, msx_printer_strobe_w)
- AM_RANGE( 0x91, 0x91) AM_DEVWRITE_LEGACY("centronics", msx_printer_data_w)
- AM_RANGE( 0xa0, 0xa7) AM_DEVREADWRITE_LEGACY("ay8910", ay8910_r, msx_ay8910_w)
+ AM_RANGE( 0x90, 0x90) AM_READWRITE(msx_printer_status_r, msx_printer_strobe_w)
+ AM_RANGE( 0x91, 0x91) AM_WRITE(msx_printer_data_w)
+ AM_RANGE( 0xa0, 0xa7) AM_DEVREAD_LEGACY("ay8910", ay8910_r) AM_WRITE(msx_ay8910_w)
AM_RANGE( 0xa8, 0xab) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE( 0x98, 0x98) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write)
AM_RANGE( 0x99, 0x99) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write)
@@ -370,9 +371,9 @@ static ADDRESS_MAP_START ( msx2_io_map, AS_IO, 8, msx_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE( 0x77, 0x77) AM_WRITE(msx_90in1_w)
AM_RANGE( 0x7c, 0x7d) AM_WRITE(msx_fmpac_w)
- AM_RANGE( 0x90, 0x90) AM_DEVREADWRITE_LEGACY("centronics", msx_printer_status_r, msx_printer_strobe_w)
- AM_RANGE( 0x91, 0x91) AM_DEVWRITE_LEGACY("centronics", msx_printer_data_w)
- AM_RANGE( 0xa0, 0xa7) AM_DEVREADWRITE_LEGACY("ay8910", ay8910_r, msx_ay8910_w)
+ AM_RANGE( 0x90, 0x90) AM_READWRITE(msx_printer_status_r, msx_printer_strobe_w)
+ AM_RANGE( 0x91, 0x91) AM_WRITE(msx_printer_data_w)
+ AM_RANGE( 0xa0, 0xa7) AM_DEVREAD_LEGACY("ay8910", ay8910_r) AM_WRITE(msx_ay8910_w)
AM_RANGE( 0xa8, 0xab) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE( 0x98, 0x9b) AM_DEVREADWRITE("v9938", v9938_device, read, write)
AM_RANGE( 0xb4, 0xb4) AM_WRITE(msx_rtc_latch_w)
diff --git a/src/mess/drivers/mtx.c b/src/mess/drivers/mtx.c
index 2cbcbcdb06f..fc39b4105c1 100644
--- a/src/mess/drivers/mtx.c
+++ b/src/mess/drivers/mtx.c
@@ -56,11 +56,11 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( mtx_io, AS_IO, 8, mtx_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_DEVREAD_LEGACY(CENTRONICS_TAG, mtx_strobe_r) AM_WRITE(mtx_bankswitch_w)
+ AM_RANGE(0x00, 0x00) AM_READWRITE(mtx_strobe_r, mtx_bankswitch_w)
AM_RANGE(0x01, 0x01) AM_DEVREADWRITE("tms9929a", tms9929a_device, vram_read, vram_write)
AM_RANGE(0x02, 0x02) AM_DEVREADWRITE("tms9929a", tms9929a_device, register_read, register_write)
- AM_RANGE(0x03, 0x03) AM_READ(mtx_sound_strobe_r) AM_DEVWRITE_LEGACY(CASSETTE_TAG, mtx_cst_w)
- AM_RANGE(0x04, 0x04) AM_DEVREAD_LEGACY(CENTRONICS_TAG, mtx_prt_r)
+ AM_RANGE(0x03, 0x03) AM_READWRITE(mtx_sound_strobe_r, mtx_cst_w)
+ AM_RANGE(0x04, 0x04) AM_READ(mtx_prt_r)
AM_RANGE(0x04, 0x04) AM_DEVWRITE(CENTRONICS_TAG, centronics_device, write)
AM_RANGE(0x05, 0x05) AM_READWRITE(mtx_key_lo_r, mtx_sense_w)
AM_RANGE(0x06, 0x06) AM_READWRITE(mtx_key_hi_r, mtx_sound_latch_w)
@@ -218,24 +218,20 @@ TIMER_DEVICE_CALLBACK_MEMBER(mtx_state::ctc_tick)
m_z80ctc->trg2(0);
}
-static WRITE_LINE_DEVICE_HANDLER( ctc_trg1_w )
+WRITE_LINE_MEMBER(mtx_state::ctc_trg1_w)
{
- mtx_state *driver_state = device->machine().driver_data<mtx_state>();
-
- if (driver_state->m_z80dart != NULL)
+ if (m_z80dart != NULL)
{
- z80dart_rxca_w(driver_state->m_z80dart, state);
- z80dart_txca_w(driver_state->m_z80dart, state);
+ z80dart_rxca_w(m_z80dart, state);
+ z80dart_txca_w(m_z80dart, state);
}
}
-static WRITE_LINE_DEVICE_HANDLER( ctc_trg2_w )
+WRITE_LINE_MEMBER(mtx_state::ctc_trg2_w)
{
- mtx_state *driver_state = device->machine().driver_data<mtx_state>();
-
- if (driver_state->m_z80dart != NULL)
+ if (m_z80dart != NULL)
{
- z80dart_rxtxcb_w(driver_state->m_z80dart, state);
+ z80dart_rxtxcb_w(m_z80dart, state);
}
}
@@ -243,8 +239,8 @@ static Z80CTC_INTERFACE( ctc_intf )
{
DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),
DEVCB_NULL,
- DEVCB_LINE(ctc_trg1_w),
- DEVCB_LINE(ctc_trg2_w)
+ DEVCB_DRIVER_LINE_MEMBER(mtx_state,ctc_trg1_w),
+ DEVCB_DRIVER_LINE_MEMBER(mtx_state,ctc_trg2_w)
};
/*-------------------------------------------------
@@ -320,18 +316,16 @@ static const cassette_interface mtx_cassette_interface =
mtx_tms9928a_interface
-------------------------------------------------*/
-static WRITE_LINE_DEVICE_HANDLER(mtx_tms9929a_interrupt)
+WRITE_LINE_MEMBER(mtx_state::mtx_tms9929a_interrupt)
{
- mtx_state *drv_state = device->machine().driver_data<mtx_state>();
-
- drv_state->m_z80ctc->trg0(state ? 0 : 1);
+ m_z80ctc->trg0(state ? 0 : 1);
}
static TMS9928A_INTERFACE(mtx_tms9928a_interface)
{
"screen",
0x4000,
- DEVCB_LINE(mtx_tms9929a_interrupt)
+ DEVCB_DRIVER_LINE_MEMBER(mtx_state,mtx_tms9929a_interrupt)
};
/*-------------------------------------------------
diff --git a/src/mess/drivers/nascom1.c b/src/mess/drivers/nascom1.c
index 02c984788cd..2aa5282e326 100644
--- a/src/mess/drivers/nascom1.c
+++ b/src/mess/drivers/nascom1.c
@@ -257,8 +257,8 @@ static const ay31015_config nascom1_ay31015_config =
AY_3_1015,
( XTAL_16MHz / 16 ) / 256,
( XTAL_16MHz / 16 ) / 256,
- DEVCB_HANDLER(nascom1_hd6402_si),
- DEVCB_HANDLER(nascom1_hd6402_so),
+ DEVCB_DRIVER_MEMBER(nascom1_state, nascom1_hd6402_si),
+ DEVCB_DRIVER_MEMBER(nascom1_state, nascom1_hd6402_so),
DEVCB_NULL
};
diff --git a/src/mess/drivers/nc.c b/src/mess/drivers/nc.c
index 2bcdfb25aca..dd4081e7b34 100644
--- a/src/mess/drivers/nc.c
+++ b/src/mess/drivers/nc.c
@@ -837,50 +837,48 @@ WRITE8_MEMBER(nc_state::nc100_uart_control_w)
}
-static WRITE_LINE_DEVICE_HANDLER(nc100_tc8521_alarm_callback)
+WRITE_LINE_MEMBER(nc_state::nc100_tc8521_alarm_callback)
{
// TODO
}
-static WRITE_LINE_DEVICE_HANDLER( nc100_txrdy_callback )
+WRITE_LINE_MEMBER(nc_state::nc100_txrdy_callback)
{
- nc_state *drvstate = device->machine().driver_data<nc_state>();
- drvstate->m_irq_latch &= ~(1 << 1);
+ m_irq_latch &= ~(1 << 1);
/* uart on? */
- if ((drvstate->m_uart_control & (1 << 3)) == 0)
+ if ((m_uart_control & (1 << 3)) == 0)
{
if (state)
{
logerror("tx ready\n");
- drvstate->m_irq_latch |= (1 << 1);
+ m_irq_latch |= (1 << 1);
}
}
- nc_update_interrupts(device->machine());
+ nc_update_interrupts(machine());
}
-static WRITE_LINE_DEVICE_HANDLER( nc100_rxrdy_callback )
+WRITE_LINE_MEMBER(nc_state::nc100_rxrdy_callback)
{
- nc_state *drvstate = device->machine().driver_data<nc_state>();
- drvstate->m_irq_latch &= ~(1<<0);
+ m_irq_latch &= ~(1<<0);
- if ((drvstate->m_uart_control & (1<<3))==0)
+ if ((m_uart_control & (1<<3))==0)
{
if (state)
{
logerror("rx ready\n");
- drvstate->m_irq_latch |= (1<<0);
+ m_irq_latch |= (1<<0);
}
}
- nc_update_interrupts(device->machine());
+ nc_update_interrupts(machine());
}
static RP5C01_INTERFACE( rtc_intf )
{
- DEVCB_LINE(nc100_tc8521_alarm_callback)
+ DEVCB_DRIVER_LINE_MEMBER(nc_state,nc100_tc8521_alarm_callback)
};
static const i8251_interface nc100_uart_interface =
@@ -890,28 +888,27 @@ static const i8251_interface nc100_uart_interface =
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
- DEVCB_LINE(nc100_rxrdy_callback),
- DEVCB_LINE(nc100_txrdy_callback),
+ DEVCB_DRIVER_LINE_MEMBER(nc_state,nc100_rxrdy_callback),
+ DEVCB_DRIVER_LINE_MEMBER(nc_state,nc100_txrdy_callback),
DEVCB_NULL,
DEVCB_NULL
};
-static WRITE_LINE_DEVICE_HANDLER( nc100_centronics_ack_w )
+WRITE_LINE_MEMBER(nc_state::nc100_centronics_ack_w)
{
- nc_state *drvstate = device->machine().driver_data<nc_state>();
if (state)
- drvstate->m_irq_status |= 0x04;
+ m_irq_status |= 0x04;
else
- drvstate->m_irq_status &= ~0x04;
+ m_irq_status &= ~0x04;
/* trigger an int if the irq is set */
- nc_update_interrupts(device->machine());
+ nc_update_interrupts(machine());
}
static const centronics_interface nc100_centronics_config =
{
- DEVCB_LINE(nc100_centronics_ack_w),
+ DEVCB_DRIVER_LINE_MEMBER(nc_state,nc100_centronics_ack_w),
DEVCB_NULL,
DEVCB_NULL
};
@@ -1183,21 +1180,20 @@ WRITE8_MEMBER(nc_state::nc200_display_memory_start_w)
#endif
-static WRITE_LINE_DEVICE_HANDLER( nc200_centronics_ack_w )
+WRITE_LINE_MEMBER(nc_state::nc200_centronics_ack_w)
{
- nc_state *drvstate = device->machine().driver_data<nc_state>();
if (state)
- drvstate->m_irq_status |= 0x01;
+ m_irq_status |= 0x01;
else
- drvstate->m_irq_status &= ~0x01;
+ m_irq_status &= ~0x01;
/* trigger an int if the irq is set */
- nc_update_interrupts(device->machine());
+ nc_update_interrupts(machine());
}
static const centronics_interface nc200_centronics_config =
{
- DEVCB_LINE(nc200_centronics_ack_w),
+ DEVCB_DRIVER_LINE_MEMBER(nc_state,nc200_centronics_ack_w),
DEVCB_NULL,
DEVCB_NULL
};
@@ -1222,30 +1218,29 @@ static void nc200_refresh_uart_interrupt(running_machine &machine)
nc_update_interrupts(machine);
}
-static WRITE_LINE_DEVICE_HANDLER( nc200_txrdy_callback )
+WRITE_LINE_MEMBER(nc_state::nc200_txrdy_callback)
{
- //nc_state *drvstate = machine.driver_data<nc_state>();
-// drvstate->m_nc200_uart_interrupt_irq &=~(1<<0);
+ //nc_state *drvstate = machine().driver_data<nc_state>();
+// m_nc200_uart_interrupt_irq &=~(1<<0);
//
// if (state)
// {
-// drvstate->m_nc200_uart_interrupt_irq |=(1<<0);
+// m_nc200_uart_interrupt_irq |=(1<<0);
// }
//
-// nc200_refresh_uart_interrupt(device->machine());
+// nc200_refresh_uart_interrupt(machine());
}
-static WRITE_LINE_DEVICE_HANDLER( nc200_rxrdy_callback )
+WRITE_LINE_MEMBER(nc_state::nc200_rxrdy_callback)
{
- nc_state *drvstate = device->machine().driver_data<nc_state>();
- drvstate->m_nc200_uart_interrupt_irq &=~(1<<1);
+ m_nc200_uart_interrupt_irq &=~(1<<1);
if (state)
{
- drvstate->m_nc200_uart_interrupt_irq |=(1<<1);
+ m_nc200_uart_interrupt_irq |=(1<<1);
}
- nc200_refresh_uart_interrupt(device->machine());
+ nc200_refresh_uart_interrupt(machine());
}
static const i8251_interface nc200_uart_interface=
@@ -1255,37 +1250,36 @@ static const i8251_interface nc200_uart_interface=
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
- DEVCB_LINE(nc200_rxrdy_callback),
- DEVCB_LINE(nc200_txrdy_callback),
+ DEVCB_DRIVER_LINE_MEMBER(nc_state,nc200_rxrdy_callback),
+ DEVCB_DRIVER_LINE_MEMBER(nc_state,nc200_txrdy_callback),
DEVCB_NULL,
DEVCB_NULL
};
-static WRITE_LINE_DEVICE_HANDLER( nc200_fdc_interrupt )
+WRITE_LINE_MEMBER(nc_state::nc200_fdc_interrupt)
{
- nc_state *drvstate = device->machine().driver_data<nc_state>();
#if 0
- drvstate->m_irq_latch &=~(1<<5);
+ m_irq_latch &=~(1<<5);
if (state)
{
- drvstate->m_irq_latch |=(1<<5);
+ m_irq_latch |=(1<<5);
}
#endif
- drvstate->m_irq_status &=~(1<<5);
+ m_irq_status &=~(1<<5);
if (state)
{
- drvstate->m_irq_status |=(1<<5);
+ m_irq_status |=(1<<5);
}
- nc_update_interrupts(device->machine());
+ nc_update_interrupts(machine());
}
static const upd765_interface nc200_upd765_interface=
{
- DEVCB_LINE(nc200_fdc_interrupt),
+ DEVCB_DRIVER_LINE_MEMBER(nc_state,nc200_fdc_interrupt),
DEVCB_NULL,
NULL,
UPD765_RDY_PIN_CONNECTED,
diff --git a/src/mess/drivers/nes.c b/src/mess/drivers/nes.c
index faf67ca1a21..edbec655ce3 100644
--- a/src/mess/drivers/nes.c
+++ b/src/mess/drivers/nes.c
@@ -21,18 +21,21 @@
#include "formats/nes_dsk.h"
-static READ8_DEVICE_HANDLER( psg_4015_r )
+READ8_MEMBER(nes_state::psg_4015_r)
{
+ device_t *device = machine().device("nessound");
return nes_psg_r(device, space, 0x15);
}
-static WRITE8_DEVICE_HANDLER( psg_4015_w )
+WRITE8_MEMBER(nes_state::psg_4015_w)
{
+ device_t *device = machine().device("nessound");
nes_psg_w(device, space, 0x15, data);
}
-static WRITE8_DEVICE_HANDLER( psg_4017_w )
+WRITE8_MEMBER(nes_state::psg_4017_w)
{
+ device_t *device = machine().device("nessound");
nes_psg_w(device, space, 0x17, data);
}
@@ -46,10 +49,10 @@ static ADDRESS_MAP_START( nes_map, AS_PROGRAM, 8, nes_state )
AM_RANGE(0x2000, 0x3fff) AM_DEVREADWRITE("ppu", ppu2c0x_device, read, write) /* PPU registers */
AM_RANGE(0x4000, 0x4013) AM_DEVREADWRITE_LEGACY("nessound", nes_psg_r, nes_psg_w) /* PSG primary registers */
AM_RANGE(0x4014, 0x4014) AM_WRITE(nes_vh_sprite_dma_w) /* stupid address space hole */
- AM_RANGE(0x4015, 0x4015) AM_DEVREADWRITE_LEGACY("nessound", psg_4015_r, psg_4015_w) /* PSG status / first control register */
+ AM_RANGE(0x4015, 0x4015) AM_READWRITE(psg_4015_r, psg_4015_w) /* PSG status / first control register */
AM_RANGE(0x4016, 0x4016) AM_READWRITE(nes_IN0_r, nes_IN0_w) /* IN0 - input port 1 */
AM_RANGE(0x4017, 0x4017) AM_READ(nes_IN1_r) /* IN1 - input port 2 */
- AM_RANGE(0x4017, 0x4017) AM_DEVWRITE_LEGACY("nessound", psg_4017_w) /* PSG second control register */
+ AM_RANGE(0x4017, 0x4017) AM_WRITE(psg_4017_w) /* PSG second control register */
AM_RANGE(0x4100, 0x5fff) AM_READWRITE(nes_low_mapper_r, nes_low_mapper_w) /* Perform unholy acts on the machine */
ADDRESS_MAP_END
diff --git a/src/mess/drivers/ob68k1a.c b/src/mess/drivers/ob68k1a.c
index 8b85dd1aa6e..55256852b54 100644
--- a/src/mess/drivers/ob68k1a.c
+++ b/src/mess/drivers/ob68k1a.c
@@ -251,8 +251,16 @@ static ACIA6850_INTERFACE( acia1_intf )
// COM8116_INTERFACE( dbrg_intf )
//-------------------------------------------------
-static WRITE_LINE_DEVICE_HANDLER( rx_tx_w )
+WRITE_LINE_MEMBER(ob68k1a_state::rx_tx_0_w)
{
+ device_t *device = machine().device(MC6850_0_TAG);
+ downcast<acia6850_device *>(device)->rx_clock_in();
+ downcast<acia6850_device *>(device)->tx_clock_in();
+}
+
+WRITE_LINE_MEMBER(ob68k1a_state::rx_tx_1_w)
+{
+ device_t *device = machine().device(MC6850_1_TAG);
downcast<acia6850_device *>(device)->rx_clock_in();
downcast<acia6850_device *>(device)->tx_clock_in();
}
@@ -260,8 +268,8 @@ static WRITE_LINE_DEVICE_HANDLER( rx_tx_w )
static COM8116_INTERFACE( dbrg_intf )
{
DEVCB_NULL, /* fX/4 output */
- DEVCB_DEVICE_LINE(MC6850_0_TAG, rx_tx_w),
- DEVCB_DEVICE_LINE(MC6850_1_TAG, rx_tx_w),
+ DEVCB_DRIVER_LINE_MEMBER(ob68k1a_state,rx_tx_0_w),
+ DEVCB_DRIVER_LINE_MEMBER(ob68k1a_state,rx_tx_1_w),
{ 101376, 67584, 46080, 37686, 33792, 16896, 8448, 4224, 2816, 2534, 2112, 1408, 1056, 704, 528, 264 }, /* receiver divisor ROM */
{ 101376, 67584, 46080, 37686, 33792, 16896, 8448, 4224, 2816, 2534, 2112, 1408, 1056, 704, 528, 264 }, /* transmitter divisor ROM */
};
diff --git a/src/mess/drivers/osi.c b/src/mess/drivers/osi.c
index 7f339d1c97f..95416f790d7 100644
--- a/src/mess/drivers/osi.c
+++ b/src/mess/drivers/osi.c
@@ -362,11 +362,9 @@ WRITE8_MEMBER( c1p_state::osi630_sound_w )
C011 ACIAIO DISK CONTROLLER ACIA I/O PORT
*/
-static WRITE_LINE_DEVICE_HANDLER(osi470_index_callback)
+WRITE_LINE_MEMBER(sb2m600_state::osi470_index_callback)
{
- sb2m600_state *driver_state = device->machine().driver_data<sb2m600_state>();
-
- driver_state->m_fdc_index = state;
+ m_fdc_index = state;
}
READ8_MEMBER( c1pmf_state::osi470_pia_pa_r )
@@ -741,7 +739,7 @@ LEGACY_FLOPPY_OPTIONS_END
static const floppy_interface osi_floppy_interface =
{
- DEVCB_LINE(osi470_index_callback),
+ DEVCB_DRIVER_LINE_MEMBER(sb2m600_state,osi470_index_callback),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/pc.c b/src/mess/drivers/pc.c
index 26a0804bfe3..b1ab0e98761 100644
--- a/src/mess/drivers/pc.c
+++ b/src/mess/drivers/pc.c
@@ -157,9 +157,9 @@ static ADDRESS_MAP_START(mc1502_io, AS_IO, 8, pc_state )
AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE_LEGACY("pit8253", pit8253_r, pit8253_w)
AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE(0x0068, 0x006B) AM_DEVREADWRITE("ppi8255n2", i8255_device, read, write) // keyboard poll
- AM_RANGE(0x0100, 0x0100) AM_DEVREADWRITE_LEGACY("vg93", mc1502_wd17xx_aux_r, mc1502_wd17xx_aux_w)
- AM_RANGE(0x0108, 0x0108) AM_DEVREAD_LEGACY("vg93", mc1502_wd17xx_drq_r) // blocking read!
- AM_RANGE(0x010a, 0x010a) AM_DEVREAD_LEGACY("vg93", mc1502_wd17xx_motor_r)
+ AM_RANGE(0x0100, 0x0100) AM_READWRITE(mc1502_wd17xx_aux_r, mc1502_wd17xx_aux_w)
+ AM_RANGE(0x0108, 0x0108) AM_READ(mc1502_wd17xx_drq_r) // blocking read!
+ AM_RANGE(0x010a, 0x010a) AM_READ(mc1502_wd17xx_motor_r)
AM_RANGE(0x010c, 0x010c) AM_DEVREADWRITE_LEGACY("vg93", wd17xx_status_r, wd17xx_command_w)
AM_RANGE(0x010d, 0x010d) AM_DEVREADWRITE_LEGACY("vg93", wd17xx_track_r, wd17xx_track_w)
AM_RANGE(0x010e, 0x010e) AM_DEVREADWRITE_LEGACY("vg93", wd17xx_sector_r, wd17xx_sector_w)
diff --git a/src/mess/drivers/pce.c b/src/mess/drivers/pce.c
index ebef609fd3b..9dc69a01209 100644
--- a/src/mess/drivers/pce.c
+++ b/src/mess/drivers/pce.c
@@ -501,16 +501,16 @@ UINT32 pce_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
}
-static WRITE_LINE_DEVICE_HANDLER( pce_irq_changed )
+WRITE_LINE_MEMBER(pce_state::pce_irq_changed)
{
- device->machine().device("maincpu")->execute().set_input_line(0, state);
+ machine().device("maincpu")->execute().set_input_line(0, state);
}
static const huc6270_interface pce_huc6270_config =
{
0x10000,
- DEVCB_LINE(pce_irq_changed)
+ DEVCB_DRIVER_LINE_MEMBER(pce_state,pce_irq_changed)
};
@@ -527,14 +527,14 @@ static const huc6260_interface pce_huc6260_config =
static const huc6270_interface sgx_huc6270_0_config =
{
0x10000,
- DEVCB_LINE(pce_irq_changed)
+ DEVCB_DRIVER_LINE_MEMBER(pce_state,pce_irq_changed)
};
static const huc6270_interface sgx_huc6270_1_config =
{
0x10000,
- DEVCB_LINE(pce_irq_changed)
+ DEVCB_DRIVER_LINE_MEMBER(pce_state,pce_irq_changed)
};
diff --git a/src/mess/drivers/pcw.c b/src/mess/drivers/pcw.c
index eda727056c9..1ab88ccf826 100644
--- a/src/mess/drivers/pcw.c
+++ b/src/mess/drivers/pcw.c
@@ -113,7 +113,7 @@
static const UINT8 half_step_table[4] = { 0x01, 0x02, 0x04, 0x08 };
static const UINT8 full_step_table[4] = { 0x03, 0x06, 0x0c, 0x09 };
-static WRITE_LINE_DEVICE_HANDLER( pcw_fdc_interrupt );
+
static void pcw_update_interrupt_counter(pcw_state *state)
{
@@ -129,7 +129,7 @@ static void pcw_update_interrupt_counter(pcw_state *state)
/NMI depending on choice (see system control below) */
static const upd765_interface pcw_upd765_interface =
{
- DEVCB_LINE(pcw_fdc_interrupt),
+ DEVCB_DRIVER_LINE_MEMBER(pcw_state,pcw_fdc_interrupt),
DEVCB_NULL,
NULL,
UPD765_RDY_PIN_CONNECTED,
@@ -179,16 +179,15 @@ TIMER_DEVICE_CALLBACK_MEMBER(pcw_state::pcw_timer_interrupt)
}
/* fdc interrupt callback. set/clear fdc int */
-static WRITE_LINE_DEVICE_HANDLER( pcw_fdc_interrupt )
+WRITE_LINE_MEMBER(pcw_state::pcw_fdc_interrupt)
{
- pcw_state *drvstate = device->machine().driver_data<pcw_state>();
if (state == CLEAR_LINE)
- drvstate->m_system_status &= ~(1<<5);
+ m_system_status &= ~(1<<5);
else
{
- drvstate->m_system_status |= (1<<5);
- if(drvstate->m_fdc_interrupt_code == 0) // NMI is held until interrupt type is changed
- drvstate->m_nmi_flag = 1;
+ m_system_status |= (1<<5);
+ if(m_fdc_interrupt_code == 0) // NMI is held until interrupt type is changed
+ m_nmi_flag = 1;
}
}
diff --git a/src/mess/drivers/pcw16.c b/src/mess/drivers/pcw16.c
index 4e9688cdc3c..8d8b849d4ab 100644
--- a/src/mess/drivers/pcw16.c
+++ b/src/mess/drivers/pcw16.c
@@ -1312,54 +1312,52 @@ static const struct pc_fdc_interface pcw16_fdc_interface=
};
-static WRITE_LINE_DEVICE_HANDLER( pcw16_com_interrupt_1 )
+WRITE_LINE_MEMBER(pcw16_state::pcw16_com_interrupt_1)
{
- pcw16_state *drvstate = device->machine().driver_data<pcw16_state>();
- drvstate->m_system_status &= ~(1 << 4);
+ m_system_status &= ~(1 << 4);
if ( state ) {
- drvstate->m_system_status |= (1 << 4);
+ m_system_status |= (1 << 4);
}
- drvstate->pcw16_refresh_ints();
+ pcw16_refresh_ints();
}
-static WRITE_LINE_DEVICE_HANDLER( pcw16_com_interrupt_2 )
+WRITE_LINE_MEMBER(pcw16_state::pcw16_com_interrupt_2)
{
- pcw16_state *drvstate = device->machine().driver_data<pcw16_state>();
- drvstate->m_system_status &= ~(1 << 3);
+ m_system_status &= ~(1 << 3);
if ( state ) {
- drvstate->m_system_status |= (1 << 3);
+ m_system_status |= (1 << 3);
}
- drvstate->pcw16_refresh_ints();
+ pcw16_refresh_ints();
}
-static WRITE_LINE_DEVICE_HANDLER( pcw16_com_tx_0 ) { }
-static WRITE_LINE_DEVICE_HANDLER( pcw16_com_dtr_0 ) { }
-static WRITE_LINE_DEVICE_HANDLER( pcw16_com_rts_0 ) { }
+WRITE_LINE_MEMBER(pcw16_state::pcw16_com_tx_0){ }
+WRITE_LINE_MEMBER(pcw16_state::pcw16_com_dtr_0){ }
+WRITE_LINE_MEMBER(pcw16_state::pcw16_com_rts_0){ }
-static WRITE_LINE_DEVICE_HANDLER( pcw16_com_tx_1 ) { }
-static WRITE_LINE_DEVICE_HANDLER( pcw16_com_dtr_1 ) { }
-static WRITE_LINE_DEVICE_HANDLER( pcw16_com_rts_1 ) { }
+WRITE_LINE_MEMBER(pcw16_state::pcw16_com_tx_1){ }
+WRITE_LINE_MEMBER(pcw16_state::pcw16_com_dtr_1){ }
+WRITE_LINE_MEMBER(pcw16_state::pcw16_com_rts_1){ }
static const ins8250_interface pcw16_com_interface[2]=
{
{
- DEVCB_LINE(pcw16_com_tx_0),
- DEVCB_LINE(pcw16_com_dtr_0),
- DEVCB_LINE(pcw16_com_rts_0),
- DEVCB_LINE(pcw16_com_interrupt_1),
+ DEVCB_DRIVER_LINE_MEMBER(pcw16_state,pcw16_com_tx_0),
+ DEVCB_DRIVER_LINE_MEMBER(pcw16_state,pcw16_com_dtr_0),
+ DEVCB_DRIVER_LINE_MEMBER(pcw16_state,pcw16_com_rts_0),
+ DEVCB_DRIVER_LINE_MEMBER(pcw16_state,pcw16_com_interrupt_1),
DEVCB_NULL,
DEVCB_NULL
},
{
- DEVCB_LINE(pcw16_com_tx_1),
- DEVCB_LINE(pcw16_com_dtr_1),
- DEVCB_LINE(pcw16_com_rts_1),
- DEVCB_LINE(pcw16_com_interrupt_2),
+ DEVCB_DRIVER_LINE_MEMBER(pcw16_state,pcw16_com_tx_1),
+ DEVCB_DRIVER_LINE_MEMBER(pcw16_state,pcw16_com_dtr_1),
+ DEVCB_DRIVER_LINE_MEMBER(pcw16_state,pcw16_com_rts_1),
+ DEVCB_DRIVER_LINE_MEMBER(pcw16_state,pcw16_com_interrupt_2),
DEVCB_NULL,
DEVCB_NULL
}
diff --git a/src/mess/drivers/pes.c b/src/mess/drivers/pes.c
index dd6626eb48b..5da1291bcc5 100644
--- a/src/mess/drivers/pes.c
+++ b/src/mess/drivers/pes.c
@@ -65,14 +65,13 @@ Address map:
#include "machine/terminal.h"
/* Devices */
-static WRITE8_DEVICE_HANDLER( pes_kbd_input )
+WRITE8_MEMBER(pes_state::pes_kbd_input)
{
- pes_state *state = space.machine().driver_data<pes_state>();
#ifdef DEBUG_FIFO
fprintf(stderr,"keyboard input: %c, ", data);
#endif
// if fifo is full (head ptr = tail ptr-1), do not increment the head ptr and do not store the data
- if (((state->m_infifo_tail_ptr-1)&0x1F) == state->m_infifo_head_ptr)
+ if (((m_infifo_tail_ptr-1)&0x1F) == m_infifo_head_ptr)
{
logerror("infifo was full, write ignored!\n");
#ifdef DEBUG_FIFO
@@ -80,20 +79,20 @@ static WRITE8_DEVICE_HANDLER( pes_kbd_input )
#endif
return;
}
- state->m_infifo[state->m_infifo_head_ptr] = data;
- state->m_infifo_head_ptr++;
- state->m_infifo_head_ptr&=0x1F;
+ m_infifo[m_infifo_head_ptr] = data;
+ m_infifo_head_ptr++;
+ m_infifo_head_ptr&=0x1F;
#ifdef DEBUG_FIFO
- fprintf(stderr,"kb input fifo fullness: %d\n",(state->m_infifo_head_ptr-state->m_infifo_tail_ptr)&0x1F);
+ fprintf(stderr,"kb input fifo fullness: %d\n",(m_infifo_head_ptr-m_infifo_tail_ptr)&0x1F);
#endif
// todo: following two should be set so clear happens after one cpu cycle
- space.machine().device("maincpu")->execute().set_input_line(MCS51_RX_LINE, ASSERT_LINE);
- space.machine().device("maincpu")->execute().set_input_line(MCS51_RX_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(MCS51_RX_LINE, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(MCS51_RX_LINE, CLEAR_LINE);
}
static GENERIC_TERMINAL_INTERFACE( pes_terminal_intf )
{
- DEVCB_HANDLER(pes_kbd_input)
+ DEVCB_DRIVER_MEMBER(pes_state,pes_kbd_input)
};
/* Helper Functions */
diff --git a/src/mess/drivers/pet.c b/src/mess/drivers/pet.c
index 80993169de3..06f962ad31f 100644
--- a/src/mess/drivers/pet.c
+++ b/src/mess/drivers/pet.c
@@ -603,7 +603,7 @@ static const mc6845_interface crtc_pet40 = {
NULL,
pet40_update_row,
NULL,
- DEVCB_LINE(pet_display_enable_changed),
+ DEVCB_DRIVER_LINE_MEMBER(pet_state, pet_display_enable_changed),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
@@ -616,7 +616,7 @@ static const mc6845_interface crtc_pet80 = {
NULL,
pet80_update_row,
NULL,
- DEVCB_LINE(pet_display_enable_changed),
+ DEVCB_DRIVER_LINE_MEMBER(pet_state, pet_display_enable_changed),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/pokemini.c b/src/mess/drivers/pokemini.c
index f95cb29fdad..dc8cee62e13 100644
--- a/src/mess/drivers/pokemini.c
+++ b/src/mess/drivers/pokemini.c
@@ -13,7 +13,7 @@ The LCD is likely to be a SSD1828 LCD.
static ADDRESS_MAP_START( pokemini_mem_map, AS_PROGRAM, 8, pokemini_state )
AM_RANGE( 0x000000, 0x000FFF ) AM_ROM /* bios */
AM_RANGE( 0x001000, 0x001FFF ) AM_RAM AM_SHARE("p_ram") /* VRAM/RAM */
- AM_RANGE( 0x002000, 0x0020FF ) AM_DEVREADWRITE_LEGACY("i2cmem", pokemini_hwreg_r, pokemini_hwreg_w ) /* hardware registers */
+ AM_RANGE( 0x002000, 0x0020FF ) AM_READWRITE(pokemini_hwreg_r, pokemini_hwreg_w ) /* hardware registers */
AM_RANGE( 0x002100, 0x1FFFFF ) AM_ROM /* cartridge area */
ADDRESS_MAP_END
diff --git a/src/mess/drivers/portfoli.c b/src/mess/drivers/portfoli.c
index 278b42b785f..1a7bc38b5aa 100644
--- a/src/mess/drivers/portfoli.c
+++ b/src/mess/drivers/portfoli.c
@@ -649,10 +649,10 @@ void portfolio_state::palette_init()
// HD61830_INTERFACE( lcdc_intf )
//-------------------------------------------------
-static READ8_DEVICE_HANDLER( hd61830_rd_r )
+READ8_MEMBER(portfolio_state::hd61830_rd_r)
{
UINT16 address = ((offset & 0xff) << 3) | ((offset >> 12) & 0x07);
- UINT8 data = space.machine().root_device().memregion(HD61830_TAG)->base()[address];
+ UINT8 data = machine().root_device().memregion(HD61830_TAG)->base()[address];
return data;
}
@@ -660,7 +660,7 @@ static READ8_DEVICE_HANDLER( hd61830_rd_r )
static HD61830_INTERFACE( lcdc_intf )
{
SCREEN_TAG,
- DEVCB_HANDLER(hd61830_rd_r)
+ DEVCB_DRIVER_MEMBER(portfolio_state,hd61830_rd_r)
};
//-------------------------------------------------
diff --git a/src/mess/drivers/ql.c b/src/mess/drivers/ql.c
index 211542b7d44..6cecf9b48ea 100644
--- a/src/mess/drivers/ql.c
+++ b/src/mess/drivers/ql.c
@@ -364,22 +364,20 @@ void ql_state::sandy_set_control(UINT8 data)
}
}
-static READ_LINE_DEVICE_HANDLER( disk_io_dden_r )
+READ_LINE_MEMBER(ql_state::disk_io_dden_r)
{
- ql_state *state = device->machine().driver_data<ql_state>();
-
- if(state->m_disk_type==DISK_TYPE_SANDY)
- return ((state->m_disk_io_byte & SANDY_DDEN_MASK) >> SANDY_DDEN_SHIFT);
+ if(m_disk_type==DISK_TYPE_SANDY)
+ return ((m_disk_io_byte & SANDY_DDEN_MASK) >> SANDY_DDEN_SHIFT);
else
return 0;
}
-static WRITE_LINE_DEVICE_HANDLER( disk_io_intrq_w )
+WRITE_LINE_MEMBER(ql_state::disk_io_intrq_w)
{
//logerror("DiskIO:intrq = %d\n",state);
}
-static WRITE_LINE_DEVICE_HANDLER( disk_io_drq_w )
+WRITE_LINE_MEMBER(ql_state::disk_io_drq_w)
{
//logerror("DiskIO:drq = %d\n",state);
}
@@ -846,9 +844,9 @@ static const floppy_interface ql_floppy_interface =
wd17xx_interface ql_wd17xx_interface =
{
- DEVCB_LINE(disk_io_dden_r),
- DEVCB_LINE(disk_io_intrq_w),
- DEVCB_LINE(disk_io_drq_w),
+ DEVCB_DRIVER_LINE_MEMBER(ql_state,disk_io_dden_r),
+ DEVCB_DRIVER_LINE_MEMBER(ql_state,disk_io_intrq_w),
+ DEVCB_DRIVER_LINE_MEMBER(ql_state,disk_io_drq_w),
{FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
};
diff --git a/src/mess/drivers/rmnimbus.c b/src/mess/drivers/rmnimbus.c
index e1a58db6b1a..05ff69cf3c4 100644
--- a/src/mess/drivers/rmnimbus.c
+++ b/src/mess/drivers/rmnimbus.c
@@ -90,7 +90,7 @@ static const SCSICB_interface scsibus_config =
static const centronics_interface nimbus_centronics_config =
{
- DEVCB_DEVICE_LINE(VIA_TAG,nimbus_ack_w),
+ DEVCB_DRIVER_LINE_MEMBER(rmnimbus_state, nimbus_ack_w),
DEVCB_NULL,
DEVCB_NULL
};
diff --git a/src/mess/drivers/samcoupe.c b/src/mess/drivers/samcoupe.c
index 752e25a4af7..d3c95e80a18 100644
--- a/src/mess/drivers/samcoupe.c
+++ b/src/mess/drivers/samcoupe.c
@@ -265,27 +265,27 @@ READ8_MEMBER(samcoupe_state::samcoupe_attributes_r)
return m_attribute;
}
-static READ8_DEVICE_HANDLER( samcoupe_lpt1_busy_r )
+READ8_MEMBER(samcoupe_state::samcoupe_lpt1_busy_r)
{
- centronics_device *centronics = space.machine().device<centronics_device>("lpt1");
+ centronics_device *centronics = machine().device<centronics_device>("lpt1");
return centronics->busy_r();
}
-static WRITE8_DEVICE_HANDLER( samcoupe_lpt1_strobe_w )
+WRITE8_MEMBER(samcoupe_state::samcoupe_lpt1_strobe_w)
{
- centronics_device *centronics = space.machine().device<centronics_device>("lpt1");
+ centronics_device *centronics = machine().device<centronics_device>("lpt1");
centronics->strobe_w(data);
}
-static READ8_DEVICE_HANDLER( samcoupe_lpt2_busy_r )
+READ8_MEMBER(samcoupe_state::samcoupe_lpt2_busy_r)
{
- centronics_device *centronics = space.machine().device<centronics_device>("lpt2");
+ centronics_device *centronics = machine().device<centronics_device>("lpt2");
return centronics->busy_r();
}
-static WRITE8_DEVICE_HANDLER( samcoupe_lpt2_strobe_w )
+WRITE8_MEMBER(samcoupe_state::samcoupe_lpt2_strobe_w)
{
- centronics_device *centronics = space.machine().device<centronics_device>("lpt2");
+ centronics_device *centronics = machine().device<centronics_device>("lpt2");
centronics->strobe_w(data);
}
@@ -305,9 +305,9 @@ static ADDRESS_MAP_START( samcoupe_io, AS_IO, 8, samcoupe_state )
AM_RANGE(0x0080, 0x0081) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_WRITE(samcoupe_ext_mem_w)
AM_RANGE(0x00e0, 0x00e7) AM_MIRROR(0xff10) AM_MASK(0xffff) AM_READWRITE(samcoupe_disk_r, samcoupe_disk_w)
AM_RANGE(0x00e8, 0x00e8) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_DEVWRITE("lpt1", centronics_device, write)
- AM_RANGE(0x00e9, 0x00e9) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_DEVREADWRITE_LEGACY("lpt1", samcoupe_lpt1_busy_r, samcoupe_lpt1_strobe_w)
+ AM_RANGE(0x00e9, 0x00e9) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_lpt1_busy_r, samcoupe_lpt1_strobe_w)
AM_RANGE(0x00ea, 0x00ea) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_DEVWRITE("lpt2", centronics_device, write)
- AM_RANGE(0x00eb, 0x00eb) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_DEVREADWRITE_LEGACY("lpt2", samcoupe_lpt2_busy_r, samcoupe_lpt2_strobe_w)
+ AM_RANGE(0x00eb, 0x00eb) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_lpt2_busy_r, samcoupe_lpt2_strobe_w)
AM_RANGE(0x00f8, 0x00f8) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_pen_r, samcoupe_clut_w)
AM_RANGE(0x00f9, 0x00f9) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_status_r, samcoupe_line_int_w)
AM_RANGE(0x00fa, 0x00fa) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_lmpr_r, samcoupe_lmpr_w)
diff --git a/src/mess/drivers/sg1000.c b/src/mess/drivers/sg1000.c
index 1a0ccdffacf..30be7887b5d 100644
--- a/src/mess/drivers/sg1000.c
+++ b/src/mess/drivers/sg1000.c
@@ -517,16 +517,16 @@ INPUT_PORTS_END
TMS9928a_interface tms9928a_interface
-------------------------------------------------*/
-static WRITE_LINE_DEVICE_HANDLER(sg1000_vdp_interrupt)
+WRITE_LINE_MEMBER(sg1000_state::sg1000_vdp_interrupt)
{
- device->machine().device(Z80_TAG)->execute().set_input_line(INPUT_LINE_IRQ0, state);
+ machine().device(Z80_TAG)->execute().set_input_line(INPUT_LINE_IRQ0, state);
}
static TMS9928A_INTERFACE(sg1000_tms9918a_interface)
{
"screen",
0x4000,
- DEVCB_LINE(sg1000_vdp_interrupt)
+ DEVCB_DRIVER_LINE_MEMBER(sg1000_state,sg1000_vdp_interrupt)
};
/*-------------------------------------------------
@@ -984,11 +984,9 @@ LEGACY_FLOPPY_OPTIONS_END
sf7000_fdc_index_callback -
-------------------------------------------------*/
-static WRITE_LINE_DEVICE_HANDLER(sf7000_fdc_index_callback)
+WRITE_LINE_MEMBER(sf7000_state::sf7000_fdc_index_callback)
{
- sf7000_state *driver_state = device->machine().driver_data<sf7000_state>();
-
- driver_state->m_fdc_index = state;
+ m_fdc_index = state;
}
/*-------------------------------------------------
@@ -997,7 +995,7 @@ static WRITE_LINE_DEVICE_HANDLER(sf7000_fdc_index_callback)
static const floppy_interface sf7000_floppy_interface =
{
- DEVCB_LINE(sf7000_fdc_index_callback),
+ DEVCB_DRIVER_LINE_MEMBER(sf7000_state,sf7000_fdc_index_callback),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/sms.c b/src/mess/drivers/sms.c
index 9d2aad4b491..0e6e023349e 100644
--- a/src/mess/drivers/sms.c
+++ b/src/mess/drivers/sms.c
@@ -306,33 +306,33 @@ static INPUT_PORTS_START( gg )
INPUT_PORTS_END
-static WRITE_LINE_DEVICE_HANDLER( sms_int_callback )
+WRITE_LINE_MEMBER(sms_state::sms_int_callback)
{
- device->machine().device("maincpu")->execute().set_input_line(0, state);
+ machine().device("maincpu")->execute().set_input_line(0, state);
}
static const sega315_5124_interface _315_5124_ntsc_intf =
{
false,
"screen",
- DEVCB_LINE(sms_int_callback),
- DEVCB_LINE(sms_pause_callback)
+ DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_int_callback),
+ DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_pause_callback)
};
static const sega315_5124_interface _315_5124_pal_intf =
{
true,
"screen",
- DEVCB_LINE(sms_int_callback),
- DEVCB_LINE(sms_pause_callback)
+ DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_int_callback),
+ DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_pause_callback)
};
static const sega315_5124_interface sms_store_intf =
{
false,
"screen",
- DEVCB_LINE(sms_store_int_callback),
- DEVCB_LINE(sms_pause_callback)
+ DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_store_int_callback),
+ DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_pause_callback)
};
diff --git a/src/mess/drivers/ssystem3.c b/src/mess/drivers/ssystem3.c
index b51589b8c75..06c9a3a408c 100644
--- a/src/mess/drivers/ssystem3.c
+++ b/src/mess/drivers/ssystem3.c
@@ -117,51 +117,49 @@ static void ssystem3_playfield_read(running_machine &machine, int *on, int *read
*ready=FALSE;
}
-static WRITE8_DEVICE_HANDLER(ssystem3_via_write_a)
+WRITE8_MEMBER(ssystem3_state::ssystem3_via_write_a)
{
- ssystem3_state *state = space.machine().driver_data<ssystem3_state>();
- state->m_porta=data;
+ m_porta=data;
// logerror("%.4x via port a write %02x\n",(int)activecpu_get_pc(), data);
}
-static READ8_DEVICE_HANDLER(ssystem3_via_read_a)
+READ8_MEMBER(ssystem3_state::ssystem3_via_read_a)
{
- ssystem3_state *state = space.machine().driver_data<ssystem3_state>();
UINT8 data=0xff;
#if 1 // time switch
- if (!(state->m_porta&0x10)) data&=space.machine().root_device().ioport("matrix1")->read()|0xf1;
- if (!(state->m_porta&0x20)) data&=space.machine().root_device().ioport("matrix2")->read()|0xf1;
- if (!(state->m_porta&0x40)) data&=space.machine().root_device().ioport("matrix3")->read()|0xf1;
- if (!(state->m_porta&0x80)) data&=space.machine().root_device().ioport("matrix4")->read()|0xf1;
+ if (!(m_porta&0x10)) data&=machine().root_device().ioport("matrix1")->read()|0xf1;
+ if (!(m_porta&0x20)) data&=machine().root_device().ioport("matrix2")->read()|0xf1;
+ if (!(m_porta&0x40)) data&=machine().root_device().ioport("matrix3")->read()|0xf1;
+ if (!(m_porta&0x80)) data&=machine().root_device().ioport("matrix4")->read()|0xf1;
#else
- if (!(state->m_porta&0x10)) data&=space.machine().root_device().ioport("matrix1")->read()|0xf0;
- if (!(state->m_porta&0x20)) data&=space.machine().root_device().ioport("matrix2")->read()|0xf0;
- if (!(state->m_porta&0x40)) data&=space.machine().root_device().ioport("matrix3")->read()|0xf0;
- if (!(state->m_porta&0x80)) data&=space.machine().root_device().ioport("matrix4")->read()|0xf0;
+ if (!(m_porta&0x10)) data&=machine().root_device().ioport("matrix1")->read()|0xf0;
+ if (!(m_porta&0x20)) data&=machine().root_device().ioport("matrix2")->read()|0xf0;
+ if (!(m_porta&0x40)) data&=machine().root_device().ioport("matrix3")->read()|0xf0;
+ if (!(m_porta&0x80)) data&=machine().root_device().ioport("matrix4")->read()|0xf0;
#endif
- if (!(state->m_porta&1)) {
- if (!(space.machine().root_device().ioport("matrix1")->read()&1)) data&=~0x10;
- if (!(space.machine().root_device().ioport("matrix2")->read()&1)) data&=~0x20;
- if (!(space.machine().root_device().ioport("matrix3")->read()&1)) data&=~0x40;
- if (!(state->ioport("matrix4")->read()&1)) data&=~0x80;
+ if (!(m_porta&1)) {
+ if (!(machine().root_device().ioport("matrix1")->read()&1)) data&=~0x10;
+ if (!(machine().root_device().ioport("matrix2")->read()&1)) data&=~0x20;
+ if (!(machine().root_device().ioport("matrix3")->read()&1)) data&=~0x40;
+ if (!(ioport("matrix4")->read()&1)) data&=~0x80;
}
- if (!(state->m_porta&2)) {
- if (!(space.machine().root_device().ioport("matrix1")->read()&2)) data&=~0x10;
- if (!(space.machine().root_device().ioport("matrix2")->read()&2)) data&=~0x20;
- if (!(space.machine().root_device().ioport("matrix3")->read()&2)) data&=~0x40;
- if (!(space.machine().root_device().ioport("matrix4")->read()&2)) data&=~0x80;
+ if (!(m_porta&2)) {
+ if (!(machine().root_device().ioport("matrix1")->read()&2)) data&=~0x10;
+ if (!(machine().root_device().ioport("matrix2")->read()&2)) data&=~0x20;
+ if (!(machine().root_device().ioport("matrix3")->read()&2)) data&=~0x40;
+ if (!(machine().root_device().ioport("matrix4")->read()&2)) data&=~0x80;
}
- if (!(state->m_porta&4)) {
- if (!(space.machine().root_device().ioport("matrix1")->read()&4)) data&=~0x10;
- if (!(space.machine().root_device().ioport("matrix2")->read()&4)) data&=~0x20;
- if (!(space.machine().root_device().ioport("matrix3")->read()&4)) data&=~0x40;
- if (!(space.machine().root_device().ioport("matrix4")->read()&4)) data&=~0x80;
+ if (!(m_porta&4)) {
+ if (!(machine().root_device().ioport("matrix1")->read()&4)) data&=~0x10;
+ if (!(machine().root_device().ioport("matrix2")->read()&4)) data&=~0x20;
+ if (!(machine().root_device().ioport("matrix3")->read()&4)) data&=~0x40;
+ if (!(machine().root_device().ioport("matrix4")->read()&4)) data&=~0x80;
}
- if (!(state->m_porta&8)) {
- if (!(space.machine().root_device().ioport("matrix1")->read()&8)) data&=~0x10;
- if (!(space.machine().root_device().ioport("matrix2")->read()&8)) data&=~0x20;
- if (!(space.machine().root_device().ioport("matrix3")->read()&8)) data&=~0x40;
- if (!(space.machine().root_device().ioport("matrix4")->read()&8)) data&=~0x80;
+ if (!(m_porta&8)) {
+ if (!(machine().root_device().ioport("matrix1")->read()&8)) data&=~0x10;
+ if (!(machine().root_device().ioport("matrix2")->read()&8)) data&=~0x20;
+ if (!(machine().root_device().ioport("matrix3")->read()&8)) data&=~0x40;
+ if (!(machine().root_device().ioport("matrix4")->read()&8)) data&=~0x80;
}
// logerror("%.4x via port a read %02x\n",(int)activecpu_get_pc(), data);
return data;
@@ -189,25 +187,25 @@ static READ8_DEVICE_HANDLER(ssystem3_via_read_a)
bit 5: input low x/$37 4 (else 1)
*/
-static READ8_DEVICE_HANDLER(ssystem3_via_read_b)
+READ8_MEMBER(ssystem3_state::ssystem3_via_read_b)
{
UINT8 data=0xff;
int on, ready;
- ssystem3_playfield_read(space.machine(), &on, &ready);
+ ssystem3_playfield_read(machine(), &on, &ready);
if (!on) data&=~0x20;
if (!ready) data&=~0x10;
return data;
}
-static WRITE8_DEVICE_HANDLER(ssystem3_via_write_b)
+WRITE8_MEMBER(ssystem3_state::ssystem3_via_write_b)
{
- via6522_device *via_0 = space.machine().device<via6522_device>("via6522_0");
+ via6522_device *via_0 = machine().device<via6522_device>("via6522_0");
UINT8 d;
- ssystem3_playfield_write(space.machine(), data&1, data&8);
- ssystem3_lcd_write(space.machine(), data&4, data&2);
+ ssystem3_playfield_write(machine(), data&1, data&8);
+ ssystem3_lcd_write(machine(), data&4, data&2);
- d=ssystem3_via_read_b(via_0, space, 0, mem_mask)&~0x40;
+ d=ssystem3_via_read_b(space, 0, mem_mask)&~0x40;
if (data&0x80) d|=0x40;
// d&=~0x8f;
via_0->write_portb(space,0, d );
@@ -215,14 +213,14 @@ static WRITE8_DEVICE_HANDLER(ssystem3_via_write_b)
static const via6522_interface ssystem3_via_config=
{
- DEVCB_HANDLER(ssystem3_via_read_a),//read8_machine_func in_a_func;
- DEVCB_HANDLER(ssystem3_via_read_b),//read8_machine_func in_b_func;
+ DEVCB_DRIVER_MEMBER(ssystem3_state,ssystem3_via_read_a),//read8_machine_func in_a_func;
+ DEVCB_DRIVER_MEMBER(ssystem3_state,ssystem3_via_read_b),//read8_machine_func in_b_func;
DEVCB_NULL,//read8_machine_func in_ca1_func;
DEVCB_NULL,//read8_machine_func in_cb1_func;
DEVCB_NULL,//read8_machine_func in_ca2_func;
DEVCB_NULL,//read8_machine_func in_cb2_func;
- DEVCB_HANDLER(ssystem3_via_write_a),//write8_machine_func out_a_func;
- DEVCB_HANDLER(ssystem3_via_write_b),//write8_machine_func out_b_func;
+ DEVCB_DRIVER_MEMBER(ssystem3_state,ssystem3_via_write_a),//write8_machine_func out_a_func;
+ DEVCB_DRIVER_MEMBER(ssystem3_state,ssystem3_via_write_b),//write8_machine_func out_b_func;
DEVCB_NULL,//write8_machine_func out_ca2_func;
DEVCB_NULL,//write8_machine_func out_cb2_func;
DEVCB_NULL,//void (*irq_func)(int state);
diff --git a/src/mess/drivers/super6.c b/src/mess/drivers/super6.c
index b23c591590c..eb2abf3f405 100644
--- a/src/mess/drivers/super6.c
+++ b/src/mess/drivers/super6.c
@@ -509,14 +509,14 @@ static const z80_daisy_config super6_daisy_chain[] =
// GENERIC_TERMINAL_INTERFACE( terminal_intf )
//-------------------------------------------------
-static WRITE8_DEVICE_HANDLER( dummy_w )
+WRITE8_MEMBER(super6_state::dummy_w)
{
// handled in Z80DART_INTERFACE
}
static GENERIC_TERMINAL_INTERFACE( terminal_intf )
{
- DEVCB_HANDLER(dummy_w)
+ DEVCB_DRIVER_MEMBER(super6_state,dummy_w)
};
diff --git a/src/mess/drivers/svi318.c b/src/mess/drivers/svi318.c
index c526e8eb474..881e9a8bc68 100644
--- a/src/mess/drivers/svi318.c
+++ b/src/mess/drivers/svi318.c
@@ -260,16 +260,16 @@ static const ay8910_interface svi318_ay8910_interface =
DEVCB_DRIVER_MEMBER(svi318_state, svi318_psg_port_b_w)
};
-static WRITE_LINE_DEVICE_HANDLER(vdp_interrupt)
+WRITE_LINE_MEMBER(svi318_state::vdp_interrupt)
{
- device->machine().device("maincpu")->execute().set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
+ machine().device("maincpu")->execute().set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
}
static TMS9928A_INTERFACE(svi318_tms9928a_interface)
{
"screen",
0x4000,
- DEVCB_LINE(vdp_interrupt)
+ DEVCB_DRIVER_LINE_MEMBER(svi318_state,vdp_interrupt)
};
static const cassette_interface svi318_cassette_interface =
diff --git a/src/mess/drivers/tandy2k.c b/src/mess/drivers/tandy2k.c
index b8d4245e732..7fdde5e0b7a 100644
--- a/src/mess/drivers/tandy2k.c
+++ b/src/mess/drivers/tandy2k.c
@@ -195,16 +195,18 @@ WRITE16_MEMBER( tandy2k_state::vpac_w )
}
}
-static READ8_DEVICE_HANDLER( fldtc_r )
+READ8_MEMBER(tandy2k_state::fldtc_r)
{
+ device_t *device = machine().device("AM_RANGE(0x00004, 0x00005) AM_READWRITE8(I8272A_TAG, fldtc_r, fldtc_w, 0x00ff)");
upd765_tc_w(device, 1);
upd765_tc_w(device, 0);
return 0;
}
-static WRITE8_DEVICE_HANDLER( fldtc_w )
+WRITE8_MEMBER(tandy2k_state::fldtc_w)
{
+ device_t *device = machine().device(I8272A_TAG);
upd765_tc_w(device, 1);
upd765_tc_w(device, 0);
}
@@ -269,7 +271,7 @@ static ADDRESS_MAP_START( tandy2k_io, AS_IO, 16, tandy2k_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00000, 0x00001) AM_READWRITE8(enable_r, enable_w, 0x00ff)
AM_RANGE(0x00002, 0x00003) AM_WRITE8(dma_mux_w, 0x00ff)
- AM_RANGE(0x00004, 0x00005) AM_DEVREADWRITE8_LEGACY(I8272A_TAG, fldtc_r, fldtc_w, 0x00ff)
+ AM_RANGE(0x00004, 0x00005) AM_READWRITE8(fldtc_r, fldtc_w, 0x00ff)
AM_RANGE(0x00010, 0x00013) AM_DEVREADWRITE8(I8251A_TAG, i8251_device, data_r, data_w, 0x00ff)
AM_RANGE(0x00030, 0x00031) AM_DEVREAD8_LEGACY(I8272A_TAG, upd765_status_r, 0x00ff)
AM_RANGE(0x00032, 0x00033) AM_DEVREADWRITE8_LEGACY(I8272A_TAG, upd765_data_r, upd765_data_w, 0x00ff)
diff --git a/src/mess/drivers/tsispch.c b/src/mess/drivers/tsispch.c
index 8510638c00e..99236431beb 100644
--- a/src/mess/drivers/tsispch.c
+++ b/src/mess/drivers/tsispch.c
@@ -127,19 +127,19 @@ static NECDSP_INTERFACE( upd7720_config )
/*****************************************************************************
USART 8251 and Terminal stuff
*****************************************************************************/
-static WRITE_LINE_DEVICE_HANDLER( i8251_rxrdy_int )
+WRITE_LINE_MEMBER(tsispch_state::i8251_rxrdy_int)
{
- pic8259_ir1_w(device->machine().device("pic8259"), state);
+ pic8259_ir1_w(machine().device("pic8259"), state);
}
-static WRITE_LINE_DEVICE_HANDLER( i8251_txempty_int )
+WRITE_LINE_MEMBER(tsispch_state::i8251_txempty_int)
{
- pic8259_ir2_w(device->machine().device("pic8259"), state);
+ pic8259_ir2_w(machine().device("pic8259"), state);
}
-static WRITE_LINE_DEVICE_HANDLER( i8251_txrdy_int )
+WRITE_LINE_MEMBER(tsispch_state::i8251_txrdy_int)
{
- pic8259_ir3_w(device->machine().device("pic8259"), state);
+ pic8259_ir3_w(machine().device("pic8259"), state);
}
const i8251_interface i8251_config =
@@ -149,9 +149,9 @@ const i8251_interface i8251_config =
DEVCB_NULL, // in dsr
DEVCB_NULL, // out dtr
DEVCB_NULL, // out rts
- DEVCB_LINE(i8251_rxrdy_int), // out rxrdy
- DEVCB_LINE(i8251_txrdy_int), // out txrdy
- DEVCB_LINE(i8251_txempty_int), // out txempty
+ DEVCB_DRIVER_LINE_MEMBER(tsispch_state,i8251_rxrdy_int), // out rxrdy
+ DEVCB_DRIVER_LINE_MEMBER(tsispch_state,i8251_txrdy_int), // out txrdy
+ DEVCB_DRIVER_LINE_MEMBER(tsispch_state,i8251_txempty_int), // out txempty
DEVCB_NULL // out syndet
};
@@ -168,14 +168,14 @@ static GENERIC_TERMINAL_INTERFACE( tsispch_terminal_intf )
/*****************************************************************************
PIC 8259 stuff
*****************************************************************************/
-static WRITE_LINE_DEVICE_HANDLER( pic8259_set_int_line )
+WRITE_LINE_MEMBER(tsispch_state::pic8259_set_int_line)
{
- device->machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
static const struct pic8259_interface pic8259_config =
{
- DEVCB_LINE(pic8259_set_int_line),
+ DEVCB_DRIVER_LINE_MEMBER(tsispch_state,pic8259_set_int_line),
DEVCB_LINE_VCC,
DEVCB_NULL
};
diff --git a/src/mess/drivers/v1050.c b/src/mess/drivers/v1050.c
index c9e3f10019b..42fc836f082 100644
--- a/src/mess/drivers/v1050.c
+++ b/src/mess/drivers/v1050.c
@@ -594,17 +594,17 @@ INPUT_PORTS_END
// 8214 Interface
-static WRITE_LINE_DEVICE_HANDLER( pic_int_w )
+WRITE_LINE_MEMBER(v1050_state::pic_int_w)
{
if (state == ASSERT_LINE)
{
- device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
+ execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
}
static I8214_INTERFACE( pic_intf )
{
- DEVCB_DEVICE_LINE(Z80_TAG, pic_int_w),
+ DEVCB_DRIVER_LINE_MEMBER(v1050_state,pic_int_w),
DEVCB_NULL
};
@@ -617,8 +617,9 @@ static MSM58321_INTERFACE( rtc_intf )
// Display 8255A Interface
-static WRITE8_DEVICE_HANDLER( disp_ppi_pc_w )
+WRITE8_MEMBER(v1050_state::disp_ppi_pc_w)
{
+ device_t *device = machine().device(I8255A_M6502_TAG);
i8255_device *ppi = static_cast<i8255_device*>(device);
ppi->pc2_w(BIT(data, 6));
@@ -632,11 +633,12 @@ static I8255A_INTERFACE( disp_ppi_intf )
DEVCB_NULL, // Port B read
DEVCB_NULL, // Port B write
DEVCB_NULL, // Port C read
- DEVCB_DEVICE_HANDLER(I8255A_M6502_TAG, disp_ppi_pc_w) // Port C write
+ DEVCB_DRIVER_MEMBER(v1050_state,disp_ppi_pc_w) // Port C write
};
-static WRITE8_DEVICE_HANDLER( m6502_ppi_pc_w )
+WRITE8_MEMBER(v1050_state::m6502_ppi_pc_w)
{
+ device_t *device = machine().device(I8255A_DISP_TAG);
i8255_device *ppi = static_cast<i8255_device*>(device);
ppi->pc2_w(BIT(data, 7));
@@ -650,7 +652,7 @@ static I8255A_INTERFACE( m6502_ppi_intf )
DEVCB_NULL, // Port B read
DEVCB_NULL, // Port B write
DEVCB_NULL, // Port C read
- DEVCB_DEVICE_HANDLER(I8255A_DISP_TAG, m6502_ppi_pc_w) // Port C write
+ DEVCB_DRIVER_MEMBER(v1050_state,m6502_ppi_pc_w) // Port C write
};
// Miscellanous 8255A Interface
@@ -693,13 +695,13 @@ WRITE8_MEMBER( v1050_state::misc_ppi_pa_w )
wd17xx_dden_w(m_fdc, BIT(data, 7));
}
-static WRITE8_DEVICE_HANDLER( misc_ppi_pb_w )
+WRITE8_MEMBER(v1050_state::misc_ppi_pb_w)
{
- centronics_device *centronics = space.machine().device<centronics_device>(CENTRONICS_TAG);
- centronics->write( space.machine().driver_data()->generic_space() , 0, ~data & 0xff);
+ centronics_device *centronics = machine().device<centronics_device>(CENTRONICS_TAG);
+ centronics->write( machine().driver_data()->generic_space() , 0, ~data & 0xff);
}
-static READ8_DEVICE_HANDLER( misc_ppi_pc_r )
+READ8_MEMBER(v1050_state::misc_ppi_pc_r)
{
/*
@@ -717,7 +719,7 @@ static READ8_DEVICE_HANDLER( misc_ppi_pc_r )
*/
UINT8 data = 0;
- centronics_device *centronics = space.machine().device<centronics_device>(CENTRONICS_TAG);
+ centronics_device *centronics = machine().device<centronics_device>(CENTRONICS_TAG);
data |= centronics->not_busy_r() << 4;
data |= centronics->pe_r() << 5;
@@ -779,8 +781,8 @@ static I8255A_INTERFACE( misc_ppi_intf )
DEVCB_NULL, // Port A read
DEVCB_DRIVER_MEMBER(v1050_state, misc_ppi_pa_w), // Port A write
DEVCB_NULL, // Port B read
- DEVCB_DEVICE_HANDLER(CENTRONICS_TAG, misc_ppi_pb_w), // Port B write
- DEVCB_DEVICE_HANDLER(CENTRONICS_TAG, misc_ppi_pc_r), // Port C read
+ DEVCB_DRIVER_MEMBER(v1050_state,misc_ppi_pb_w), // Port B write
+ DEVCB_DRIVER_MEMBER(v1050_state,misc_ppi_pc_r), // Port C read
DEVCB_DRIVER_MEMBER(v1050_state, misc_ppi_pc_w) // Port C write
};
diff --git a/src/mess/drivers/victor9k.c b/src/mess/drivers/victor9k.c
index 6752bc59cbb..55854a18f08 100644
--- a/src/mess/drivers/victor9k.c
+++ b/src/mess/drivers/victor9k.c
@@ -123,11 +123,11 @@ static const mc6845_interface hd46505s_intf =
// Intel 8253 Interface
-static WRITE_LINE_DEVICE_HANDLER( mux_serial_b_w )
+WRITE_LINE_MEMBER(victor9k_state::mux_serial_b_w)
{
}
-static WRITE_LINE_DEVICE_HANDLER( mux_serial_a_w )
+WRITE_LINE_MEMBER(victor9k_state::mux_serial_a_w)
{
}
@@ -137,11 +137,11 @@ static const struct pit8253_config pit_intf =
{
2500000,
DEVCB_LINE_VCC,
- DEVCB_LINE(mux_serial_b_w)
+ DEVCB_DRIVER_LINE_MEMBER(victor9k_state,mux_serial_b_w)
}, {
2500000,
DEVCB_LINE_VCC,
- DEVCB_LINE(mux_serial_a_w)
+ DEVCB_DRIVER_LINE_MEMBER(victor9k_state,mux_serial_a_w)
}, {
100000,
DEVCB_LINE_VCC,
diff --git a/src/mess/drivers/x1.c b/src/mess/drivers/x1.c
index b77f9e39cad..fbf23a89665 100644
--- a/src/mess/drivers/x1.c
+++ b/src/mess/drivers/x1.c
@@ -1058,16 +1058,16 @@ static const wd17xx_interface x1_mb8877a_interface =
{FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
};
-static WRITE_LINE_DEVICE_HANDLER( fdc_drq_w )
+WRITE_LINE_MEMBER(x1_state::fdc_drq_w)
{
- z80dma_rdy_w(device->machine().device("dma"), state ^ 1);
+ z80dma_rdy_w(machine().device("dma"), state ^ 1);
}
static const wd17xx_interface x1turbo_mb8877a_interface =
{
DEVCB_NULL,
DEVCB_NULL,
- DEVCB_DEVICE_LINE("fdc", fdc_drq_w),
+ DEVCB_DRIVER_LINE_MEMBER(x1_state,fdc_drq_w),
{FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
};
diff --git a/src/mess/drivers/x68k.c b/src/mess/drivers/x68k.c
index 2039b5bba60..1264e153f25 100644
--- a/src/mess/drivers/x68k.c
+++ b/src/mess/drivers/x68k.c
@@ -856,56 +856,53 @@ static UINT8 xpd1lr_r(device_t* device, int port)
}
// Judging from the XM6 source code, PPI ports A and B are joystick inputs
-static READ8_DEVICE_HANDLER( ppi_port_a_r )
+READ8_MEMBER(x68k_state::ppi_port_a_r)
{
- x68k_state *state = space.machine().driver_data<x68k_state>();
- int ctrl = space.machine().root_device().ioport("ctrltype")->read() & 0x0f;
+ int ctrl = machine().root_device().ioport("ctrltype")->read() & 0x0f;
switch(ctrl)
{
case 0x00: // standard MSX/FM-Towns joystick
- if(state->m_joy.joy1_enable == 0)
- return state->ioport("joy1")->read();
+ if(m_joy.joy1_enable == 0)
+ return ioport("joy1")->read();
else
return 0xff;
case 0x01: // 3-button Megadrive gamepad
- return md_3button_r(device,1);
+ return md_3button_r(machine().device("ppi8255"),1);
case 0x02: // 6-button Megadrive gamepad
- return md_6button_r(device,1);
+ return md_6button_r(machine().device("ppi8255"),1);
case 0x03: // XPD-1LR
- return xpd1lr_r(device,1);
+ return xpd1lr_r(machine().device("ppi8255"),1);
}
return 0xff;
}
-static READ8_DEVICE_HANDLER( ppi_port_b_r )
+READ8_MEMBER(x68k_state::ppi_port_b_r)
{
- x68k_state *state = space.machine().driver_data<x68k_state>();
- int ctrl = space.machine().root_device().ioport("ctrltype")->read() & 0xf0;
+ int ctrl = machine().root_device().ioport("ctrltype")->read() & 0xf0;
switch(ctrl)
{
case 0x00: // standard MSX/FM-Towns joystick
- if(state->m_joy.joy2_enable == 0)
- return state->ioport("joy2")->read();
+ if(m_joy.joy2_enable == 0)
+ return ioport("joy2")->read();
else
return 0xff;
case 0x10: // 3-button Megadrive gamepad
- return md_3button_r(device,2);
+ return md_3button_r(machine().device("ppi8255"),2);
case 0x20: // 6-button Megadrive gamepad
- return md_6button_r(device,2);
+ return md_6button_r(machine().device("ppi8255"),2);
case 0x30: // XPD-1LR
- return xpd1lr_r(device,2);
+ return xpd1lr_r(machine().device("ppi8255"),2);
}
return 0xff;
}
-static READ8_DEVICE_HANDLER( ppi_port_c_r )
+READ8_MEMBER(x68k_state::ppi_port_c_r)
{
- x68k_state *state = space.machine().driver_data<x68k_state>();
- return state->m_ppi_port[2];
+ return m_ppi_port[2];
}
/* PPI port C (Joystick control, R/W)
@@ -916,41 +913,40 @@ static READ8_DEVICE_HANDLER( ppi_port_c_r )
bits 3,2 - ADPCM Sample rate
bits 1,0 - ADPCM Pan
*/
-static WRITE8_DEVICE_HANDLER( ppi_port_c_w )
+WRITE8_MEMBER(x68k_state::ppi_port_c_w)
{
- x68k_state *state = space.machine().driver_data<x68k_state>();
// ADPCM / Joystick control
- device_t *oki = space.machine().device("okim6258");
+ device_t *oki = machine().device("okim6258");
- state->m_ppi_port[2] = data;
- if((data & 0x0f) != (state->m_ppi_prev & 0x0f))
+ m_ppi_port[2] = data;
+ if((data & 0x0f) != (m_ppi_prev & 0x0f))
{
- state->m_adpcm.pan = data & 0x03;
- state->m_adpcm.rate = data & 0x0c;
- x68k_set_adpcm(space.machine());
+ m_adpcm.pan = data & 0x03;
+ m_adpcm.rate = data & 0x0c;
+ x68k_set_adpcm(machine());
okim6258_set_divider(oki, (data >> 2) & 3);
}
// The joystick enable bits also handle the multiplexer for various controllers
- state->m_joy.joy1_enable = data & 0x10;
- state->m_mdctrl.mux1 = data & 0x10;
- if((state->m_ppi_prev & 0x10) == 0x00 && (data & 0x10) == 0x10)
+ m_joy.joy1_enable = data & 0x10;
+ m_mdctrl.mux1 = data & 0x10;
+ if((m_ppi_prev & 0x10) == 0x00 && (data & 0x10) == 0x10)
{
- state->m_mdctrl.seq1++;
- state->m_mdctrl.io_timeout1->adjust(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(8192));
+ m_mdctrl.seq1++;
+ m_mdctrl.io_timeout1->adjust(machine().device<cpu_device>("maincpu")->cycles_to_attotime(8192));
}
- state->m_joy.joy2_enable = data & 0x20;
- state->m_mdctrl.mux2 = data & 0x20;
- if((state->m_ppi_prev & 0x20) == 0x00 && (data & 0x20) == 0x20)
+ m_joy.joy2_enable = data & 0x20;
+ m_mdctrl.mux2 = data & 0x20;
+ if((m_ppi_prev & 0x20) == 0x00 && (data & 0x20) == 0x20)
{
- state->m_mdctrl.seq2++;
- state->m_mdctrl.io_timeout2->adjust(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(8192));
+ m_mdctrl.seq2++;
+ m_mdctrl.io_timeout2->adjust(machine().device<cpu_device>("maincpu")->cycles_to_attotime(8192));
}
- state->m_ppi_prev = data;
+ m_ppi_prev = data;
- state->m_joy.ioc6 = data & 0x40;
- state->m_joy.ioc7 = data & 0x80;
+ m_joy.ioc6 = data & 0x40;
+ m_joy.ioc7 = data & 0x80;
}
@@ -1073,16 +1069,15 @@ static READ16_HANDLER( x68k_fdc_r )
}
}
-static WRITE_LINE_DEVICE_HANDLER( fdc_irq )
+WRITE_LINE_MEMBER(x68k_state::fdc_irq)
{
- x68k_state *drvstate = device->machine().driver_data<x68k_state>();
- if((drvstate->m_ioc.irqstatus & 0x04) && state == ASSERT_LINE)
+ if((m_ioc.irqstatus & 0x04) && state == ASSERT_LINE)
{
- drvstate->m_current_vector[1] = drvstate->m_ioc.fdcvector;
- drvstate->m_ioc.irqstatus |= 0x80;
- drvstate->m_current_irq_line = 1;
+ m_current_vector[1] = m_ioc.fdcvector;
+ m_ioc.irqstatus |= 0x80;
+ m_current_irq_line = 1;
logerror("FDC: IRQ triggered\n");
- device->machine().device("maincpu")->execute().set_input_line_and_vector(1, ASSERT_LINE, drvstate->m_current_vector[1]);
+ machine().device("maincpu")->execute().set_input_line_and_vector(1, ASSERT_LINE, m_current_vector[1]);
}
}
@@ -1104,10 +1099,9 @@ static void x68k_fdc_write_byte(running_machine &machine,int addr, int data)
upd765_dack_w(fdc, machine.driver_data()->generic_space(), 0, data);
}
-static WRITE_LINE_DEVICE_HANDLER ( fdc_drq )
+WRITE_LINE_MEMBER(x68k_state::fdc_drq)
{
- x68k_state *drvstate = device->machine().driver_data<x68k_state>();
- drvstate->m_fdc.drq_state = state;
+ m_fdc.drq_state = state;
}
static WRITE16_HANDLER( x68k_fm_w )
@@ -1129,18 +1123,17 @@ static READ16_HANDLER( x68k_fm_r )
return 0xffff;
}
-static WRITE8_DEVICE_HANDLER( x68k_ct_w )
+WRITE8_MEMBER(x68k_state::x68k_ct_w)
{
- x68k_state *state = space.machine().driver_data<x68k_state>();
- device_t *fdc = space.machine().device("upd72065");
- device_t *okim = space.machine().device("okim6258");
+ device_t *fdc = machine().device("upd72065");
+ device_t *okim = machine().device("okim6258");
// CT1 and CT2 bits from YM2151 port 0x1b
// CT1 - ADPCM clock - 0 = 8MHz, 1 = 4MHz
// CT2 - 1 = Set ready state of FDC
upd765_ready_w(fdc,data & 0x01);
- state->m_adpcm.clock = data & 0x02;
- x68k_set_adpcm(space.machine());
+ m_adpcm.clock = data & 0x02;
+ x68k_set_adpcm(machine());
okim6258_set_clock(okim, data & 0x02 ? 4000000 : 8000000);
}
@@ -1503,16 +1496,14 @@ static WRITE16_HANDLER( x68k_rtc_w )
state->m_rtc->write(space, offset, data);
}
-static WRITE_LINE_DEVICE_HANDLER( x68k_rtc_alarm_irq )
+WRITE_LINE_MEMBER(x68k_state::x68k_rtc_alarm_irq)
{
- x68k_state *drvstate = device->machine().driver_data<x68k_state>();
-
- if(drvstate->m_mfp.aer & 0x01)
+ if(m_mfp.aer & 0x01)
{
if(state == 1)
{
- drvstate->m_mfp.gpio |= 0x01;
- drvstate->m_mfpdev->i0_w(1);
+ m_mfp.gpio |= 0x01;
+ m_mfpdev->i0_w(1);
//mfp_trigger_irq(MFP_IRQ_GPIP0); // RTC ALARM
}
}
@@ -1520,8 +1511,8 @@ static WRITE_LINE_DEVICE_HANDLER( x68k_rtc_alarm_irq )
{
if(state == 0)
{
- drvstate->m_mfp.gpio &= ~0x01;
- drvstate->m_mfpdev->i0_w(0);
+ m_mfp.gpio &= ~0x01;
+ m_mfpdev->i0_w(0);
//mfp_trigger_irq(MFP_IRQ_GPIP0); // RTC ALARM
}
}
@@ -1858,8 +1849,9 @@ READ8_MEMBER( x68k_state::mfp_gpio_r )
return data;
}
-static WRITE8_DEVICE_HANDLER( x68030_adpcm_w )
+WRITE8_MEMBER(x68k_state::x68030_adpcm_w)
{
+ device_t *device = machine().device("okim6258");
switch(offset)
{
case 0x00:
@@ -1871,18 +1863,17 @@ static WRITE8_DEVICE_HANDLER( x68030_adpcm_w )
}
}
-static WRITE_LINE_DEVICE_HANDLER( mfp_irq_callback )
+WRITE_LINE_MEMBER(x68k_state::mfp_irq_callback)
{
- x68k_state *drvstate = device->machine().driver_data<x68k_state>();
- if(drvstate->m_mfp_prev == CLEAR_LINE && state == CLEAR_LINE) // eliminate unnecessary calls to set the IRQ line for speed reasons
+ if(m_mfp_prev == CLEAR_LINE && state == CLEAR_LINE) // eliminate unnecessary calls to set the IRQ line for speed reasons
return;
if(state != CLEAR_LINE)
state = HOLD_LINE; // to get around erroneous spurious interrupt
-// if((state->m_ioc.irqstatus & 0xc0) != 0) // if the FDC is busy, then we don't want to miss that IRQ
+// if((m_ioc.irqstatus & 0xc0) != 0) // if the FDC is busy, then we don't want to miss that IRQ
// return;
- device->machine().device("maincpu")->execute().set_input_line(6, state);
- drvstate->m_current_vector[6] = 0;
- drvstate->m_mfp_prev = state;
+ machine().device("maincpu")->execute().set_input_line(6, state);
+ m_current_vector[6] = 0;
+ m_mfp_prev = state;
}
INTERRUPT_GEN_MEMBER(x68k_state::x68k_vsync_irq)
@@ -1933,19 +1924,18 @@ static IRQ_CALLBACK(x68k_int_ack)
return state->m_current_vector[irqline];
}
-static WRITE_LINE_DEVICE_HANDLER( x68k_scsi_irq )
+WRITE_LINE_MEMBER(x68k_state::x68k_scsi_irq)
{
- x68k_state *tstate = device->machine().driver_data<x68k_state>();
// TODO : Internal SCSI IRQ vector 0x6c, External SCSI IRQ vector 0xf6, IRQs go through the IOSC (IRQ line 1)
if(state != 0)
{
- tstate->m_current_vector[1] = 0x6c;
- tstate->m_current_irq_line = 1;
- device->machine().device("maincpu")->execute().set_input_line_and_vector(1,ASSERT_LINE,tstate->m_current_vector[1]);
+ m_current_vector[1] = 0x6c;
+ m_current_irq_line = 1;
+ machine().device("maincpu")->execute().set_input_line_and_vector(1,ASSERT_LINE,m_current_vector[1]);
}
}
-static WRITE_LINE_DEVICE_HANDLER( x68k_scsi_drq )
+WRITE_LINE_MEMBER(x68k_state::x68k_scsi_drq)
{
// TODO
}
@@ -2042,7 +2032,7 @@ static ADDRESS_MAP_START(x68030_map, AS_PROGRAM, 32, x68k_state )
// AM_RANGE(0xe8c000, 0xe8dfff) AM_READWRITE_LEGACY(x68k_printer_r, x68k_printer_w)
AM_RANGE(0xe8e000, 0xe8ffff) AM_READWRITE16_LEGACY(x68k_sysport_r, x68k_sysport_w,0xffffffff)
AM_RANGE(0xe90000, 0xe91fff) AM_READWRITE16_LEGACY(x68k_fm_r, x68k_fm_w,0xffffffff)
- AM_RANGE(0xe92000, 0xe92003) AM_DEVREADWRITE8_LEGACY("okim6258", okim6258_status_r, x68030_adpcm_w, 0x00ff00ff)
+ AM_RANGE(0xe92000, 0xe92003) AM_DEVREAD8_LEGACY("okim6258", okim6258_status_r, 0x00ff00ff) AM_WRITE8(x68030_adpcm_w, 0x00ff00ff)
AM_RANGE(0xe94000, 0xe95fff) AM_READWRITE16_LEGACY(x68k_fdc_r, x68k_fdc_w,0xffffffff)
// AM_RANGE(0xe96000, 0xe9601f) AM_DEVREADWRITE16_LEGACY("x68k_hdc",x68k_hdc_r, x68k_hdc_w,0xffffffff)
AM_RANGE(0xe96020, 0xe9603f) AM_DEVREADWRITE8("scsi:mb89352",mb89352_device,mb89352_r,mb89352_w,0x00ff00ff)
@@ -2074,7 +2064,7 @@ static MC68901_INTERFACE( mfp_interface )
4000000, /* timer clock */
0, /* receive clock */
0, /* transmit clock */
- DEVCB_LINE(mfp_irq_callback), /* interrupt */
+ DEVCB_DRIVER_LINE_MEMBER(x68k_state,mfp_irq_callback), /* interrupt */
DEVCB_DRIVER_MEMBER(x68k_state, mfp_gpio_r), /* GPIO read */
DEVCB_NULL, /* GPIO write */
DEVCB_NULL, /* TAO */
@@ -2089,12 +2079,12 @@ static MC68901_INTERFACE( mfp_interface )
static I8255A_INTERFACE( ppi_interface )
{
- DEVCB_HANDLER(ppi_port_a_r),
+ DEVCB_DRIVER_MEMBER(x68k_state,ppi_port_a_r),
DEVCB_NULL,
- DEVCB_HANDLER(ppi_port_b_r),
+ DEVCB_DRIVER_MEMBER(x68k_state,ppi_port_b_r),
DEVCB_NULL,
- DEVCB_HANDLER(ppi_port_c_r),
- DEVCB_HANDLER(ppi_port_c_w)
+ DEVCB_DRIVER_MEMBER(x68k_state,ppi_port_c_r),
+ DEVCB_DRIVER_MEMBER(x68k_state,ppi_port_c_w)
};
static const hd63450_intf dmac_interface =
@@ -2112,8 +2102,8 @@ static const hd63450_intf dmac_interface =
static const upd765_interface fdc_interface =
{
- DEVCB_LINE(fdc_irq),
- DEVCB_LINE(fdc_drq),
+ DEVCB_DRIVER_LINE_MEMBER(x68k_state,fdc_irq),
+ DEVCB_DRIVER_LINE_MEMBER(x68k_state,fdc_drq),
NULL,
UPD765_RDY_PIN_CONNECTED,
{FLOPPY_0,FLOPPY_1,FLOPPY_2,FLOPPY_3}
@@ -2122,7 +2112,7 @@ static const upd765_interface fdc_interface =
static const ym2151_interface x68k_ym2151_interface =
{
DEVCB_LINE(x68k_fm_irq),
- DEVCB_HANDLER(x68k_ct_w) // CT1, CT2 from YM2151 port 0x1b
+ DEVCB_DRIVER_MEMBER(x68k_state,x68k_ct_w) // CT1, CT2 from YM2151 port 0x1b
};
static const okim6258_interface x68k_okim6258_interface =
@@ -2134,7 +2124,7 @@ static const okim6258_interface x68k_okim6258_interface =
static RP5C15_INTERFACE( rtc_intf )
{
- DEVCB_LINE(x68k_rtc_alarm_irq),
+ DEVCB_DRIVER_LINE_MEMBER(x68k_state,x68k_rtc_alarm_irq),
DEVCB_NULL
};
@@ -2519,8 +2509,8 @@ static const floppy_interface x68k_floppy_interface =
static const mb89352_interface x68k_scsi_intf =
{
- DEVCB_LINE(x68k_scsi_irq),
- DEVCB_LINE(x68k_scsi_drq)
+ DEVCB_DRIVER_LINE_MEMBER(x68k_state,x68k_scsi_irq),
+ DEVCB_DRIVER_LINE_MEMBER(x68k_state,x68k_scsi_drq)
};
static X68K_EXPANSION_INTERFACE(x68k_exp_intf)
diff --git a/src/mess/drivers/xerox820.c b/src/mess/drivers/xerox820.c
index fc6adda008b..da7befdc460 100644
--- a/src/mess/drivers/xerox820.c
+++ b/src/mess/drivers/xerox820.c
@@ -557,22 +557,25 @@ TIMER_DEVICE_CALLBACK_MEMBER(xerox820_state::ctc_tick)
m_ctc->trg0(0);
}
-static WRITE_LINE_DEVICE_HANDLER( ctc_z0_w )
+WRITE_LINE_MEMBER(xerox820_state::ctc_z0_w)
{
+// device_t *device = machine().device(Z80CTC_TAG);
// z80ctc_trg1_w(device, state);
}
-static WRITE_LINE_DEVICE_HANDLER( ctc_z2_w )
+WRITE_LINE_MEMBER(xerox820_state::ctc_z2_w)
{
+// device_t *device = machine().device(Z80CTC_TAG);
+
// z80ctc_trg3_w(device, state);
}
static Z80CTC_INTERFACE( ctc_intf )
{
DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), /* interrupt handler */
- DEVCB_DEVICE_LINE(Z80CTC_TAG, ctc_z0_w), /* ZC/TO0 callback */
+ DEVCB_DRIVER_LINE_MEMBER(xerox820_state,ctc_z0_w), /* ZC/TO0 callback */
DEVCB_DEVICE_LINE_MEMBER(Z80CTC_TAG, z80ctc_device, trg2), /* ZC/TO1 callback */
- DEVCB_DEVICE_LINE(Z80CTC_TAG, ctc_z2_w) /* ZC/TO2 callback */
+ DEVCB_DRIVER_LINE_MEMBER(xerox820_state,ctc_z2_w) /* ZC/TO2 callback */
};
/* Z80 Daisy Chain */
diff --git a/src/mess/drivers/xor100.c b/src/mess/drivers/xor100.c
index 4705b3cf9a9..79692edfcbb 100644
--- a/src/mess/drivers/xor100.c
+++ b/src/mess/drivers/xor100.c
@@ -360,15 +360,17 @@ INPUT_PORTS_END
/* COM5016 Interface */
-static WRITE_LINE_DEVICE_HANDLER( com5016_fr_w )
+WRITE_LINE_MEMBER(xor100_state::com5016_fr_w)
{
+ device_t *device = machine().device(I8251_A_TAG);
i8251_device* uart = dynamic_cast<i8251_device*>(device);
uart->transmit_clock();
uart->receive_clock();
}
-static WRITE_LINE_DEVICE_HANDLER( com5016_ft_w )
+WRITE_LINE_MEMBER(xor100_state::com5016_ft_w)
{
+ device_t *device = machine().device(I8251_B_TAG);
i8251_device* uart = dynamic_cast<i8251_device*>(device);
uart->transmit_clock();
uart->receive_clock();
@@ -377,8 +379,8 @@ static WRITE_LINE_DEVICE_HANDLER( com5016_ft_w )
static COM8116_INTERFACE( com5016_intf )
{
DEVCB_NULL, /* fX/4 output */
- DEVCB_DEVICE_LINE(I8251_A_TAG, com5016_fr_w), /* fR output */
- DEVCB_DEVICE_LINE(I8251_B_TAG, com5016_ft_w), /* fT output */
+ DEVCB_DRIVER_LINE_MEMBER(xor100_state,com5016_fr_w), /* fR output */
+ DEVCB_DRIVER_LINE_MEMBER(xor100_state,com5016_ft_w), /* fT output */
{ 101376, 67584, 46080, 37686, 33792, 16896, 8448, 4224, 2816, 2534, 2112, 1408, 1056, 704, 528, 264 }, // WRONG?
{ 101376, 67584, 46080, 37686, 33792, 16896, 8448, 4224, 2816, 2534, 2112, 1408, 1056, 704, 528, 264 }, // WRONG?
};
@@ -415,9 +417,9 @@ static const i8251_interface terminal_8251_intf =
/* Printer 8255A Interface */
-static READ8_DEVICE_HANDLER( i8255_pc_r )
+READ8_MEMBER(xor100_state::i8255_pc_r)
{
- centronics_device *centronics = space.machine().device<centronics_device>("centronics");
+ centronics_device *centronics = machine().device<centronics_device>("centronics");
/*
bit description
@@ -450,7 +452,7 @@ static I8255A_INTERFACE( printer_8255_intf )
DEVCB_DEVICE_MEMBER(CENTRONICS_TAG, centronics_device, write),
DEVCB_NULL,
DEVCB_DEVICE_LINE_MEMBER(CENTRONICS_TAG, centronics_device, strobe_w),
- DEVCB_DEVICE_HANDLER(CENTRONICS_TAG, i8255_pc_r),
+ DEVCB_DRIVER_MEMBER(xor100_state,i8255_pc_r),
DEVCB_NULL
};
@@ -463,24 +465,24 @@ static const centronics_interface xor100_centronics_intf =
/* Z80-CTC Interface */
-static WRITE_LINE_DEVICE_HANDLER( ctc_z0_w )
+WRITE_LINE_MEMBER(xor100_state::ctc_z0_w)
{
}
-static WRITE_LINE_DEVICE_HANDLER( ctc_z1_w )
+WRITE_LINE_MEMBER(xor100_state::ctc_z1_w)
{
}
-static WRITE_LINE_DEVICE_HANDLER( ctc_z2_w )
+WRITE_LINE_MEMBER(xor100_state::ctc_z2_w)
{
}
static Z80CTC_INTERFACE( ctc_intf )
{
DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), /* interrupt handler */
- DEVCB_LINE(ctc_z0_w), /* ZC/TO0 callback */
- DEVCB_LINE(ctc_z1_w), /* ZC/TO1 callback */
- DEVCB_LINE(ctc_z2_w) /* ZC/TO2 callback */
+ DEVCB_DRIVER_LINE_MEMBER(xor100_state,ctc_z0_w), /* ZC/TO0 callback */
+ DEVCB_DRIVER_LINE_MEMBER(xor100_state,ctc_z1_w), /* ZC/TO1 callback */
+ DEVCB_DRIVER_LINE_MEMBER(xor100_state,ctc_z2_w) /* ZC/TO2 callback */
};
/* WD1795-02 Interface */
@@ -518,15 +520,15 @@ static const wd17xx_interface fdc_intf =
/* Terminal Interface */
-static WRITE8_DEVICE_HANDLER( xor100_kbd_put )
+WRITE8_MEMBER(xor100_state::xor100_kbd_put)
{
- i8251_device* uart = dynamic_cast<i8251_device*>(device);
+ i8251_device* uart = dynamic_cast<i8251_device*>(machine().device(I8251_B_TAG));
uart->receive_character(data);
}
static GENERIC_TERMINAL_INTERFACE( xor100_terminal_intf )
{
- DEVCB_DEVICE_HANDLER(I8251_B_TAG, xor100_kbd_put)
+ DEVCB_DRIVER_MEMBER(xor100_state,xor100_kbd_put)
};
/* Machine Initialization */
diff --git a/src/mess/drivers/z80ne.c b/src/mess/drivers/z80ne.c
index 4f58a754c43..953b2ebff73 100644
--- a/src/mess/drivers/z80ne.c
+++ b/src/mess/drivers/z80ne.c
@@ -171,7 +171,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( z80netf_io, AS_IO, 8, z80ne_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0xd0, 0xd7) AM_DEVREADWRITE_LEGACY("wd1771", lx390_fdc_r, lx390_fdc_w)
+ AM_RANGE(0xd0, 0xd7) AM_READWRITE(lx390_fdc_r, lx390_fdc_w)
AM_RANGE(0xea, 0xea) AM_READ(lx388_data_r )
AM_RANGE(0xeb, 0xeb) AM_READ(lx388_read_field_sync )
AM_RANGE(0xee, 0xee) AM_READWRITE(lx385_data_r, lx385_data_w )
@@ -455,7 +455,7 @@ static const floppy_interface z80netf_floppy_interface =
static const mc6847_interface z80net_mc6847_intf =
{
"lx388",
- DEVCB_HANDLER(lx388_mc6847_videoram_r),
+ DEVCB_DRIVER_MEMBER(z80ne_state, lx388_mc6847_videoram_r),
DEVCB_NULL,
DEVCB_NULL,