summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mess/drivers/alphasma.c2
-rw-r--r--src/mess/drivers/apexc.c30
-rw-r--r--src/mess/drivers/apple3.c2
-rw-r--r--src/mess/drivers/aquarius.c2
-rw-r--r--src/mess/drivers/arcadia.c2
-rw-r--r--src/mess/drivers/b2m.c2
-rw-r--r--src/mess/drivers/bbc.c12
-rw-r--r--src/mess/drivers/bmjr.c2
-rw-r--r--src/mess/drivers/bml3.c19
-rw-r--r--src/mess/drivers/c128.c8
-rw-r--r--src/mess/drivers/c64.c13
-rw-r--r--src/mess/drivers/c65.c8
-rw-r--r--src/mess/drivers/cbmb.c2
-rw-r--r--src/mess/drivers/cgenie.c4
-rw-r--r--src/mess/drivers/compis.c4
-rw-r--r--src/mess/drivers/concept.c2
-rw-r--r--src/mess/drivers/elwro800.c7
-rw-r--r--src/mess/drivers/fmtowns.c10
-rw-r--r--src/mess/drivers/fp1100.c10
-rw-r--r--src/mess/drivers/galaxy.c4
-rw-r--r--src/mess/drivers/gamecom.c6
-rw-r--r--src/mess/drivers/gb.c4
-rw-r--r--src/mess/drivers/geniusiq.c2
-rw-r--r--src/mess/drivers/gmaster.c6
-rw-r--r--src/mess/drivers/h19.c2
-rw-r--r--src/mess/drivers/hec2hrp.c12
-rw-r--r--src/mess/drivers/homelab.c10
-rw-r--r--src/mess/drivers/homez80.c10
-rw-r--r--src/mess/drivers/interact.c4
-rw-r--r--src/mess/drivers/intv.c10
-rw-r--r--src/mess/drivers/ip22.c18
-rw-r--r--src/mess/drivers/iq151.c10
-rw-r--r--src/mess/drivers/kaypro.c4
-rw-r--r--src/mess/drivers/lisa.c2
-rw-r--r--src/mess/drivers/mac.c25
-rw-r--r--src/mess/drivers/mbee.c2
-rw-r--r--src/mess/drivers/microtan.c2
-rw-r--r--src/mess/drivers/msx.c2
-rw-r--r--src/mess/drivers/mz2500.c12
-rw-r--r--src/mess/drivers/newbrain.c11
-rw-r--r--src/mess/drivers/ondra.c6
-rw-r--r--src/mess/drivers/orion.c2
-rw-r--r--src/mess/drivers/p2000t.c8
-rw-r--r--src/mess/drivers/pasogo.c5
-rw-r--r--src/mess/drivers/pc100.c7
-rw-r--r--src/mess/drivers/pc2000.c2
-rw-r--r--src/mess/drivers/pc6001.c28
-rw-r--r--src/mess/drivers/pc8801.c19
-rw-r--r--src/mess/drivers/pc88va.c7
-rw-r--r--src/mess/drivers/pc9801.c28
-rw-r--r--src/mess/drivers/pdp1.c118
-rw-r--r--src/mess/drivers/pet.c4
-rw-r--r--src/mess/drivers/pk8000.c7
-rw-r--r--src/mess/drivers/pk8020.c2
-rw-r--r--src/mess/drivers/plus4.c52
-rw-r--r--src/mess/drivers/poly88.c2
-rw-r--r--src/mess/drivers/primo.c2
-rw-r--r--src/mess/drivers/pyl601.c10
-rw-r--r--src/mess/drivers/rainbow.c7
-rw-r--r--src/mess/drivers/rx78.c2
-rw-r--r--src/mess/drivers/samcoupe.c6
-rw-r--r--src/mess/drivers/sgi_ip2.c5
-rw-r--r--src/mess/drivers/sgi_ip6.c5
-rw-r--r--src/mess/drivers/sm1800.c10
-rw-r--r--src/mess/drivers/smc777.c10
-rw-r--r--src/mess/drivers/socrates.c14
-rw-r--r--src/mess/drivers/spectrum.c6
-rw-r--r--src/mess/drivers/supracan.c24
-rw-r--r--src/mess/drivers/svision.c11
-rw-r--r--src/mess/drivers/ti990_10.c10
-rw-r--r--src/mess/drivers/ti990_4.c12
-rw-r--r--src/mess/drivers/ti99_2.c10
-rw-r--r--src/mess/drivers/tim011.c2
-rw-r--r--src/mess/drivers/trs80.c4
-rw-r--r--src/mess/drivers/tx0.c69
-rw-r--r--src/mess/drivers/vc4000.c2
-rw-r--r--src/mess/drivers/vector06.c2
-rw-r--r--src/mess/drivers/vic10.c6
-rw-r--r--src/mess/drivers/vic20.c9
-rw-r--r--src/mess/drivers/vii.c82
-rw-r--r--src/mess/drivers/vt100.c10
-rw-r--r--src/mess/drivers/vt240.c7
-rw-r--r--src/mess/drivers/vtech2.c6
-rw-r--r--src/mess/drivers/x68k.c18
-rw-r--r--src/mess/includes/apple3.h4
-rw-r--r--src/mess/includes/arcadia.h3
-rw-r--r--src/mess/includes/b2m.h3
-rw-r--r--src/mess/includes/bbc.h6
-rw-r--r--src/mess/includes/c128.h3
-rw-r--r--src/mess/includes/c16.h2
-rw-r--r--src/mess/includes/c64.h1
-rw-r--r--src/mess/includes/c64_legacy.h2
-rw-r--r--src/mess/includes/c65.h5
-rw-r--r--src/mess/includes/cgenie.h5
-rw-r--r--src/mess/includes/compis.h3
-rw-r--r--src/mess/includes/concept.h4
-rw-r--r--src/mess/includes/fmtowns.h6
-rw-r--r--src/mess/includes/galaxy.h2
-rw-r--r--src/mess/includes/gamecom.h1
-rw-r--r--src/mess/includes/gb.h2
-rw-r--r--src/mess/includes/gmaster.h1
-rw-r--r--src/mess/includes/intv.h3
-rw-r--r--src/mess/includes/kaypro.h2
-rw-r--r--src/mess/includes/lisa.h3
-rw-r--r--src/mess/includes/lynx.h5
-rw-r--r--src/mess/includes/mac.h1
-rw-r--r--src/mess/includes/mbee.h2
-rw-r--r--src/mess/includes/microtan.h3
-rw-r--r--src/mess/includes/msx.h2
-rw-r--r--src/mess/includes/newbrain.h1
-rw-r--r--src/mess/includes/ondra.h1
-rw-r--r--src/mess/includes/orion.h6
-rw-r--r--src/mess/includes/p2000t.h1
-rw-r--r--src/mess/includes/pdp1.h1
-rw-r--r--src/mess/includes/pet.h4
-rw-r--r--src/mess/includes/pk8020.h2
-rw-r--r--src/mess/includes/plus4.h2
-rw-r--r--src/mess/includes/poly88.h5
-rw-r--r--src/mess/includes/primo.h2
-rw-r--r--src/mess/includes/samcoupe.h1
-rw-r--r--src/mess/includes/spectrum.h1
-rw-r--r--src/mess/includes/svision.h1
-rw-r--r--src/mess/includes/trs80.h5
-rw-r--r--src/mess/includes/tx0.h1
-rw-r--r--src/mess/includes/vc4000.h6
-rw-r--r--src/mess/includes/vector06.h4
-rw-r--r--src/mess/includes/vic10.h1
-rw-r--r--src/mess/includes/vic20.h1
-rw-r--r--src/mess/includes/vtech2.h1
-rw-r--r--src/mess/includes/x68k.h1
-rw-r--r--src/mess/machine/apple3.c10
-rw-r--r--src/mess/machine/b2m.c9
-rw-r--r--src/mess/machine/bbc.c30
-rw-r--r--src/mess/machine/c128.c17
-rw-r--r--src/mess/machine/c64.c6
-rw-r--r--src/mess/machine/c65.c11
-rw-r--r--src/mess/machine/cgenie.c20
-rw-r--r--src/mess/machine/compis.c4
-rw-r--r--src/mess/machine/concept.c4
-rw-r--r--src/mess/machine/galaxy.c4
-rw-r--r--src/mess/machine/gb.c2
-rw-r--r--src/mess/machine/intv.c25
-rw-r--r--src/mess/machine/kay_kbd.c33
-rw-r--r--src/mess/machine/lisa.c75
-rw-r--r--src/mess/machine/mbee.c11
-rw-r--r--src/mess/machine/microtan.c65
-rw-r--r--src/mess/machine/msx.c7
-rw-r--r--src/mess/machine/orion.c7
-rw-r--r--src/mess/machine/pet.c21
-rw-r--r--src/mess/machine/pk8020.c7
-rw-r--r--src/mess/machine/poly88.c7
-rw-r--r--src/mess/machine/primo.c7
-rw-r--r--src/mess/machine/trs80.c19
-rw-r--r--src/mess/machine/vector06.c9
-rw-r--r--src/mess/video/arcadia.c53
-rw-r--r--src/mess/video/fmtowns.c15
-rw-r--r--src/mess/video/vc4000.c79
157 files changed, 797 insertions, 839 deletions
diff --git a/src/mess/drivers/alphasma.c b/src/mess/drivers/alphasma.c
index df79481de3d..928261360d4 100644
--- a/src/mess/drivers/alphasma.c
+++ b/src/mess/drivers/alphasma.c
@@ -66,7 +66,7 @@ static MACHINE_CONFIG_START( alphasmart, alphasmart_state )
MCFG_CPU_PROGRAM_MAP(alphasmart_mem)
MCFG_CPU_IO_MAP(alphasmart_io)
MCFG_CPU_CONFIG(alphasmart_hc11_config)
- MCFG_CPU_PERIODIC_INT(irq0_line_hold, 50)
+ MCFG_CPU_PERIODIC_INT_DRIVER(alphasmart_state, irq0_line_hold, 50)
/* video hardware */
MCFG_SCREEN_ADD("screen", LCD)
diff --git a/src/mess/drivers/apexc.c b/src/mess/drivers/apexc.c
index 614c9b8c1fa..654f689853d 100644
--- a/src/mess/drivers/apexc.c
+++ b/src/mess/drivers/apexc.c
@@ -32,6 +32,7 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_apexc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(apexc_interrupt);
};
@@ -395,10 +396,9 @@ INPUT_PORTS_END
/*
Not a real interrupt - just handle keyboard input
*/
-static INTERRUPT_GEN( apexc_interrupt )
+INTERRUPT_GEN_MEMBER(apexc_state::apexc_interrupt)
{
- apexc_state *state = device->machine().driver_data<apexc_state>();
- address_space& space = *device->machine().device("maincpu")->memory().space(AS_PROGRAM);
+ address_space& space = *machine().device("maincpu")->memory().space(AS_PROGRAM);
UINT32 edit_keys;
int control_keys;
@@ -406,26 +406,26 @@ static INTERRUPT_GEN( apexc_interrupt )
/* read new state of edit keys */
- edit_keys = device->machine().root_device().ioport("data")->read();
+ edit_keys = machine().root_device().ioport("data")->read();
/* toggle data reg according to transitions */
- state->m_panel_data_reg ^= edit_keys & (~state->m_old_edit_keys);
+ m_panel_data_reg ^= edit_keys & (~m_old_edit_keys);
/* remember new state of edit keys */
- state->m_old_edit_keys = edit_keys;
+ m_old_edit_keys = edit_keys;
/* read new state of control keys */
- control_keys = state->ioport("panel")->read();
+ control_keys = ioport("panel")->read();
/* compute transitions */
- control_transitions = control_keys & (~state->m_old_control_keys);
+ control_transitions = control_keys & (~m_old_control_keys);
/* process commands */
if (control_transitions & panel_run)
{ /* toggle run/stop state */
- device->state().set_state_int(APEXC_STATE, ! device->state().state_int(APEXC_STATE));
+ device.state().set_state_int(APEXC_STATE, ! device.state().state_int(APEXC_STATE));
}
while (control_transitions & (panel_CR | panel_A | panel_R | panel_ML | panel_HB))
@@ -467,10 +467,10 @@ static INTERRUPT_GEN( apexc_interrupt )
/* read/write register #reg_id */
if (control_keys & panel_write)
/* write reg */
- device->state().set_state_int(reg_id, state->m_panel_data_reg);
+ device.state().set_state_int(reg_id, m_panel_data_reg);
else
/* read reg */
- state->m_panel_data_reg = device->state().state_int(reg_id);
+ m_panel_data_reg = device.state().state_int(reg_id);
}
}
@@ -479,16 +479,16 @@ static INTERRUPT_GEN( apexc_interrupt )
if (control_keys & panel_write) {
/* write memory */
- space.write_dword(device->state().state_int(APEXC_ML_FULL)<<2, state->m_panel_data_reg);
+ space.write_dword(device.state().state_int(APEXC_ML_FULL)<<2, m_panel_data_reg);
}
else {
/* read memory */
- state->m_panel_data_reg = space.read_dword(device->state().state_int(APEXC_ML_FULL)<<2);
+ m_panel_data_reg = space.read_dword(device.state().state_int(APEXC_ML_FULL)<<2);
}
}
/* remember new state of control keys */
- state->m_old_control_keys = control_keys;
+ m_old_control_keys = control_keys;
}
/*
@@ -869,7 +869,7 @@ static MACHINE_CONFIG_START( apexc, apexc_state )
MCFG_CPU_PROGRAM_MAP(apexc_mem_map)
MCFG_CPU_IO_MAP(apexc_io_map)
/* dummy interrupt: handles the control panel */
- MCFG_CPU_VBLANK_INT("screen", apexc_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", apexc_state, apexc_interrupt)
/*MCFG_CPU_PERIODIC_INT(func, rate)*/
diff --git a/src/mess/drivers/apple3.c b/src/mess/drivers/apple3.c
index 6ff4fbeedd8..32bc648c149 100644
--- a/src/mess/drivers/apple3.c
+++ b/src/mess/drivers/apple3.c
@@ -71,7 +71,7 @@ static MACHINE_CONFIG_START( apple3, apple3_state )
MCFG_CPU_ADD("maincpu", M6502, 2000000) /* 2 MHz */
MCFG_CPU_PROGRAM_MAP(apple3_map)
MCFG_CPU_CONFIG( apple3_m6502_interface )
- MCFG_CPU_PERIODIC_INT(apple3_interrupt, 192)
+ MCFG_CPU_PERIODIC_INT_DRIVER(apple3_state, apple3_interrupt, 192)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_MACHINE_RESET_OVERRIDE(apple3_state, apple3 )
diff --git a/src/mess/drivers/aquarius.c b/src/mess/drivers/aquarius.c
index c75118658f8..5d56ca05545 100644
--- a/src/mess/drivers/aquarius.c
+++ b/src/mess/drivers/aquarius.c
@@ -397,7 +397,7 @@ static MACHINE_CONFIG_START( aquarius, aquarius_state )
MCFG_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz) // ???
MCFG_CPU_PROGRAM_MAP(aquarius_mem)
MCFG_CPU_IO_MAP(aquarius_io)
- MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", aquarius_state, irq0_line_hold)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/arcadia.c b/src/mess/drivers/arcadia.c
index 219c6e10d44..d2bee5442d4 100644
--- a/src/mess/drivers/arcadia.c
+++ b/src/mess/drivers/arcadia.c
@@ -530,7 +530,7 @@ static MACHINE_CONFIG_START( arcadia, arcadia_state )
MCFG_CPU_ADD("maincpu", S2650, 3580000/4) /* 0.895 MHz */
MCFG_CPU_PROGRAM_MAP(arcadia_mem)
MCFG_CPU_IO_MAP(arcadia_io)
- MCFG_CPU_PERIODIC_INT(arcadia_video_line, 262*60)
+ MCFG_CPU_PERIODIC_INT_DRIVER(arcadia_state, arcadia_video_line, 262*60)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
/* video hardware */
diff --git a/src/mess/drivers/b2m.c b/src/mess/drivers/b2m.c
index 198c19c54b4..49001b688f1 100644
--- a/src/mess/drivers/b2m.c
+++ b/src/mess/drivers/b2m.c
@@ -204,7 +204,7 @@ static MACHINE_CONFIG_START( b2m, b2m_state )
MCFG_CPU_ADD("maincpu", I8080, 2000000)
MCFG_CPU_PROGRAM_MAP(b2m_mem)
MCFG_CPU_IO_MAP(b2m_io)
- MCFG_CPU_VBLANK_INT("screen", b2m_vblank_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", b2m_state, b2m_vblank_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/bbc.c b/src/mess/drivers/bbc.c
index cb606d7452b..05a1f1cf3f6 100644
--- a/src/mess/drivers/bbc.c
+++ b/src/mess/drivers/bbc.c
@@ -691,9 +691,9 @@ ROM_END
-static INTERRUPT_GEN( bbcb_vsync )
+INTERRUPT_GEN_MEMBER(bbc_state::bbcb_vsync)
{
- via6522_device *via_0 = device->machine().device<via6522_device>("via6522_0");
+ via6522_device *via_0 = machine().device<via6522_device>("via6522_0");
via_0->write_ca1(1);
via_0->write_ca1(0);
}
@@ -841,8 +841,8 @@ static MACHINE_CONFIG_START( bbca, bbc_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M6502, 2000000) /* 2.00 MHz */
MCFG_CPU_PROGRAM_MAP( bbca_mem)
- MCFG_CPU_VBLANK_INT("screen", bbcb_vsync) /* screen refresh interrupts */
- MCFG_CPU_PERIODIC_INT(bbcb_keyscan, 1000) /* scan keyboard */
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", bbc_state, bbcb_vsync) /* screen refresh interrupts */
+ MCFG_CPU_PERIODIC_INT_DRIVER(bbc_state, bbcb_keyscan, 1000) /* scan keyboard */
MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_MACHINE_START_OVERRIDE(bbc_state, bbca )
@@ -933,8 +933,8 @@ static MACHINE_CONFIG_START( bbcm, bbc_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M65SC02, 2000000) /* 2.00 MHz */
MCFG_CPU_PROGRAM_MAP( bbcm_mem)
- MCFG_CPU_VBLANK_INT("screen", bbcb_vsync) /* screen refresh interrupts */
- MCFG_CPU_PERIODIC_INT(bbcm_keyscan, 1000) /* scan keyboard */
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", bbc_state, bbcb_vsync) /* screen refresh interrupts */
+ MCFG_CPU_PERIODIC_INT_DRIVER(bbc_state, bbcm_keyscan, 1000) /* scan keyboard */
MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_MACHINE_START_OVERRIDE(bbc_state, bbcm )
diff --git a/src/mess/drivers/bmjr.c b/src/mess/drivers/bmjr.c
index d87da0d3cd7..a575363d668 100644
--- a/src/mess/drivers/bmjr.c
+++ b/src/mess/drivers/bmjr.c
@@ -347,7 +347,7 @@ static MACHINE_CONFIG_START( bmjr, bmjr_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu",M6800, XTAL_4MHz/4) //unknown clock / divider
MCFG_CPU_PROGRAM_MAP(bmjr_mem)
- MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", bmjr_state, irq0_line_hold)
/* video hardware */
diff --git a/src/mess/drivers/bml3.c b/src/mess/drivers/bml3.c
index c03772758d6..d55e5072aba 100644
--- a/src/mess/drivers/bml3.c
+++ b/src/mess/drivers/bml3.c
@@ -113,6 +113,8 @@ protected:
virtual void palette_init();
public:
UINT32 screen_update_bml3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(bml3_irq);
+ INTERRUPT_GEN_MEMBER(bml3_timer_firq);
};
#define mc6845_h_char_total (m_crtc_vreg[0])
@@ -600,21 +602,20 @@ static TIMER_DEVICE_CALLBACK( keyboard_callback )
}
#if 0
-static INTERRUPT_GEN( bml3_irq )
+INTERRUPT_GEN_MEMBER(bml3_state::bml3_irq)
{
- device->machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE);
}
#endif
-static INTERRUPT_GEN( bml3_timer_firq )
+INTERRUPT_GEN_MEMBER(bml3_state::bml3_timer_firq)
{
- bml3_state *state = device->machine().driver_data<bml3_state>();
- if(!state->m_firq_mask)
+ if(!m_firq_mask)
{
- state->m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
- state->m_firq_status = 1;
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
+ m_firq_status = 1;
}
}
@@ -889,8 +890,8 @@ static MACHINE_CONFIG_START( bml3, bml3_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu",M6809, XTAL_1MHz)
MCFG_CPU_PROGRAM_MAP(bml3_mem)
- MCFG_CPU_VBLANK_INT("screen", bml3_timer_firq )
-// MCFG_CPU_PERIODIC_INT(bml3_firq,45)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", bml3_state, bml3_timer_firq)
+// MCFG_CPU_PERIODIC_INT_DRIVER(bml3_state, bml3_firq, 45)
// MCFG_MACHINE_RESET_OVERRIDE(bml3_state,bml3)
diff --git a/src/mess/drivers/c128.c b/src/mess/drivers/c128.c
index fed387cc73b..a561e946881 100644
--- a/src/mess/drivers/c128.c
+++ b/src/mess/drivers/c128.c
@@ -1085,13 +1085,13 @@ static MACHINE_CONFIG_START( ntsc, c128_state )
MCFG_CPU_ADD(Z80A_TAG, Z80, VIC6567_CLOCK)
MCFG_CPU_PROGRAM_MAP( z80_mem)
MCFG_CPU_IO_MAP( z80_io)
- MCFG_CPU_VBLANK_INT(SCREEN_VIC_TAG, c128_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_VIC_TAG, c128_state, c128_frame_interrupt)
MCFG_QUANTUM_PERFECT_CPU(Z80A_TAG)
MCFG_CPU_ADD(M8502_TAG, M8502, VIC6567_CLOCK)
MCFG_CPU_PROGRAM_MAP( m8502_mem)
MCFG_CPU_CONFIG( cpu_intf )
- MCFG_CPU_VBLANK_INT(SCREEN_VIC_TAG, c128_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_VIC_TAG, c128_state, c128_frame_interrupt)
MCFG_QUANTUM_PERFECT_CPU(M8502_TAG)
// video hardware
@@ -1192,13 +1192,13 @@ static MACHINE_CONFIG_START( pal, c128_state )
MCFG_CPU_ADD(Z80A_TAG, Z80, VIC6569_CLOCK)
MCFG_CPU_PROGRAM_MAP( z80_mem)
MCFG_CPU_IO_MAP(z80_io)
- MCFG_CPU_VBLANK_INT(SCREEN_VIC_TAG, c128_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_VIC_TAG, c128_state, c128_frame_interrupt)
MCFG_QUANTUM_PERFECT_CPU(Z80A_TAG)
MCFG_CPU_ADD(M8502_TAG, M8502, VIC6569_CLOCK)
MCFG_CPU_PROGRAM_MAP( m8502_mem)
MCFG_CPU_CONFIG( cpu_intf )
- MCFG_CPU_VBLANK_INT(SCREEN_VIC_TAG, c128_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_VIC_TAG, c128_state, c128_frame_interrupt)
MCFG_QUANTUM_PERFECT_CPU(M8502_TAG)
// video hardware
diff --git a/src/mess/drivers/c64.c b/src/mess/drivers/c64.c
index 883fe2a3121..c53c7e5f4b5 100644
--- a/src/mess/drivers/c64.c
+++ b/src/mess/drivers/c64.c
@@ -373,12 +373,11 @@ INPUT_PORTS_END
// vic2_interface vic_intf
//-------------------------------------------------
-static INTERRUPT_GEN( c64_frame_interrupt )
+INTERRUPT_GEN_MEMBER(c64_state::c64_frame_interrupt)
{
- c64_state *state = device->machine().driver_data<c64_state>();
- state->check_interrupts();
- cbm_common_interrupt(device);
+ check_interrupts();
+ cbm_common_interrupt(&device);
}
WRITE_LINE_MEMBER( c64_state::vic_irq_w )
@@ -991,7 +990,7 @@ static MACHINE_CONFIG_START( ntsc, c64_state )
MCFG_CPU_ADD(M6510_TAG, M6510, VIC6567_CLOCK)
MCFG_CPU_PROGRAM_MAP(c64_mem)
MCFG_CPU_CONFIG(cpu_intf)
- MCFG_CPU_VBLANK_INT(SCREEN_TAG, c64_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, c64_state, c64_frame_interrupt)
MCFG_QUANTUM_PERFECT_CPU(M6510_TAG)
// video hardware
@@ -1090,7 +1089,7 @@ static MACHINE_CONFIG_START( pal, c64_state )
MCFG_CPU_ADD(M6510_TAG, M6510, VIC6569_CLOCK)
MCFG_CPU_PROGRAM_MAP(c64_mem)
MCFG_CPU_CONFIG(cpu_intf)
- MCFG_CPU_VBLANK_INT(SCREEN_TAG, c64_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, c64_state, c64_frame_interrupt)
MCFG_QUANTUM_PERFECT_CPU(M6510_TAG)
// video hardware
@@ -1167,7 +1166,7 @@ static MACHINE_CONFIG_START( pal_gs, c64gs_state )
MCFG_CPU_ADD(M6510_TAG, M6510, VIC6569_CLOCK)
MCFG_CPU_PROGRAM_MAP(c64_mem)
MCFG_CPU_CONFIG(c64gs_cpu_intf)
- MCFG_CPU_VBLANK_INT(SCREEN_TAG, c64_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, c64_state, c64_frame_interrupt)
MCFG_QUANTUM_PERFECT_CPU(M6510_TAG)
// video hardware
diff --git a/src/mess/drivers/c65.c b/src/mess/drivers/c65.c
index 50b8ab1ee34..f039fec1087 100644
--- a/src/mess/drivers/c65.c
+++ b/src/mess/drivers/c65.c
@@ -289,9 +289,9 @@ static const vic3_interface c65_vic3_pal_intf = {
c65_c64_mem_r
};
-static INTERRUPT_GEN( vic3_raster_irq )
+INTERRUPT_GEN_MEMBER(c65_state::vic3_raster_irq)
{
- device_t *vic3 = device->machine().device("vic3");
+ device_t *vic3 = machine().device("vic3");
vic3_raster_interrupt_gen(vic3);
}
@@ -306,8 +306,8 @@ static MACHINE_CONFIG_START( c65, c65_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M4510, 3500000) /* or VIC6567_CLOCK, */
MCFG_CPU_PROGRAM_MAP(c65_mem)
- MCFG_CPU_VBLANK_INT("screen", c65_frame_interrupt)
- MCFG_CPU_PERIODIC_INT(vic3_raster_irq, VIC6567_HRETRACERATE)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", c65_state, c65_frame_interrupt)
+ MCFG_CPU_PERIODIC_INT_DRIVER(c65_state, vic3_raster_irq, VIC6567_HRETRACERATE)
MCFG_MACHINE_START_OVERRIDE(c65_state, c65 )
diff --git a/src/mess/drivers/cbmb.c b/src/mess/drivers/cbmb.c
index f24244b848d..3d5165aa4dc 100644
--- a/src/mess/drivers/cbmb.c
+++ b/src/mess/drivers/cbmb.c
@@ -498,7 +498,7 @@ static MACHINE_CONFIG_START( p500, cbmb_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M6509, VIC6567_CLOCK) /* 7.8336 MHz */
MCFG_CPU_PROGRAM_MAP(p500_mem)
- //MCFG_CPU_PERIODIC_INT(vic2_raster_irq, VIC6567_HRETRACERATE)
+ //MCFG_CPU_PERIODIC_INT_DRIVER(cbmb_state, vic2_raster_irq, VIC6567_HRETRACERATE)
MCFG_MACHINE_RESET_OVERRIDE(cbmb_state, cbmb )
diff --git a/src/mess/drivers/cgenie.c b/src/mess/drivers/cgenie.c
index c43f7714010..97ec03a1271 100644
--- a/src/mess/drivers/cgenie.c
+++ b/src/mess/drivers/cgenie.c
@@ -523,8 +523,8 @@ static MACHINE_CONFIG_START( cgenie_common, cgenie_state )
MCFG_CPU_ADD("maincpu", Z80, XTAL_17_73447MHz/8) /* 2,2168 MHz */
MCFG_CPU_PROGRAM_MAP(cgenie_mem)
MCFG_CPU_IO_MAP(cgenie_io)
- MCFG_CPU_VBLANK_INT("screen", cgenie_frame_interrupt)
- MCFG_CPU_PERIODIC_INT(cgenie_timer_interrupt, 40)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", cgenie_state, cgenie_frame_interrupt)
+ MCFG_CPU_PERIODIC_INT_DRIVER(cgenie_state, cgenie_timer_interrupt, 40)
MCFG_QUANTUM_TIME(attotime::from_hz(240))
diff --git a/src/mess/drivers/compis.c b/src/mess/drivers/compis.c
index 69b7d6f158e..b6b817f98cc 100644
--- a/src/mess/drivers/compis.c
+++ b/src/mess/drivers/compis.c
@@ -357,7 +357,7 @@ static MACHINE_CONFIG_START( compis, compis_state )
MCFG_CPU_ADD("maincpu", I80186, 8000000) /* 8 MHz */
MCFG_CPU_PROGRAM_MAP(compis_mem)
MCFG_CPU_IO_MAP(compis_io)
- MCFG_CPU_VBLANK_INT("screen", compis_vblank_int)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", compis_state, compis_vblank_int)
MCFG_CPU_CONFIG(i86_address_mask)
//MCFG_QUANTUM_TIME(attotime::from_hz(60))
@@ -400,7 +400,7 @@ static MACHINE_CONFIG_START( compis2, compis_state )
MCFG_CPU_ADD("maincpu", I80186, 8000000) /* 8 MHz */
MCFG_CPU_PROGRAM_MAP(compis_mem)
MCFG_CPU_IO_MAP(compis_io)
- MCFG_CPU_VBLANK_INT("screen", compis_vblank_int)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", compis_state, compis_vblank_int)
MCFG_CPU_CONFIG(i86_address_mask)
//MCFG_QUANTUM_TIME(attotime::from_hz(60))
diff --git a/src/mess/drivers/concept.c b/src/mess/drivers/concept.c
index e5dfd7b248c..f6560c5580a 100644
--- a/src/mess/drivers/concept.c
+++ b/src/mess/drivers/concept.c
@@ -119,7 +119,7 @@ static MACHINE_CONFIG_START( concept, concept_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, 8182000) /* 16.364 MHz / 2 */
MCFG_CPU_PROGRAM_MAP(concept_memmap)
- MCFG_CPU_VBLANK_INT("screen", concept_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", concept_state, concept_interrupt)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
diff --git a/src/mess/drivers/elwro800.c b/src/mess/drivers/elwro800.c
index 2d14569800c..1fdb121ac20 100644
--- a/src/mess/drivers/elwro800.c
+++ b/src/mess/drivers/elwro800.c
@@ -50,6 +50,7 @@ public:
DECLARE_READ8_MEMBER(elwro800jr_io_r);
DECLARE_WRITE8_MEMBER(elwro800jr_io_w);
DECLARE_MACHINE_RESET(elwro800);
+ INTERRUPT_GEN_MEMBER(elwro800jr_interrupt);
};
@@ -535,9 +536,9 @@ static const cassette_interface elwro800jr_cassette_interface =
NULL
};
-static INTERRUPT_GEN( elwro800jr_interrupt )
+INTERRUPT_GEN_MEMBER(elwro800_state::elwro800jr_interrupt)
{
- device->execute().set_input_line(0, HOLD_LINE);
+ device.execute().set_input_line(0, HOLD_LINE);
}
static const floppy_interface elwro800jr_floppy_interface =
@@ -578,7 +579,7 @@ static MACHINE_CONFIG_START( elwro800, elwro800_state )
MCFG_CPU_ADD("maincpu",Z80, 3500000) /* 3.5 MHz */
MCFG_CPU_PROGRAM_MAP(elwro800_mem)
MCFG_CPU_IO_MAP(elwro800_io)
- MCFG_CPU_VBLANK_INT("screen", elwro800jr_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", elwro800_state, elwro800jr_interrupt)
MCFG_MACHINE_RESET_OVERRIDE(elwro800_state,elwro800)
diff --git a/src/mess/drivers/fmtowns.c b/src/mess/drivers/fmtowns.c
index 50b8ac3a95e..f91b1c27bc5 100644
--- a/src/mess/drivers/fmtowns.c
+++ b/src/mess/drivers/fmtowns.c
@@ -2670,7 +2670,7 @@ static MACHINE_CONFIG_FRAGMENT( towns_base )
MCFG_CPU_ADD("maincpu",I386, 16000000)
MCFG_CPU_PROGRAM_MAP(towns_mem)
MCFG_CPU_IO_MAP(towns_io)
- MCFG_CPU_VBLANK_INT("screen", towns_vsync_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
// MCFG_MACHINE_RESET_OVERRIDE(towns_state,towns)
@@ -2741,7 +2741,7 @@ static MACHINE_CONFIG_DERIVED( townsux, towns )
MCFG_CPU_REPLACE("maincpu",I386, 16000000)
MCFG_CPU_PROGRAM_MAP(ux_mem)
MCFG_CPU_IO_MAP(towns_io)
- MCFG_CPU_VBLANK_INT("screen", towns_vsync_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
MCFG_RAM_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("2M")
@@ -2753,7 +2753,7 @@ static MACHINE_CONFIG_DERIVED( townssj, towns )
MCFG_CPU_REPLACE("maincpu",I486, 66000000)
MCFG_CPU_PROGRAM_MAP(towns_mem)
MCFG_CPU_IO_MAP(towns_io)
- MCFG_CPU_VBLANK_INT("screen", towns_vsync_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
MCFG_RAM_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("8M")
@@ -2765,7 +2765,7 @@ static MACHINE_CONFIG_DERIVED( townshr, towns )
MCFG_CPU_REPLACE("maincpu",I486, 20000000)
MCFG_CPU_PROGRAM_MAP(towns_mem)
MCFG_CPU_IO_MAP(towns_io)
- MCFG_CPU_VBLANK_INT("screen", towns_vsync_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
MCFG_RAM_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("4M")
@@ -2778,7 +2778,7 @@ static MACHINE_CONFIG_START( marty, marty_state )
MCFG_CPU_REPLACE("maincpu",I386, 16000000)
MCFG_CPU_PROGRAM_MAP(marty_mem)
MCFG_CPU_IO_MAP(towns_io)
- MCFG_CPU_VBLANK_INT("screen", towns_vsync_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
MCFG_RAM_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("6M")
diff --git a/src/mess/drivers/fp1100.c b/src/mess/drivers/fp1100.c
index c2d0d23dd44..42655360778 100644
--- a/src/mess/drivers/fp1100.c
+++ b/src/mess/drivers/fp1100.c
@@ -115,6 +115,7 @@ public:
virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
+ INTERRUPT_GEN_MEMBER(fp1100_vblank_irq);
};
void fp1100_state::video_start()
@@ -394,12 +395,11 @@ static const mc6845_interface mc6845_intf =
NULL /* update address callback */
};
-static INTERRUPT_GEN( fp1100_vblank_irq )
+INTERRUPT_GEN_MEMBER(fp1100_state::fp1100_vblank_irq)
{
- fp1100_state *state = device->machine().driver_data<fp1100_state>();
- if(state->irq_mask & 0x10)
- device->machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xf0);
+ if(irq_mask & 0x10)
+ machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xf0);
}
static MACHINE_CONFIG_START( fp1100, fp1100_state )
@@ -407,7 +407,7 @@ static MACHINE_CONFIG_START( fp1100, fp1100_state )
MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz) //unknown clock
MCFG_CPU_PROGRAM_MAP(fp1100_map)
MCFG_CPU_IO_MAP(fp1100_io)
- MCFG_CPU_VBLANK_INT("screen",fp1100_vblank_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", fp1100_state, fp1100_vblank_irq)
MCFG_CPU_ADD( "sub", UPD7801, XTAL_4MHz ) //unknown clock
MCFG_CPU_PROGRAM_MAP( fp1100_slave_map )
diff --git a/src/mess/drivers/galaxy.c b/src/mess/drivers/galaxy.c
index 36960f6019b..01fabca235d 100644
--- a/src/mess/drivers/galaxy.c
+++ b/src/mess/drivers/galaxy.c
@@ -187,7 +187,7 @@ static MACHINE_CONFIG_START( galaxy, galaxy_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, XTAL / 2)
MCFG_CPU_PROGRAM_MAP(galaxy_mem)
- MCFG_CPU_VBLANK_INT("screen", galaxy_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxy_state, galaxy_interrupt)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(50)
@@ -223,7 +223,7 @@ static MACHINE_CONFIG_START( galaxyp, galaxy_state )
MCFG_CPU_ADD("maincpu", Z80, XTAL / 2)
MCFG_CPU_PROGRAM_MAP(galaxyp_mem)
MCFG_CPU_IO_MAP(galaxyp_io)
- MCFG_CPU_VBLANK_INT("screen", galaxy_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxy_state, galaxy_interrupt)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(50)
diff --git a/src/mess/drivers/gamecom.c b/src/mess/drivers/gamecom.c
index 27b3ab6fb11..5bf5ea5d6fc 100644
--- a/src/mess/drivers/gamecom.c
+++ b/src/mess/drivers/gamecom.c
@@ -89,9 +89,9 @@ UINT32 gamecom_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
return 0;
}
-static INTERRUPT_GEN( gamecom_interrupt )
+INTERRUPT_GEN_MEMBER(gamecom_state::gamecom_interrupt)
{
- device->machine().device("maincpu")->execute().set_input_line(LCDC_INT, ASSERT_LINE );
+ machine().device("maincpu")->execute().set_input_line(LCDC_INT, ASSERT_LINE );
}
static MACHINE_CONFIG_START( gamecom, gamecom_state )
@@ -99,7 +99,7 @@ static MACHINE_CONFIG_START( gamecom, gamecom_state )
MCFG_CPU_ADD( "maincpu", SM8500, XTAL_11_0592MHz/2 ) /* actually it's an sm8521 microcontroller containing an sm8500 cpu */
MCFG_CPU_PROGRAM_MAP( gamecom_mem_map)
MCFG_CPU_CONFIG( gamecom_cpu_config )
- MCFG_CPU_VBLANK_INT("screen", gamecom_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", gamecom_state, gamecom_interrupt)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
diff --git a/src/mess/drivers/gb.c b/src/mess/drivers/gb.c
index 3e0685c50c2..c40aa17ae19 100644
--- a/src/mess/drivers/gb.c
+++ b/src/mess/drivers/gb.c
@@ -562,7 +562,7 @@ static MACHINE_CONFIG_START( gb_common, gb_state )
MCFG_CPU_ADD("maincpu", LR35902, 4194304) /* 4.194304 MHz */
MCFG_CPU_PROGRAM_MAP(gb_map)
MCFG_LR35902_CONFIG(dmg_cpu_reset)
- MCFG_CPU_VBLANK_INT("screen", gb_scanline_interrupt) /* 1 dummy int each frame */
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", gb_state, gb_scanline_interrupt) /* 1 dummy int each frame */
MCFG_QUANTUM_TIME(attotime::from_hz(60))
@@ -659,7 +659,7 @@ static MACHINE_CONFIG_START( megaduck, gb_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", LR35902, 4194304) /* 4.194304 MHz */
MCFG_CPU_PROGRAM_MAP( megaduck_map)
- MCFG_CPU_VBLANK_INT("screen", gb_scanline_interrupt) /* 1 int each scanline ! */
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", gb_state, gb_scanline_interrupt) /* 1 int each scanline ! */
MCFG_LR35902_CONFIG(megaduck_cpu_reset)
MCFG_SCREEN_ADD("screen", LCD)
diff --git a/src/mess/drivers/geniusiq.c b/src/mess/drivers/geniusiq.c
index e9657ed7903..9dade9585c2 100644
--- a/src/mess/drivers/geniusiq.c
+++ b/src/mess/drivers/geniusiq.c
@@ -576,7 +576,7 @@ static MACHINE_CONFIG_START( geniusiq, geniusiq_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) // The main crystal is at 32MHz, not sure whats the CPU freq
MCFG_CPU_PROGRAM_MAP(geniusiq_mem)
- MCFG_CPU_PERIODIC_INT(irq6_line_hold, 125) // the internal clock is increased by 1 sec every 125 interrupts
+ MCFG_CPU_PERIODIC_INT_DRIVER(geniusiq_state, irq6_line_hold, 125) // the internal clock is increased by 1 sec every 125 interrupts
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/gmaster.c b/src/mess/drivers/gmaster.c
index 3e0bda8ab9e..8914e049968 100644
--- a/src/mess/drivers/gmaster.c
+++ b/src/mess/drivers/gmaster.c
@@ -205,9 +205,9 @@ UINT32 gmaster_state::screen_update_gmaster(screen_device &screen, bitmap_ind16
}
-static INTERRUPT_GEN( gmaster_interrupt )
+INTERRUPT_GEN_MEMBER(gmaster_state::gmaster_interrupt)
{
- device->machine().device("maincpu")->execute().set_input_line(UPD7810_INTFE1, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(UPD7810_INTFE1, ASSERT_LINE);
}
static const UPD7810_CONFIG config = {
@@ -221,7 +221,7 @@ static MACHINE_CONFIG_START( gmaster, gmaster_state )
MCFG_CPU_PROGRAM_MAP(gmaster_mem)
MCFG_CPU_IO_MAP( gmaster_io)
MCFG_CPU_CONFIG( config )
- MCFG_CPU_VBLANK_INT("screen", gmaster_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", gmaster_state, gmaster_interrupt)
MCFG_SCREEN_ADD("screen", LCD)
MCFG_SCREEN_REFRESH_RATE(60)
diff --git a/src/mess/drivers/h19.c b/src/mess/drivers/h19.c
index 6fc646cca86..8c1d5339218 100644
--- a/src/mess/drivers/h19.c
+++ b/src/mess/drivers/h19.c
@@ -397,7 +397,7 @@ static MACHINE_CONFIG_START( h19, h19_state )
MCFG_CPU_ADD("maincpu",Z80, H19_CLOCK) // From schematics
MCFG_CPU_PROGRAM_MAP(h19_mem)
MCFG_CPU_IO_MAP(h19_io)
- //MCFG_DEVICE_PERIODIC_INT(irq0_line_hold, 50) // for testing, causes a keyboard scan
+ //MCFG_DEVICE_PERIODIC_INT_DRIVER(h19_state, irq0_line_hold, 50) // for testing, causes a keyboard scan
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/hec2hrp.c b/src/mess/drivers/hec2hrp.c
index 0eed66f9b7a..177d6309a23 100644
--- a/src/mess/drivers/hec2hrp.c
+++ b/src/mess/drivers/hec2hrp.c
@@ -440,7 +440,7 @@ static MACHINE_CONFIG_START( hec2hr, hec2hrp_state )
MCFG_CPU_ADD("maincpu",Z80, XTAL_5MHz)
MCFG_CPU_PROGRAM_MAP(hec2hrp_mem)
MCFG_CPU_IO_MAP(hec2hrp_io)
- MCFG_CPU_PERIODIC_INT(irq0_line_hold,50) /* put on the Z80 irq in Hz*/
+ MCFG_CPU_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) /* put on the Z80 irq in Hz*/
MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrp)
MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrp)
@@ -483,7 +483,7 @@ static MACHINE_CONFIG_START( hec2hrp, hec2hrp_state )
MCFG_CPU_ADD("maincpu",Z80, XTAL_5MHz)
MCFG_CPU_PROGRAM_MAP(hec2hrp_mem)
MCFG_CPU_IO_MAP(hec2hrp_io)
- MCFG_CPU_PERIODIC_INT(irq0_line_hold,50) /* put on the Z80 irq in Hz*/
+ MCFG_CPU_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) /* put on the Z80 irq in Hz*/
MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrp)
MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrp)
@@ -526,7 +526,7 @@ static MACHINE_CONFIG_START( hec2mx40, hec2hrp_state )
MCFG_CPU_ADD("maincpu",Z80, XTAL_5MHz)
MCFG_CPU_PROGRAM_MAP(hec2hrx_mem)
MCFG_CPU_IO_MAP(hec2mx40_io)
- MCFG_CPU_PERIODIC_INT(irq0_line_hold,50) // put on the Z80 irq in Hz
+ MCFG_CPU_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) // put on the Z80 irq in Hz
/* Disc II unit */
MCFG_CPU_ADD("disc2cpu",Z80, XTAL_4MHz)
@@ -575,7 +575,7 @@ static MACHINE_CONFIG_START( hec2hrx, hec2hrp_state )
MCFG_CPU_ADD("maincpu",Z80, XTAL_5MHz)
MCFG_CPU_PROGRAM_MAP(hec2hrx_mem)
MCFG_CPU_IO_MAP(hec2hrx_io)
- MCFG_CPU_PERIODIC_INT(irq0_line_hold,50) // put on the Z80 irq in Hz
+ MCFG_CPU_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) // put on the Z80 irq in Hz
MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrx)
MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrx)
@@ -625,7 +625,7 @@ static MACHINE_CONFIG_START( hec2mdhrx, hec2hrp_state )
MCFG_CPU_ADD("maincpu",Z80, XTAL_5MHz)
MCFG_CPU_PROGRAM_MAP(hec2hrx_mem)
MCFG_CPU_IO_MAP(hec2mdhrx_io)
- MCFG_CPU_PERIODIC_INT(irq0_line_hold,50) // put on the Z80 irq in Hz
+ MCFG_CPU_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) // put on the Z80 irq in Hz
MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2mdhrx)
MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2mdhrx)
@@ -673,7 +673,7 @@ static MACHINE_CONFIG_START( hec2mx80, hec2hrp_state )
MCFG_CPU_ADD("maincpu",Z80, XTAL_5MHz)
MCFG_CPU_PROGRAM_MAP(hec2hrx_mem)
MCFG_CPU_IO_MAP(hec2mx80_io)
- MCFG_CPU_PERIODIC_INT(irq0_line_hold,50) // put on the Z80 irq in Hz
+ MCFG_CPU_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) // put on the Z80 irq in Hz
MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrx)
MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrx)
diff --git a/src/mess/drivers/homelab.c b/src/mess/drivers/homelab.c
index 88ba03d727c..c876136dd33 100644
--- a/src/mess/drivers/homelab.c
+++ b/src/mess/drivers/homelab.c
@@ -73,13 +73,13 @@ public:
DECLARE_VIDEO_START(brailab4);
UINT32 screen_update_homelab2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_homelab3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(homelab_frame);
};
-static INTERRUPT_GEN( homelab_frame )
+INTERRUPT_GEN_MEMBER(homelab_state::homelab_frame)
{
- homelab_state *state = device->machine().driver_data<homelab_state>();
- if (state->m_nmi)
- state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
+ if (m_nmi)
+ m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
READ8_MEMBER( homelab_state::key_r ) // offset 27F-2FE
@@ -741,7 +741,7 @@ static MACHINE_CONFIG_START( homelab, homelab_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz / 2)
MCFG_CPU_PROGRAM_MAP(homelab2_mem)
- MCFG_CPU_VBLANK_INT("screen", homelab_frame)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", homelab_state, homelab_frame)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/homez80.c b/src/mess/drivers/homez80.c
index aadaa81caf8..2260c058ed9 100644
--- a/src/mess/drivers/homez80.c
+++ b/src/mess/drivers/homez80.c
@@ -39,6 +39,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(homez80_interrupt);
};
@@ -271,11 +272,10 @@ static GFXDECODE_START( homez80 )
GFXDECODE_END
-static INTERRUPT_GEN( homez80_interrupt )
+INTERRUPT_GEN_MEMBER(homez80_state::homez80_interrupt)
{
- homez80_state *state = device->machine().driver_data<homez80_state>();
- device->execute().set_input_line(0, (state->m_irq) ? HOLD_LINE : CLEAR_LINE);
- state->m_irq ^= 1;
+ device.execute().set_input_line(0, (m_irq) ? HOLD_LINE : CLEAR_LINE);
+ m_irq ^= 1;
}
static MACHINE_CONFIG_START( homez80, homez80_state )
@@ -283,7 +283,7 @@ static MACHINE_CONFIG_START( homez80, homez80_state )
MCFG_CPU_ADD("maincpu",Z80, XTAL_8MHz / 2)
MCFG_CPU_PROGRAM_MAP(homez80_mem)
MCFG_CPU_IO_MAP(homez80_io)
- MCFG_CPU_PERIODIC_INT(homez80_interrupt, 50)
+ MCFG_CPU_PERIODIC_INT_DRIVER(homez80_state, homez80_interrupt, 50)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/interact.c b/src/mess/drivers/interact.c
index 38e7a6c50f2..56bf2bbac00 100644
--- a/src/mess/drivers/interact.c
+++ b/src/mess/drivers/interact.c
@@ -143,7 +143,7 @@ static MACHINE_CONFIG_START( interact, interact_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", I8080, XTAL_2MHz)
MCFG_CPU_PROGRAM_MAP(interact_mem)
- MCFG_CPU_PERIODIC_INT(irq0_line_hold,50) /* put on the I8080 irq in Hz*/
+ MCFG_CPU_PERIODIC_INT_DRIVER(interact_state, irq0_line_hold, 50) /* put on the I8080 irq in Hz*/
MCFG_MACHINE_RESET_OVERRIDE(interact_state,interact)
MCFG_MACHINE_START_OVERRIDE(interact_state,interact)
@@ -184,7 +184,7 @@ static MACHINE_CONFIG_START( hector1, interact_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, XTAL_1_75MHz)
MCFG_CPU_PROGRAM_MAP(interact_mem)
- MCFG_CPU_PERIODIC_INT(irq0_line_hold,50) /* put on the I8080 irq in Hz*/
+ MCFG_CPU_PERIODIC_INT_DRIVER(interact_state, irq0_line_hold, 50) /* put on the I8080 irq in Hz*/
MCFG_MACHINE_RESET_OVERRIDE(interact_state,interact)
MCFG_MACHINE_START_OVERRIDE(interact_state,interact)
diff --git a/src/mess/drivers/intv.c b/src/mess/drivers/intv.c
index 98097935096..f2afa25fd32 100644
--- a/src/mess/drivers/intv.c
+++ b/src/mess/drivers/intv.c
@@ -801,17 +801,17 @@ static TIMER_CALLBACK(intv_interrupt2_complete)
machine.device("keyboard")->execute().set_input_line(0, CLEAR_LINE);
}
-static INTERRUPT_GEN( intv_interrupt2 )
+INTERRUPT_GEN_MEMBER(intv_state::intv_interrupt2)
{
- device->machine().device("keyboard")->execute().set_input_line(0, ASSERT_LINE);
- device->machine().scheduler().timer_set(device->machine().device<cpu_device>("keyboard")->cycles_to_attotime(100), FUNC(intv_interrupt2_complete));
+ machine().device("keyboard")->execute().set_input_line(0, ASSERT_LINE);
+ machine().scheduler().timer_set(machine().device<cpu_device>("keyboard")->cycles_to_attotime(100), FUNC(intv_interrupt2_complete));
}
static MACHINE_CONFIG_START( intv, intv_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", CP1610, XTAL_3_579545MHz/4) /* Colorburst/4 */
MCFG_CPU_PROGRAM_MAP(intv_mem)
- MCFG_CPU_VBLANK_INT("screen", intv_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", intv_state, intv_interrupt)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
@@ -874,7 +874,7 @@ static MACHINE_CONFIG_DERIVED( intvkbd, intv )
MCFG_CPU_ADD("keyboard", M6502, XTAL_3_579545MHz/2) /* Colorburst/2 */
MCFG_CPU_PROGRAM_MAP(intvkbd2_mem)
- MCFG_CPU_VBLANK_INT("screen", intv_interrupt2)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", intv_state, intv_interrupt2)
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
diff --git a/src/mess/drivers/ip22.c b/src/mess/drivers/ip22.c
index 13cd538907b..4577b42b408 100644
--- a/src/mess/drivers/ip22.c
+++ b/src/mess/drivers/ip22.c
@@ -131,6 +131,7 @@ public:
DECLARE_DRIVER_INIT(ip225015);
virtual void machine_start();
virtual void machine_reset();
+ INTERRUPT_GEN_MEMBER(ip22_vbl);
};
@@ -1609,14 +1610,13 @@ static void rtc_update(ip22_state *state)
}
}
-static INTERRUPT_GEN( ip22_vbl )
+INTERRUPT_GEN_MEMBER(ip22_state::ip22_vbl)
{
- ip22_state *state = device->machine().driver_data<ip22_state>();
- state->m_nIntCounter++;
-// if( state->m_nIntCounter == 60 )
+ m_nIntCounter++;
+// if( m_nIntCounter == 60 )
{
- state->m_nIntCounter = 0;
- rtc_update(state);
+ m_nIntCounter = 0;
+ rtc_update(this);
}
}
@@ -1635,7 +1635,7 @@ static MACHINE_CONFIG_START( ip225015, ip22_state )
MCFG_CPU_ADD( "maincpu", R5000BE, 50000000*3 )
MCFG_CPU_CONFIG( config )
MCFG_CPU_PROGRAM_MAP( ip225015_map)
- MCFG_CPU_VBLANK_INT("screen", ip22_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", ip22_state, ip22_vbl)
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -1676,14 +1676,14 @@ static MACHINE_CONFIG_DERIVED( ip224613, ip225015 )
MCFG_CPU_REPLACE( "maincpu", R4600BE, 133333333 )
MCFG_CPU_CONFIG( config )
MCFG_CPU_PROGRAM_MAP( ip225015_map)
- MCFG_CPU_VBLANK_INT("screen", ip22_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", ip22_state, ip22_vbl)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( ip244415, ip225015 )
MCFG_CPU_REPLACE( "maincpu", R4600BE, 150000000 )
MCFG_CPU_CONFIG( config )
MCFG_CPU_PROGRAM_MAP( ip225015_map)
- MCFG_CPU_VBLANK_INT("screen", ip22_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", ip22_state, ip22_vbl)
MACHINE_CONFIG_END
ROM_START( ip225015 )
diff --git a/src/mess/drivers/iq151.c b/src/mess/drivers/iq151.c
index 8e6710758a4..f0c89bb79ac 100644
--- a/src/mess/drivers/iq151.c
+++ b/src/mess/drivers/iq151.c
@@ -95,6 +95,7 @@ public:
UINT8 m_cassette_data;
iq151cart_slot_device * m_carts[5];
DECLARE_DRIVER_INIT(iq151);
+ INTERRUPT_GEN_MEMBER(iq151_vblank_interrupt);
};
READ8_MEMBER(iq151_state::keyboard_row_r)
@@ -319,12 +320,11 @@ WRITE_LINE_MEMBER( iq151_state::pic_set_int_line )
m_maincpu->set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
-static INTERRUPT_GEN( iq151_vblank_interrupt )
+INTERRUPT_GEN_MEMBER(iq151_state::iq151_vblank_interrupt)
{
- iq151_state *state = device->machine().driver_data<iq151_state>();
- pic8259_ir6_w(state->m_pic, state->m_vblank_irq_state & 1);
- state->m_vblank_irq_state ^= 1;
+ pic8259_ir6_w(m_pic, m_vblank_irq_state & 1);
+ m_vblank_irq_state ^= 1;
}
static IRQ_CALLBACK(iq151_irq_callback)
@@ -435,7 +435,7 @@ static MACHINE_CONFIG_START( iq151, iq151_state )
MCFG_CPU_ADD("maincpu",I8080, XTAL_2MHz)
MCFG_CPU_PROGRAM_MAP(iq151_mem)
MCFG_CPU_IO_MAP(iq151_io)
- MCFG_CPU_VBLANK_INT("screen", iq151_vblank_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", iq151_state, iq151_vblank_interrupt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/kaypro.c b/src/mess/drivers/kaypro.c
index 4f85564c886..55a538e50cb 100644
--- a/src/mess/drivers/kaypro.c
+++ b/src/mess/drivers/kaypro.c
@@ -239,7 +239,7 @@ static MACHINE_CONFIG_START( kayproii, kaypro_state )
MCFG_CPU_ADD("maincpu", Z80, XTAL_2_5MHz)
MCFG_CPU_PROGRAM_MAP(kaypro_map)
MCFG_CPU_IO_MAP(kayproii_io)
- MCFG_CPU_VBLANK_INT("screen", kay_kbd_interrupt) /* this doesn't actually exist, it is to run the keyboard */
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", kaypro_state, kay_kbd_interrupt) /* this doesn't actually exist, it is to run the keyboard */
MCFG_CPU_CONFIG(kayproii_daisy_chain)
MCFG_MACHINE_START_OVERRIDE(kaypro_state, kayproii )
@@ -284,7 +284,7 @@ static MACHINE_CONFIG_START( kaypro2x, kaypro_state )
MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(kaypro_map)
MCFG_CPU_IO_MAP(kaypro2x_io)
- MCFG_CPU_VBLANK_INT("screen", kay_kbd_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", kaypro_state, kay_kbd_interrupt)
MCFG_CPU_CONFIG(kaypro2x_daisy_chain)
MCFG_MACHINE_RESET_OVERRIDE(kaypro_state, kaypro2x )
diff --git a/src/mess/drivers/lisa.c b/src/mess/drivers/lisa.c
index e811d5fef85..7d8cf98c323 100644
--- a/src/mess/drivers/lisa.c
+++ b/src/mess/drivers/lisa.c
@@ -135,7 +135,7 @@ static MACHINE_CONFIG_START( lisa, lisa_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, 5093760) /* 20.37504 MHz / 4 */
MCFG_CPU_PROGRAM_MAP(lisa_map)
- MCFG_CPU_VBLANK_INT("screen", lisa_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", lisa_state, lisa_interrupt)
MCFG_CPU_ADD(COP421_TAG, COP421, 3900000)
MCFG_CPU_IO_MAP(lisa_cop_io_map)
diff --git a/src/mess/drivers/mac.c b/src/mess/drivers/mac.c
index c837634eeac..0226274d105 100644
--- a/src/mess/drivers/mac.c
+++ b/src/mess/drivers/mac.c
@@ -78,18 +78,17 @@
// CA2: SCSI interrupt = 0x01
// CB1: ASC interrupt = 0x10
-static INTERRUPT_GEN( mac_rbv_vbl )
+INTERRUPT_GEN_MEMBER(mac_state::mac_rbv_vbl)
{
- mac_state *mac = device->machine().driver_data<mac_state>();
- mac->m_rbv_regs[2] &= ~0x40; // set vblank signal
- mac->m_rbv_vbltime = 10;
+ m_rbv_regs[2] &= ~0x40; // set vblank signal
+ m_rbv_vbltime = 10;
// printf("RBV: raising VBL!\n");
- if (mac->m_rbv_regs[0x12] & 0x40)
+ if (m_rbv_regs[0x12] & 0x40)
{
- mac->rbv_recalc_irqs();
+ rbv_recalc_irqs();
}
}
@@ -1110,7 +1109,7 @@ static MACHINE_CONFIG_DERIVED( maclc, macii )
MCFG_CPU_REPLACE("maincpu", M68020HMMU, C15M)
MCFG_CPU_PROGRAM_MAP(maclc_map)
- MCFG_CPU_VBLANK_INT(MAC_SCREEN_NAME, mac_rbv_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
MCFG_PALETTE_LENGTH(256)
@@ -1147,7 +1146,7 @@ static MACHINE_CONFIG_DERIVED( maclc2, maclc )
MCFG_CPU_REPLACE("maincpu", M68030, C15M)
MCFG_CPU_PROGRAM_MAP(maclc_map)
- MCFG_CPU_VBLANK_INT(MAC_SCREEN_NAME, mac_rbv_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
MCFG_RAM_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("4M")
@@ -1164,7 +1163,7 @@ static MACHINE_CONFIG_DERIVED( maclc3, maclc )
MCFG_CPU_REPLACE("maincpu", M68030, 25000000)
MCFG_CPU_PROGRAM_MAP(maclc3_map)
- MCFG_CPU_VBLANK_INT(MAC_SCREEN_NAME, mac_rbv_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
MCFG_VIDEO_START_OVERRIDE(mac_state,macsonora)
MCFG_VIDEO_RESET_OVERRIDE(mac_state,macsonora)
@@ -1193,7 +1192,7 @@ static MACHINE_CONFIG_DERIVED( maciivx, maclc )
MCFG_CPU_REPLACE("maincpu", M68030, C32M)
MCFG_CPU_PROGRAM_MAP(maclc3_map)
- MCFG_CPU_VBLANK_INT(MAC_SCREEN_NAME, mac_rbv_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
MCFG_VIDEO_START_OVERRIDE(mac_state,macv8)
MCFG_VIDEO_RESET_OVERRIDE(mac_state,macrbv)
@@ -1217,7 +1216,7 @@ static MACHINE_CONFIG_DERIVED( maciivi, maclc )
MCFG_CPU_REPLACE("maincpu", M68030, C15M)
MCFG_CPU_PROGRAM_MAP(maclc3_map)
- MCFG_CPU_VBLANK_INT(MAC_SCREEN_NAME, mac_rbv_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
MCFG_VIDEO_START_OVERRIDE(mac_state,macv8)
MCFG_VIDEO_RESET_OVERRIDE(mac_state,macrbv)
@@ -1486,7 +1485,7 @@ static MACHINE_CONFIG_DERIVED( maciici, macii )
MCFG_CPU_REPLACE("maincpu", M68030, 25000000)
MCFG_CPU_PROGRAM_MAP(maciici_map)
- MCFG_CPU_VBLANK_INT(MAC_SCREEN_NAME, mac_rbv_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
MCFG_PALETTE_LENGTH(256)
@@ -1515,7 +1514,7 @@ static MACHINE_CONFIG_DERIVED( maciisi, macii )
MCFG_CPU_REPLACE("maincpu", M68030, 20000000)
MCFG_CPU_PROGRAM_MAP(maciici_map)
- MCFG_CPU_VBLANK_INT(MAC_SCREEN_NAME, mac_rbv_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
MCFG_PALETTE_LENGTH(256)
diff --git a/src/mess/drivers/mbee.c b/src/mess/drivers/mbee.c
index d9b41e4d9c3..8cde74fe708 100644
--- a/src/mess/drivers/mbee.c
+++ b/src/mess/drivers/mbee.c
@@ -712,7 +712,7 @@ static MACHINE_CONFIG_START( mbeeic, mbee_state )
MCFG_CPU_PROGRAM_MAP(mbeeic_mem)
MCFG_CPU_IO_MAP(mbeeic_io)
MCFG_CPU_CONFIG(mbee_daisy_chain)
- //MCFG_CPU_VBLANK_INT("screen", mbee_interrupt)
+ //MCFG_CPU_VBLANK_INT_DRIVER("screen", mbee_state, mbee_interrupt)
MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee )
diff --git a/src/mess/drivers/microtan.c b/src/mess/drivers/microtan.c
index 8725c67e40d..7d9f0eff369 100644
--- a/src/mess/drivers/microtan.c
+++ b/src/mess/drivers/microtan.c
@@ -219,7 +219,7 @@ static MACHINE_CONFIG_START( microtan, microtan_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M6502, 750000) // 750 kHz
MCFG_CPU_PROGRAM_MAP(microtan_map)
- MCFG_CPU_VBLANK_INT("screen", microtan_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", microtan_state, microtan_interrupt)
/* video hardware - include overscan */
diff --git a/src/mess/drivers/msx.c b/src/mess/drivers/msx.c
index e6e3a8e47bf..d7a71473d66 100644
--- a/src/mess/drivers/msx.c
+++ b/src/mess/drivers/msx.c
@@ -1069,7 +1069,7 @@ static MACHINE_CONFIG_START( msx, msx_state )
MCFG_CPU_ADD("maincpu", Z80, XTAL_10_738635MHz/3) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(msx_memory_map)
MCFG_CPU_IO_MAP(msx_io_map)
- MCFG_CPU_VBLANK_INT("screen", msx_interrupt) /* Needed for mouse updates */
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", msx_state, msx_interrupt) /* Needed for mouse updates */
MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_MACHINE_START_OVERRIDE(msx_state, msx )
diff --git a/src/mess/drivers/mz2500.c b/src/mess/drivers/mz2500.c
index 9f8ab7ef96c..88da6555839 100644
--- a/src/mess/drivers/mz2500.c
+++ b/src/mess/drivers/mz2500.c
@@ -164,6 +164,7 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_mz2500(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(mz2500_vbl);
};
@@ -1821,13 +1822,12 @@ static GFXDECODE_START( mz2500 )
GFXDECODE_ENTRY("pcg", 0, mz2500_pcg_layout_3bpp, 0, 4)
GFXDECODE_END
-static INTERRUPT_GEN( mz2500_vbl )
+INTERRUPT_GEN_MEMBER(mz2500_state::mz2500_vbl)
{
- mz2500_state *state = device->machine().driver_data<mz2500_state>();
- if(state->m_irq_mask[0])
- device->execute().set_input_line_and_vector(0, HOLD_LINE, state->m_irq_vector[0]);
+ if(m_irq_mask[0])
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[0]);
- state->m_cg_clear_flag = 0;
+ m_cg_clear_flag = 0;
}
static READ8_DEVICE_HANDLER( mz2500_porta_r )
@@ -2097,7 +2097,7 @@ static MACHINE_CONFIG_START( mz2500, mz2500_state )
MCFG_CPU_ADD("maincpu", Z80, 6000000)
MCFG_CPU_PROGRAM_MAP(mz2500_map)
MCFG_CPU_IO_MAP(mz2500_io)
- MCFG_CPU_VBLANK_INT("screen", mz2500_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", mz2500_state, mz2500_vbl)
MCFG_I8255_ADD( "i8255_0", ppi8255_intf )
diff --git a/src/mess/drivers/newbrain.c b/src/mess/drivers/newbrain.c
index 0724ea2b622..5c725efc15b 100644
--- a/src/mess/drivers/newbrain.c
+++ b/src/mess/drivers/newbrain.c
@@ -1329,14 +1329,13 @@ void newbrain_state::machine_reset()
timer_set(attotime::from_usec(get_reset_t()), TIMER_ID_RESET);
}
-static INTERRUPT_GEN( newbrain_interrupt )
+INTERRUPT_GEN_MEMBER(newbrain_state::newbrain_interrupt)
{
- newbrain_state *state = device->machine().driver_data<newbrain_state>();
- if (!(state->m_enrg1 & NEWBRAIN_ENRG1_CLK))
+ if (!(m_enrg1 & NEWBRAIN_ENRG1_CLK))
{
- state->m_clkint = 0;
- state->check_interrupt();
+ m_clkint = 0;
+ check_interrupt();
}
}
@@ -1381,7 +1380,7 @@ static MACHINE_CONFIG_START( newbrain_a, newbrain_state )
MCFG_CPU_ADD(Z80_TAG, Z80, XTAL_16MHz/8)
MCFG_CPU_PROGRAM_MAP(newbrain_map)
MCFG_CPU_IO_MAP(newbrain_a_io_map)
- MCFG_CPU_VBLANK_INT(SCREEN_TAG, newbrain_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, newbrain_state, newbrain_interrupt)
MCFG_CPU_ADD(COP420_TAG, COP420, XTAL_16MHz/8) // COP420-GUW/N
MCFG_CPU_IO_MAP(newbrain_cop_io_map)
diff --git a/src/mess/drivers/ondra.c b/src/mess/drivers/ondra.c
index 6e8ac3bd5a8..49e49778e62 100644
--- a/src/mess/drivers/ondra.c
+++ b/src/mess/drivers/ondra.c
@@ -105,9 +105,9 @@ static INPUT_PORTS_START( ondra )
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("NMI") PORT_CODE(KEYCODE_ESC)
INPUT_PORTS_END
-static INTERRUPT_GEN( ondra_interrupt )
+INTERRUPT_GEN_MEMBER(ondra_state::ondra_interrupt)
{
- device->execute().set_input_line(0, HOLD_LINE);
+ device.execute().set_input_line(0, HOLD_LINE);
}
static const cassette_interface ondra_cassette_interface =
@@ -125,7 +125,7 @@ static MACHINE_CONFIG_START( ondra, ondra_state )
MCFG_CPU_ADD("maincpu", Z80, 2000000)
MCFG_CPU_PROGRAM_MAP(ondra_mem)
MCFG_CPU_IO_MAP(ondra_io)
- MCFG_CPU_VBLANK_INT("screen", ondra_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", ondra_state, ondra_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/orion.c b/src/mess/drivers/orion.c
index 29f08aaa89d..daea6f441b6 100644
--- a/src/mess/drivers/orion.c
+++ b/src/mess/drivers/orion.c
@@ -183,7 +183,7 @@ static MACHINE_CONFIG_START( orionz80, orion_state )
MCFG_CPU_ADD("maincpu", Z80, 2500000)
MCFG_CPU_PROGRAM_MAP(orionz80_mem)
MCFG_CPU_IO_MAP(orionz80_io)
- MCFG_CPU_VBLANK_INT("screen",orionz80_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", orion_state, orionz80_interrupt)
MCFG_MACHINE_START_OVERRIDE(orion_state, orionz80 )
MCFG_MACHINE_RESET_OVERRIDE(orion_state, orionz80 )
diff --git a/src/mess/drivers/p2000t.c b/src/mess/drivers/p2000t.c
index 50ecdf66a8b..79d6e0c1b93 100644
--- a/src/mess/drivers/p2000t.c
+++ b/src/mess/drivers/p2000t.c
@@ -202,9 +202,9 @@ static INPUT_PORTS_START (p2000t)
INPUT_PORTS_END
-static INTERRUPT_GEN( p2000_interrupt )
+INTERRUPT_GEN_MEMBER(p2000t_state::p2000_interrupt)
{
- device->machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
}
READ8_MEMBER( p2000t_state::videoram_r )
@@ -224,7 +224,7 @@ static MACHINE_CONFIG_START( p2000t, p2000t_state )
MCFG_CPU_ADD("maincpu", Z80, 2500000)
MCFG_CPU_PROGRAM_MAP(p2000t_mem)
MCFG_CPU_IO_MAP(p2000t_io)
- MCFG_CPU_VBLANK_INT("screen", p2000_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", p2000t_state, p2000_interrupt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -249,7 +249,7 @@ static MACHINE_CONFIG_START( p2000m, p2000t_state )
MCFG_CPU_ADD("maincpu", Z80, 2500000)
MCFG_CPU_PROGRAM_MAP(p2000m_mem)
MCFG_CPU_IO_MAP(p2000t_io)
- MCFG_CPU_VBLANK_INT("screen", p2000_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", p2000t_state, p2000_interrupt)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
/* video hardware */
diff --git a/src/mess/drivers/pasogo.c b/src/mess/drivers/pasogo.c
index 4e421a8f497..87be721d6c3 100644
--- a/src/mess/drivers/pasogo.c
+++ b/src/mess/drivers/pasogo.c
@@ -70,6 +70,7 @@ public:
virtual void machine_reset();
virtual void palette_init();
UINT32 screen_update_pasogo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(pasogo_interrupt);
};
@@ -449,7 +450,7 @@ UINT32 pasogo_state::screen_update_pasogo(screen_device &screen, bitmap_ind16 &b
return 0;
}
-static INTERRUPT_GEN( pasogo_interrupt )
+INTERRUPT_GEN_MEMBER(pasogo_state::pasogo_interrupt)
{
// machine.device("maincpu")->execute().set_input_line(UPD7810_INTFE1, PULSE_LINE);
}
@@ -504,7 +505,7 @@ static MACHINE_CONFIG_START( pasogo, pasogo_state )
MCFG_CPU_ADD("maincpu", I80188/*V30HL in vadem vg230*/, 10000000/*?*/)
MCFG_CPU_PROGRAM_MAP(pasogo_mem)
MCFG_CPU_IO_MAP( pasogo_io)
- MCFG_CPU_VBLANK_INT("screen", pasogo_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pasogo_state, pasogo_interrupt)
// MCFG_CPU_CONFIG(i86_address_mask)
MCFG_PIT8254_ADD( "pit8254", pc_pit8254_config )
diff --git a/src/mess/drivers/pc100.c b/src/mess/drivers/pc100.c
index bfc4b9d6b21..b0a2a0decdb 100644
--- a/src/mess/drivers/pc100.c
+++ b/src/mess/drivers/pc100.c
@@ -64,6 +64,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_pc100(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(pc100_vblank_irq);
};
void pc100_state::video_start()
@@ -342,9 +343,9 @@ void pc100_state::machine_reset()
{
}
-static INTERRUPT_GEN(pc100_vblank_irq)
+INTERRUPT_GEN_MEMBER(pc100_state::pc100_vblank_irq)
{
- pic8259_ir4_w(device->machine().device("pic8259"), 1);
+ pic8259_ir4_w(machine().device("pic8259"), 1);
}
static TIMER_DEVICE_CALLBACK( pc100_600hz_irq )
@@ -386,7 +387,7 @@ static MACHINE_CONFIG_START( pc100, pc100_state )
MCFG_CPU_ADD("maincpu", I8086, MASTER_CLOCK)
MCFG_CPU_PROGRAM_MAP(pc100_map)
MCFG_CPU_IO_MAP(pc100_io)
- MCFG_CPU_VBLANK_INT("screen",pc100_vblank_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc100_state, pc100_vblank_irq)
/* video hardware */
diff --git a/src/mess/drivers/pc2000.c b/src/mess/drivers/pc2000.c
index e4d6e8b58bc..ba19c7ddb0c 100644
--- a/src/mess/drivers/pc2000.c
+++ b/src/mess/drivers/pc2000.c
@@ -329,7 +329,7 @@ static MACHINE_CONFIG_START( pc2000, pc2000_state )
MCFG_CPU_ADD("maincpu",Z80, XTAL_4MHz) /* probably not accurate */
MCFG_CPU_PROGRAM_MAP(pc2000_mem)
MCFG_CPU_IO_MAP(pc2000_io)
- MCFG_CPU_VBLANK_INT("screen",irq0_line_hold)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc2000_state, irq0_line_hold)
/* video hardware */
MCFG_SCREEN_ADD("screen", LCD)
diff --git a/src/mess/drivers/pc6001.c b/src/mess/drivers/pc6001.c
index 0a5699527bb..39f8c242269 100644
--- a/src/mess/drivers/pc6001.c
+++ b/src/mess/drivers/pc6001.c
@@ -233,6 +233,8 @@ public:
UINT32 screen_update_pc6001(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_pc6001m2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_pc6001sr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(pc6001_interrupt);
+ INTERRUPT_GEN_MEMBER(pc6001sr_interrupt);
};
@@ -1846,24 +1848,22 @@ INPUT_PORTS_END
static UINT8 check_joy_press(running_machine &machine);
-static INTERRUPT_GEN( pc6001_interrupt )
+INTERRUPT_GEN_MEMBER(pc6001_state::pc6001_interrupt)
{
- pc6001_state *state = device->machine().driver_data<pc6001_state>();
- state->m_cur_keycode = check_joy_press(device->machine());
+ m_cur_keycode = check_joy_press(machine());
if(IRQ_LOG) printf("Stick IRQ called 0x16\n");
- state->m_irq_vector = 0x16;
- device->execute().set_input_line(0, ASSERT_LINE);
+ m_irq_vector = 0x16;
+ device.execute().set_input_line(0, ASSERT_LINE);
}
-static INTERRUPT_GEN( pc6001sr_interrupt )
+INTERRUPT_GEN_MEMBER(pc6001_state::pc6001sr_interrupt)
{
- pc6001_state *state = device->machine().driver_data<pc6001_state>();
- state->m_kludge^= 1;
+ m_kludge^= 1;
- state->m_cur_keycode = check_joy_press(device->machine());
+ m_cur_keycode = check_joy_press(machine());
if(IRQ_LOG) printf("VRTC IRQ called 0x16\n");
- state->m_irq_vector = (state->m_kludge) ? 0x22 : 0x16;
- device->execute().set_input_line(0, ASSERT_LINE);
+ m_irq_vector = (m_kludge) ? 0x22 : 0x16;
+ device.execute().set_input_line(0, ASSERT_LINE);
}
static IRQ_CALLBACK ( pc6001_irq_callback )
@@ -2326,7 +2326,7 @@ static MACHINE_CONFIG_START( pc6001, pc6001_state )
MCFG_CPU_ADD("maincpu",Z80, PC6001_MAIN_CLOCK / 2) // ~4 Mhz
MCFG_CPU_PROGRAM_MAP(pc6001_map)
MCFG_CPU_IO_MAP(pc6001_io)
- MCFG_CPU_VBLANK_INT("screen", pc6001_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc6001_state, pc6001_interrupt)
// MCFG_CPU_ADD("subcpu", I8049, 7987200)
@@ -2398,7 +2398,7 @@ static MACHINE_CONFIG_DERIVED( pc6601, pc6001m2 )
MCFG_CPU_REPLACE("maincpu", Z80, PC6001_MAIN_CLOCK / 2)
MCFG_CPU_PROGRAM_MAP(pc6001m2_map)
MCFG_CPU_IO_MAP(pc6601_io)
- MCFG_CPU_VBLANK_INT("screen", pc6001_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc6001_state, pc6001_interrupt)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( pc6001sr, pc6001m2 )
@@ -2412,7 +2412,7 @@ static MACHINE_CONFIG_DERIVED( pc6001sr, pc6001m2 )
MCFG_CPU_REPLACE("maincpu", Z80, XTAL_3_579545MHz) //*Yes*, PC-6001 SR Z80 CPU is actually slower than older models
MCFG_CPU_PROGRAM_MAP(pc6001sr_map)
MCFG_CPU_IO_MAP(pc6001sr_io)
- MCFG_CPU_VBLANK_INT("screen", pc6001sr_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc6001_state, pc6001sr_interrupt)
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mess/drivers/pc8801.c b/src/mess/drivers/pc8801.c
index 6dbf67a1224..c84bd1cdef8 100644
--- a/src/mess/drivers/pc8801.c
+++ b/src/mess/drivers/pc8801.c
@@ -451,6 +451,7 @@ public:
DECLARE_MACHINE_RESET(pc8801_clock_speed);
DECLARE_MACHINE_RESET(pc8801_dic);
DECLARE_MACHINE_RESET(pc8801_cdrom);
+ INTERRUPT_GEN_MEMBER(pc8801_vrtc_irq);
};
@@ -2344,11 +2345,10 @@ static TIMER_DEVICE_CALLBACK( pc8801_rtc_irq )
pc8801_raise_irq(timer.machine(),1<<(2),1);
}
-static INTERRUPT_GEN( pc8801_vrtc_irq )
+INTERRUPT_GEN_MEMBER(pc8801_state::pc8801_vrtc_irq)
{
- pc8801_state *state = device->machine().driver_data<pc8801_state>();
- if(state->m_vblank_irq_mask)
- pc8801_raise_irq(device->machine(),1<<(1),1);
+ if(m_vblank_irq_mask)
+ pc8801_raise_irq(machine(),1<<(1),1);
}
#else
@@ -2411,14 +2411,13 @@ static TIMER_DEVICE_CALLBACK( pc8801_rtc_irq )
}
}
-static INTERRUPT_GEN( pc8801_vrtc_irq )
+INTERRUPT_GEN_MEMBER(pc8801_state::pc8801_vrtc_irq)
{
- pc8801_state *state = device->machine().driver_data<pc8801_state>();
- if(state->m_vrtc_irq_mask && state->m_i8214_irq_level >= 2)
+ if(m_vrtc_irq_mask && m_i8214_irq_level >= 2)
{
- state->m_vrtc_irq_latch = 1;
+ m_vrtc_irq_latch = 1;
//IRQ_LOG(("vrtc\n"));
- device->execute().set_input_line(0,HOLD_LINE);
+ device.execute().set_input_line(0,HOLD_LINE);
}
}
#endif
@@ -2663,7 +2662,7 @@ static MACHINE_CONFIG_START( pc8801, pc8801_state )
MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(pc8801_mem)
MCFG_CPU_IO_MAP(pc8801_io)
- MCFG_CPU_VBLANK_INT("screen", pc8801_vrtc_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc8801_state, pc8801_vrtc_irq)
/* sub CPU(5 inch floppy drive) */
MCFG_CPU_ADD("fdccpu", Z80, MASTER_CLOCK) /* 4 MHz */
diff --git a/src/mess/drivers/pc88va.c b/src/mess/drivers/pc88va.c
index af89c13894a..d4522ce7142 100644
--- a/src/mess/drivers/pc88va.c
+++ b/src/mess/drivers/pc88va.c
@@ -102,6 +102,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_pc88va(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(pc88va_vrtc_irq);
};
@@ -1562,9 +1563,9 @@ void pc88va_state::machine_reset()
machine().device("fdccpu")->execute().set_input_line_vector(0, 0);
}
-static INTERRUPT_GEN( pc88va_vrtc_irq )
+INTERRUPT_GEN_MEMBER(pc88va_state::pc88va_vrtc_irq)
{
- pic8259_ir2_w(device->machine().device("pic8259_master"), 1);
+ pic8259_ir2_w(machine().device("pic8259_master"), 1);
}
/* Not sure if parameters are correct for pc88va (copied from x68k) */
@@ -1657,7 +1658,7 @@ static MACHINE_CONFIG_START( pc88va, pc88va_state )
MCFG_CPU_ADD("maincpu", V30, 8000000) /* 8 MHz */
MCFG_CPU_PROGRAM_MAP(pc88va_map)
MCFG_CPU_IO_MAP(pc88va_io_map)
- MCFG_CPU_VBLANK_INT("screen",pc88va_vrtc_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc88va_state, pc88va_vrtc_irq)
MCFG_CPU_ADD("fdccpu", Z80, 8000000) /* 8 MHz */
MCFG_CPU_PROGRAM_MAP(pc88va_z80_map)
diff --git a/src/mess/drivers/pc9801.c b/src/mess/drivers/pc9801.c
index 3e0981299f7..18c4c997f6f 100644
--- a/src/mess/drivers/pc9801.c
+++ b/src/mess/drivers/pc9801.c
@@ -415,6 +415,7 @@ public:
DECLARE_PALETTE_INIT(pc9801);
DECLARE_MACHINE_RESET(pc9801rs);
DECLARE_MACHINE_START(pc9821);
+ INTERRUPT_GEN_MEMBER(pc9801_vrtc_irq);
};
@@ -2607,14 +2608,13 @@ MACHINE_START_MEMBER(pc9801_state,pc9821)
state_save_register_global_pointer(machine(), m_sdip, 24);
}
-static INTERRUPT_GEN(pc9801_vrtc_irq)
+INTERRUPT_GEN_MEMBER(pc9801_state::pc9801_vrtc_irq)
{
- pc9801_state *state = device->machine().driver_data<pc9801_state>();
#if 0
- address_space &space = *device->machine().device("maincpu")->memory().space(AS_PROGRAM);
+ address_space &space = *machine().device("maincpu")->memory().space(AS_PROGRAM);
static UINT8 test;
- if(device->machine().input().code_pressed_once(JOYCODE_BUTTON1))
+ if(machine().input().code_pressed_once(JOYCODE_BUTTON1))
test^=1;
if(test)
@@ -2624,13 +2624,13 @@ static INTERRUPT_GEN(pc9801_vrtc_irq)
}
#endif
- if(state->m_vrtc_irq_mask)
+ if(m_vrtc_irq_mask)
{
- pic8259_ir2_w(device->machine().device("pic8259_master"), 1);
- state->m_vrtc_irq_mask = 0; // TODO: this irq auto-masks?
+ pic8259_ir2_w(machine().device("pic8259_master"), 1);
+ m_vrtc_irq_mask = 0; // TODO: this irq auto-masks?
}
else
- pic8259_ir2_w(device->machine().device("pic8259_master"), 0);
+ pic8259_ir2_w(machine().device("pic8259_master"), 0);
}
@@ -2639,7 +2639,7 @@ static MACHINE_CONFIG_START( pc9801, pc9801_state )
MCFG_CPU_ADD("maincpu", I8086, 5000000) //unknown clock
MCFG_CPU_PROGRAM_MAP(pc9801_map)
MCFG_CPU_IO_MAP(pc9801_io)
- MCFG_CPU_VBLANK_INT("screen",pc9801_vrtc_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc9801_state, pc9801_vrtc_irq)
MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9801)
MCFG_MACHINE_RESET_OVERRIDE(pc9801_state,pc9801f)
@@ -2694,7 +2694,7 @@ static MACHINE_CONFIG_DERIVED( pc9801vm, pc9801 )
MCFG_CPU_REPLACE("maincpu",V30,10000000)
MCFG_CPU_PROGRAM_MAP(pc9801_map)
MCFG_CPU_IO_MAP(pc9801_io)
- MCFG_CPU_VBLANK_INT("screen",pc9801_vrtc_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc9801_state, pc9801_vrtc_irq)
MACHINE_CONFIG_END
#endif
@@ -2702,7 +2702,7 @@ static MACHINE_CONFIG_START( pc9801rs, pc9801_state )
MCFG_CPU_ADD("maincpu", I386, 16000000)
MCFG_CPU_PROGRAM_MAP(pc9801rs_map)
MCFG_CPU_IO_MAP(pc9801rs_io)
- MCFG_CPU_VBLANK_INT("screen",pc9801_vrtc_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc9801_state, pc9801_vrtc_irq)
MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9801)
MCFG_MACHINE_RESET_OVERRIDE(pc9801_state,pc9801rs)
@@ -2755,14 +2755,14 @@ static MACHINE_CONFIG_DERIVED( pc9801ux, pc9801rs )
MCFG_CPU_CONFIG(i286_address_mask)
MCFG_CPU_PROGRAM_MAP(pc9801ux_map)
MCFG_CPU_IO_MAP(pc9801ux_io)
- MCFG_CPU_VBLANK_INT("screen",pc9801_vrtc_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc9801_state, pc9801_vrtc_irq)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( pc9821, pc9801_state )
MCFG_CPU_ADD("maincpu", I486, 16000000)
MCFG_CPU_PROGRAM_MAP(pc9821_map)
MCFG_CPU_IO_MAP(pc9821_io)
- MCFG_CPU_VBLANK_INT("screen",pc9801_vrtc_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc9801_state, pc9801_vrtc_irq)
MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9821)
MCFG_MACHINE_RESET_OVERRIDE(pc9801_state,pc9801rs)
@@ -2812,7 +2812,7 @@ static MACHINE_CONFIG_DERIVED( pc9821v20, pc9821 )
MCFG_CPU_REPLACE("maincpu",PENTIUM,32000000) /* TODO: clock */
MCFG_CPU_PROGRAM_MAP(pc9821_map)
MCFG_CPU_IO_MAP(pc9821_io)
- MCFG_CPU_VBLANK_INT("screen",pc9801_vrtc_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc9801_state, pc9801_vrtc_irq)
MACHINE_CONFIG_END
/*
diff --git a/src/mess/drivers/pdp1.c b/src/mess/drivers/pdp1.c
index 94efa103cfe..508ab743284 100644
--- a/src/mess/drivers/pdp1.c
+++ b/src/mess/drivers/pdp1.c
@@ -1801,10 +1801,8 @@ static void pdp1_lightpen(running_machine &machine)
/*
Not a real interrupt - just handle keyboard input
*/
-INTERRUPT_GEN( pdp1_interrupt )
+INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
{
- pdp1_state *state = device->machine().driver_data<pdp1_state>();
- running_machine &machine = device->machine();
int control_keys;
int tw_keys;
int ta_keys;
@@ -1814,80 +1812,80 @@ INTERRUPT_GEN( pdp1_interrupt )
int ta_transitions;
- device->state().set_state_int(PDP1_SS, device->machine().root_device().ioport("SENSE")->read());
+ device.state().set_state_int(PDP1_SS, machine().root_device().ioport("SENSE")->read());
/* read new state of control keys */
- control_keys = state->ioport("CSW")->read();
+ control_keys = ioport("CSW")->read();
if (control_keys & pdp1_control)
{
/* compute transitions */
- control_transitions = control_keys & (~ state->m_old_control_keys);
+ control_transitions = control_keys & (~ m_old_control_keys);
if (control_transitions & pdp1_extend)
{
- device->state().set_state_int(PDP1_EXTEND_SW, ! device->state().state_int(PDP1_EXTEND_SW));
+ device.state().set_state_int(PDP1_EXTEND_SW, ! device.state().state_int(PDP1_EXTEND_SW));
}
if (control_transitions & pdp1_start_nobrk)
{
- pdp1_pulse_start_clear(device); /* pulse Start Clear line */
- device->state().set_state_int(PDP1_EXD, device->state().state_int(PDP1_EXTEND_SW));
- device->state().set_state_int(PDP1_SBM, (UINT64)0);
- device->state().set_state_int(PDP1_OV, (UINT64)0);
- device->state().set_state_int(PDP1_PC, device->state().state_int(PDP1_TA));
- device->state().set_state_int(PDP1_RUN, 1);
+ pdp1_pulse_start_clear(&device); /* pulse Start Clear line */
+ device.state().set_state_int(PDP1_EXD, device.state().state_int(PDP1_EXTEND_SW));
+ device.state().set_state_int(PDP1_SBM, (UINT64)0);
+ device.state().set_state_int(PDP1_OV, (UINT64)0);
+ device.state().set_state_int(PDP1_PC, device.state().state_int(PDP1_TA));
+ device.state().set_state_int(PDP1_RUN, 1);
}
if (control_transitions & pdp1_start_brk)
{
- pdp1_pulse_start_clear(device); /* pulse Start Clear line */
- device->state().set_state_int(PDP1_EXD, device->state().state_int(PDP1_EXTEND_SW));
- device->state().set_state_int(PDP1_SBM, 1);
- device->state().set_state_int(PDP1_OV, (UINT64)0);
- device->state().set_state_int(PDP1_PC, device->state().state_int(PDP1_TA));
- device->state().set_state_int(PDP1_RUN, 1);
+ pdp1_pulse_start_clear(&device); /* pulse Start Clear line */
+ device.state().set_state_int(PDP1_EXD, device.state().state_int(PDP1_EXTEND_SW));
+ device.state().set_state_int(PDP1_SBM, 1);
+ device.state().set_state_int(PDP1_OV, (UINT64)0);
+ device.state().set_state_int(PDP1_PC, device.state().state_int(PDP1_TA));
+ device.state().set_state_int(PDP1_RUN, 1);
}
if (control_transitions & pdp1_stop)
{
- device->state().set_state_int(PDP1_RUN, (UINT64)0);
- device->state().set_state_int(PDP1_RIM, (UINT64)0); /* bug : we stop after reading an even-numbered word
+ device.state().set_state_int(PDP1_RUN, (UINT64)0);
+ device.state().set_state_int(PDP1_RIM, (UINT64)0); /* bug : we stop after reading an even-numbered word
(i.e. data), whereas a real pdp-1 stops after reading
an odd-numbered word (i.e. dio instruciton) */
}
if (control_transitions & pdp1_continue)
{
- device->state().set_state_int(PDP1_RUN, 1);
+ device.state().set_state_int(PDP1_RUN, 1);
}
if (control_transitions & pdp1_examine)
{
- pdp1_pulse_start_clear(device); /* pulse Start Clear line */
- device->state().set_state_int(PDP1_PC, device->state().state_int(PDP1_TA));
- device->state().set_state_int(PDP1_MA, device->state().state_int(PDP1_PC));
- device->state().set_state_int(PDP1_IR, LAC); /* this instruction is actually executed */
+ pdp1_pulse_start_clear(&device); /* pulse Start Clear line */
+ device.state().set_state_int(PDP1_PC, device.state().state_int(PDP1_TA));
+ device.state().set_state_int(PDP1_MA, device.state().state_int(PDP1_PC));
+ device.state().set_state_int(PDP1_IR, LAC); /* this instruction is actually executed */
- device->state().set_state_int(PDP1_MB, (signed)device->memory().space(AS_PROGRAM)->read_dword(PDP1_MA<<2));
- device->state().set_state_int(PDP1_AC, device->state().state_int(PDP1_MB));
+ device.state().set_state_int(PDP1_MB, (signed)device.memory().space(AS_PROGRAM)->read_dword(PDP1_MA<<2));
+ device.state().set_state_int(PDP1_AC, device.state().state_int(PDP1_MB));
}
if (control_transitions & pdp1_deposit)
{
- pdp1_pulse_start_clear(device); /* pulse Start Clear line */
- device->state().set_state_int(PDP1_PC, device->state().state_int(PDP1_TA));
- device->state().set_state_int(PDP1_MA, device->state().state_int(PDP1_PC));
- device->state().set_state_int(PDP1_AC, device->state().state_int(PDP1_TW));
- device->state().set_state_int(PDP1_IR, DAC); /* this instruction is actually executed */
-
- device->state().set_state_int(PDP1_MB, device->state().state_int(PDP1_AC));
- device->memory().space(AS_PROGRAM)->write_dword(device->state().state_int(PDP1_MA)<<2, device->state().state_int(PDP1_MB));
+ pdp1_pulse_start_clear(&device); /* pulse Start Clear line */
+ device.state().set_state_int(PDP1_PC, device.state().state_int(PDP1_TA));
+ device.state().set_state_int(PDP1_MA, device.state().state_int(PDP1_PC));
+ device.state().set_state_int(PDP1_AC, device.state().state_int(PDP1_TW));
+ device.state().set_state_int(PDP1_IR, DAC); /* this instruction is actually executed */
+
+ device.state().set_state_int(PDP1_MB, device.state().state_int(PDP1_AC));
+ device.memory().space(AS_PROGRAM)->write_dword(device.state().state_int(PDP1_MA)<<2, device.state().state_int(PDP1_MB));
}
if (control_transitions & pdp1_read_in)
{ /* set cpu to read instructions from perforated tape */
- pdp1_pulse_start_clear(device); /* pulse Start Clear line */
- device->state().set_state_int(PDP1_PC, ( device->state().state_int(PDP1_TA) & 0170000)
- | (device->state().state_int(PDP1_PC) & 0007777)); /* transfer ETA to EPC */
+ pdp1_pulse_start_clear(&device); /* pulse Start Clear line */
+ device.state().set_state_int(PDP1_PC, ( device.state().state_int(PDP1_TA) & 0170000)
+ | (device.state().state_int(PDP1_PC) & 0007777)); /* transfer ETA to EPC */
/*machine.device("maincpu")->state().set_state_int(PDP1_MA, machine.device("maincpu")->state().state_int(PDP1_PC));*/
- device->state().set_state_int(PDP1_EXD, device->state().state_int(PDP1_EXTEND_SW));
- device->state().set_state_int(PDP1_OV, (UINT64)0); /* right??? */
- device->state().set_state_int(PDP1_RUN, (UINT64)0);
- device->state().set_state_int(PDP1_RIM, 1);
+ device.state().set_state_int(PDP1_EXD, device.state().state_int(PDP1_EXTEND_SW));
+ device.state().set_state_int(PDP1_OV, (UINT64)0); /* right??? */
+ device.state().set_state_int(PDP1_RUN, (UINT64)0);
+ device.state().set_state_int(PDP1_RIM, 1);
}
if (control_transitions & pdp1_reader)
{
@@ -1897,53 +1895,53 @@ INTERRUPT_GEN( pdp1_interrupt )
}
if (control_transitions & pdp1_single_step)
{
- device->state().set_state_int(PDP1_SNGL_STEP, ! device->state().state_int(PDP1_SNGL_STEP));
+ device.state().set_state_int(PDP1_SNGL_STEP, ! device.state().state_int(PDP1_SNGL_STEP));
}
if (control_transitions & pdp1_single_inst)
{
- device->state().set_state_int(PDP1_SNGL_INST, ! device->state().state_int(PDP1_SNGL_INST));
+ device.state().set_state_int(PDP1_SNGL_INST, ! device.state().state_int(PDP1_SNGL_INST));
}
/* remember new state of control keys */
- state->m_old_control_keys = control_keys;
+ m_old_control_keys = control_keys;
/* handle test word keys */
- tw_keys = (machine.root_device().ioport("TWDMSB")->read() << 16) | machine.root_device().ioport("TWDLSB")->read();
+ tw_keys = (machine().root_device().ioport("TWDMSB")->read() << 16) | machine().root_device().ioport("TWDLSB")->read();
/* compute transitions */
- tw_transitions = tw_keys & (~ state->m_old_tw_keys);
+ tw_transitions = tw_keys & (~ m_old_tw_keys);
if (tw_transitions)
- device->state().set_state_int(PDP1_TW, device->state().state_int(PDP1_TW) ^ tw_transitions);
+ device.state().set_state_int(PDP1_TW, device.state().state_int(PDP1_TW) ^ tw_transitions);
/* remember new state of test word keys */
- state->m_old_tw_keys = tw_keys;
+ m_old_tw_keys = tw_keys;
/* handle address keys */
- ta_keys = machine.root_device().ioport("TSTADD")->read();
+ ta_keys = machine().root_device().ioport("TSTADD")->read();
/* compute transitions */
- ta_transitions = ta_keys & (~ state->m_old_ta_keys);
+ ta_transitions = ta_keys & (~ m_old_ta_keys);
if (ta_transitions)
- device->state().set_state_int(PDP1_TA, device->state().state_int(PDP1_TA) ^ ta_transitions);
+ device.state().set_state_int(PDP1_TA, device.state().state_int(PDP1_TA) ^ ta_transitions);
/* remember new state of test word keys */
- state->m_old_ta_keys = ta_keys;
+ m_old_ta_keys = ta_keys;
}
else
{
- state->m_old_control_keys = 0;
- state->m_old_tw_keys = 0;
- state->m_old_ta_keys = 0;
+ m_old_control_keys = 0;
+ m_old_tw_keys = 0;
+ m_old_ta_keys = 0;
- pdp1_keyboard(machine);
+ pdp1_keyboard(machine());
}
- pdp1_lightpen(machine);
+ pdp1_lightpen(machine());
}
@@ -1954,7 +1952,7 @@ static MACHINE_CONFIG_START( pdp1, pdp1_state )
MCFG_CPU_ADD("maincpu", PDP1, 1000000/*the CPU core uses microsecond counts*/)
MCFG_CPU_CONFIG(pdp1_reset_param)
MCFG_CPU_PROGRAM_MAP(pdp1_map)
- MCFG_CPU_VBLANK_INT("screen", pdp1_interrupt) /* dummy interrupt: handles input */
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pdp1_state, pdp1_interrupt) /* dummy interrupt: handles input */
/* video hardware (includes the control panel and typewriter output) */
diff --git a/src/mess/drivers/pet.c b/src/mess/drivers/pet.c
index e071389d554..80993169de3 100644
--- a/src/mess/drivers/pet.c
+++ b/src/mess/drivers/pet.c
@@ -659,7 +659,7 @@ static MACHINE_CONFIG_START( pet_general, pet_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M6502, XTAL_8MHz/8)
MCFG_CPU_PROGRAM_MAP(pet_mem)
- MCFG_CPU_VBLANK_INT("screen", pet_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pet_state, pet_frame_interrupt)
/* video hardware */
@@ -783,7 +783,7 @@ static MACHINE_CONFIG_DERIVED( superpet, pet80 )
/* m6809 cpu */
MCFG_CPU_ADD("m6809", M6809, 1000000)
MCFG_CPU_PROGRAM_MAP(superpet_m6809_mem)
- MCFG_CPU_VBLANK_INT("screen", pet_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pet_state, pet_frame_interrupt)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_REFRESH_RATE(50)
diff --git a/src/mess/drivers/pk8000.c b/src/mess/drivers/pk8000.c
index e92147c7ac9..4ccb94e2e43 100644
--- a/src/mess/drivers/pk8000.c
+++ b/src/mess/drivers/pk8000.c
@@ -30,6 +30,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_pk8000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(pk8000_interrupt);
};
@@ -308,9 +309,9 @@ static INPUT_PORTS_START( pk8000 )
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
INPUT_PORTS_END
-static INTERRUPT_GEN( pk8000_interrupt )
+INTERRUPT_GEN_MEMBER(pk8000_state::pk8000_interrupt)
{
- device->execute().set_input_line(0, HOLD_LINE);
+ device.execute().set_input_line(0, HOLD_LINE);
}
static IRQ_CALLBACK(pk8000_irq_callback)
@@ -349,7 +350,7 @@ static MACHINE_CONFIG_START( pk8000, pk8000_state )
MCFG_CPU_ADD("maincpu",I8080, 1780000)
MCFG_CPU_PROGRAM_MAP(pk8000_mem)
MCFG_CPU_IO_MAP(pk8000_io)
- MCFG_CPU_VBLANK_INT("screen", pk8000_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pk8000_state, pk8000_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/pk8020.c b/src/mess/drivers/pk8020.c
index 40714504d2d..79bf43d5f69 100644
--- a/src/mess/drivers/pk8020.c
+++ b/src/mess/drivers/pk8020.c
@@ -205,7 +205,7 @@ static MACHINE_CONFIG_START( pk8020, pk8020_state )
MCFG_CPU_ADD("maincpu", I8080, XTAL_20MHz / 8)
MCFG_CPU_PROGRAM_MAP(pk8020_mem)
MCFG_CPU_IO_MAP(pk8020_io)
- MCFG_CPU_VBLANK_INT("screen", pk8020_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pk8020_state, pk8020_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/plus4.c b/src/mess/drivers/plus4.c
index 7ea561e7ad7..a03d81e8d19 100644
--- a/src/mess/drivers/plus4.c
+++ b/src/mess/drivers/plus4.c
@@ -566,16 +566,14 @@ static M6510_INTERFACE( c16_cpu_intf )
// ted7360_interface ted_intf
//-------------------------------------------------
-static INTERRUPT_GEN( c16_raster_interrupt )
+INTERRUPT_GEN_MEMBER(plus4_state::c16_raster_interrupt)
{
- plus4_state *state = device->machine().driver_data<plus4_state>();
- state->m_ted->raster_interrupt_gen();
+ m_ted->raster_interrupt_gen();
}
-static INTERRUPT_GEN( c16_frame_interrupt )
+INTERRUPT_GEN_MEMBER(plus4_state::c16_frame_interrupt)
{
- plus4_state *state = device->machine().driver_data<plus4_state>();
int value, i;
static const char *const c16ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" };
@@ -584,54 +582,54 @@ static INTERRUPT_GEN( c16_frame_interrupt )
for (i = 0; i < 8; i++)
{
value = 0xff;
- value &= ~device->machine().root_device().ioport(c16ports[i])->read();
+ value &= ~machine().root_device().ioport(c16ports[i])->read();
/* Shift Lock is mapped on Left/Right Shift */
- if ((i == 1) && (device->machine().root_device().ioport("SPECIAL")->read() & 0x80))
+ if ((i == 1) && (machine().root_device().ioport("SPECIAL")->read() & 0x80))
value &= ~0x80;
- state->m_keyline[i] = value;
+ m_keyline[i] = value;
}
- if (device->machine().root_device().ioport("CTRLSEL")->read() & 0x01)
+ if (machine().root_device().ioport("CTRLSEL")->read() & 0x01)
{
value = 0xff;
- if (device->machine().root_device().ioport("JOY0")->read() & 0x10) /* Joypad1_Button */
+ if (machine().root_device().ioport("JOY0")->read() & 0x10) /* Joypad1_Button */
{
- if (device->machine().root_device().ioport("SPECIAL")->read() & 0x40)
+ if (machine().root_device().ioport("SPECIAL")->read() & 0x40)
value &= ~0x80;
else
value &= ~0x40;
}
- value &= ~(device->machine().root_device().ioport("JOY0")->read() & 0x0f); /* Other Inputs Joypad1 */
+ value &= ~(machine().root_device().ioport("JOY0")->read() & 0x0f); /* Other Inputs Joypad1 */
- if (device->machine().root_device().ioport("SPECIAL")->read() & 0x40)
- state->m_keyline[9] = value;
+ if (machine().root_device().ioport("SPECIAL")->read() & 0x40)
+ m_keyline[9] = value;
else
- state->m_keyline[8] = value;
+ m_keyline[8] = value;
}
- if (device->machine().root_device().ioport("CTRLSEL")->read() & 0x10)
+ if (machine().root_device().ioport("CTRLSEL")->read() & 0x10)
{
value = 0xff;
- if (device->machine().root_device().ioport("JOY1")->read() & 0x10) /* Joypad2_Button */
+ if (machine().root_device().ioport("JOY1")->read() & 0x10) /* Joypad2_Button */
{
- if (device->machine().root_device().ioport("SPECIAL")->read() & 0x40)
+ if (machine().root_device().ioport("SPECIAL")->read() & 0x40)
value &= ~0x40;
else
value &= ~0x80;
}
- value &= ~(device->machine().root_device().ioport("JOY1")->read() & 0x0f); /* Other Inputs Joypad2 */
+ value &= ~(machine().root_device().ioport("JOY1")->read() & 0x0f); /* Other Inputs Joypad2 */
- if (device->machine().root_device().ioport("SPECIAL")->read() & 0x40)
- state->m_keyline[8] = value;
+ if (machine().root_device().ioport("SPECIAL")->read() & 0x40)
+ m_keyline[8] = value;
else
- state->m_keyline[9] = value;
+ m_keyline[9] = value;
}
- state->m_ted->frame_interrupt_gen();
+ m_ted->frame_interrupt_gen();
}
WRITE_LINE_MEMBER( plus4_state::ted_irq_w )
@@ -905,8 +903,8 @@ static MACHINE_CONFIG_START( ntsc, plus4_state )
MCFG_CPU_ADD(MOS7501_TAG, M7501, XTAL_14_31818MHz/16)
MCFG_CPU_PROGRAM_MAP(plus4_mem)
MCFG_CPU_CONFIG(cpu_intf)
- MCFG_CPU_VBLANK_INT(SCREEN_TAG, c16_frame_interrupt)
- MCFG_CPU_PERIODIC_INT(c16_raster_interrupt, TED7360_HRETRACERATE)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, plus4_state, c16_frame_interrupt)
+ MCFG_CPU_PERIODIC_INT_DRIVER(plus4_state, c16_raster_interrupt, TED7360_HRETRACERATE)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
// video and sound hardware
@@ -944,8 +942,8 @@ static MACHINE_CONFIG_START( pal, plus4_state )
MCFG_CPU_ADD(MOS7501_TAG, M7501, XTAL_17_73447MHz/20)
MCFG_CPU_PROGRAM_MAP(plus4_mem)
MCFG_CPU_CONFIG(cpu_intf)
- MCFG_CPU_VBLANK_INT(SCREEN_TAG, c16_frame_interrupt)
- MCFG_CPU_PERIODIC_INT(c16_raster_interrupt, TED7360_HRETRACERATE)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, plus4_state, c16_frame_interrupt)
+ MCFG_CPU_PERIODIC_INT_DRIVER(plus4_state, c16_raster_interrupt, TED7360_HRETRACERATE)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
// video and sound hardware
diff --git a/src/mess/drivers/poly88.c b/src/mess/drivers/poly88.c
index 4ebbc075f4d..5a19df7ee2e 100644
--- a/src/mess/drivers/poly88.c
+++ b/src/mess/drivers/poly88.c
@@ -169,7 +169,7 @@ static MACHINE_CONFIG_START( poly88, poly88_state )
MCFG_CPU_ADD("maincpu",I8080, 1853000)
MCFG_CPU_PROGRAM_MAP(poly88_mem)
MCFG_CPU_IO_MAP(poly88_io)
- MCFG_CPU_VBLANK_INT("screen", poly88_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", poly88_state, poly88_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/primo.c b/src/mess/drivers/primo.c
index 633c9bb747a..f5e65f142a4 100644
--- a/src/mess/drivers/primo.c
+++ b/src/mess/drivers/primo.c
@@ -262,7 +262,7 @@ static MACHINE_CONFIG_START( primoa32, primo_state )
MCFG_CPU_ADD( "maincpu", Z80, 2500000 )
MCFG_CPU_PROGRAM_MAP( primo32_mem)
MCFG_CPU_IO_MAP( primoa_port)
- MCFG_CPU_VBLANK_INT("screen", primo_vblank_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", primo_state, primo_vblank_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/pyl601.c b/src/mess/drivers/pyl601.c
index 25340842a05..a4d1dea5882 100644
--- a/src/mess/drivers/pyl601.c
+++ b/src/mess/drivers/pyl601.c
@@ -82,6 +82,7 @@ public:
DECLARE_DRIVER_INIT(pyl601);
virtual void machine_reset();
virtual void video_start();
+ INTERRUPT_GEN_MEMBER(pyl601_interrupt);
};
@@ -515,11 +516,10 @@ DRIVER_INIT_MEMBER(pyl601_state,pyl601)
memset(machine().device<ram_device>(RAM_TAG)->pointer(), 0, 64 * 1024);
}
-static INTERRUPT_GEN( pyl601_interrupt )
+INTERRUPT_GEN_MEMBER(pyl601_state::pyl601_interrupt)
{
- pyl601_state *state = device->machine().driver_data<pyl601_state>();
- state->m_tick50_mark = 0x80;
- device->execute().set_input_line(0, HOLD_LINE);
+ m_tick50_mark = 0x80;
+ device.execute().set_input_line(0, HOLD_LINE);
}
static LEGACY_FLOPPY_OPTIONS_START(pyldin)
@@ -583,7 +583,7 @@ static MACHINE_CONFIG_START( pyl601, pyl601_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu",M6800, XTAL_1MHz)
MCFG_CPU_PROGRAM_MAP(pyl601_mem)
- MCFG_CPU_VBLANK_INT("screen", pyl601_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pyl601_state, pyl601_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/rainbow.c b/src/mess/drivers/rainbow.c
index 837393785d6..d59f255fea3 100644
--- a/src/mess/drivers/rainbow.c
+++ b/src/mess/drivers/rainbow.c
@@ -132,6 +132,7 @@ private:
virtual void machine_reset();
public:
UINT32 screen_update_rainbow(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(vblank_irq);
};
void rainbow_state::machine_start()
@@ -316,9 +317,9 @@ READ8_MEMBER( rainbow_state::read_video_ram_r )
return m_p_ram[offset];
}
-static INTERRUPT_GEN( vblank_irq )
+INTERRUPT_GEN_MEMBER(rainbow_state::vblank_irq)
{
- device->execute().set_input_line_and_vector(INPUT_LINE_INT0, ASSERT_LINE, 0x20);
+ device.execute().set_input_line_and_vector(INPUT_LINE_INT0, ASSERT_LINE, 0x20);
}
WRITE8_MEMBER( rainbow_state::clear_video_interrupt )
@@ -463,7 +464,7 @@ static MACHINE_CONFIG_START( rainbow, rainbow_state )
MCFG_CPU_ADD("maincpu",I8088, XTAL_24_0734MHz / 5)
MCFG_CPU_PROGRAM_MAP(rainbow8088_map)
MCFG_CPU_IO_MAP(rainbow8088_io)
- MCFG_CPU_VBLANK_INT("screen", vblank_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", rainbow_state, vblank_irq)
MCFG_CPU_ADD("subcpu",Z80, XTAL_24_0734MHz / 6)
MCFG_CPU_PROGRAM_MAP(rainbowz80_mem)
diff --git a/src/mess/drivers/rx78.c b/src/mess/drivers/rx78.c
index cf1433c633b..44b08b3b9d1 100644
--- a/src/mess/drivers/rx78.c
+++ b/src/mess/drivers/rx78.c
@@ -476,7 +476,7 @@ static MACHINE_CONFIG_START( rx78, rx78_state )
MCFG_CPU_ADD("maincpu",Z80, MASTER_CLOCK/7) // unknown divider
MCFG_CPU_PROGRAM_MAP(rx78_mem)
MCFG_CPU_IO_MAP(rx78_io)
- MCFG_CPU_VBLANK_INT("screen",irq0_line_hold)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", rx78_state, irq0_line_hold)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/samcoupe.c b/src/mess/drivers/samcoupe.c
index 8b9a0ea596c..79e48befb24 100644
--- a/src/mess/drivers/samcoupe.c
+++ b/src/mess/drivers/samcoupe.c
@@ -349,10 +349,10 @@ void samcoupe_irq(device_t *device, UINT8 src)
state->m_status &= ~src;
}
-static INTERRUPT_GEN( samcoupe_frame_interrupt )
+INTERRUPT_GEN_MEMBER(samcoupe_state::samcoupe_frame_interrupt)
{
/* signal frame interrupt */
- samcoupe_irq(device, SAM_FRAME_INT);
+ samcoupe_irq(&device, SAM_FRAME_INT);
}
@@ -530,7 +530,7 @@ static MACHINE_CONFIG_START( samcoupe, samcoupe_state )
MCFG_CPU_ADD("maincpu", Z80, SAMCOUPE_XTAL_X1 / 4) /* 6 MHz */
MCFG_CPU_PROGRAM_MAP(samcoupe_mem)
MCFG_CPU_IO_MAP(samcoupe_io)
- MCFG_CPU_VBLANK_INT("screen", samcoupe_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", samcoupe_state, samcoupe_frame_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/sgi_ip2.c b/src/mess/drivers/sgi_ip2.c
index ae33a8e1b42..8723c9c8507 100644
--- a/src/mess/drivers/sgi_ip2.c
+++ b/src/mess/drivers/sgi_ip2.c
@@ -102,6 +102,7 @@ public:
DECLARE_DRIVER_INIT(sgi_ip2);
virtual void machine_start();
virtual void machine_reset();
+ INTERRUPT_GEN_MEMBER(sgi_ip2_vbl);
};
@@ -367,7 +368,7 @@ static GENERIC_TERMINAL_INTERFACE( sgi_terminal_intf )
};
-static INTERRUPT_GEN( sgi_ip2_vbl )
+INTERRUPT_GEN_MEMBER(sgi_ip2_state::sgi_ip2_vbl)
{
}
@@ -477,7 +478,7 @@ static MACHINE_CONFIG_START( sgi_ip2, sgi_ip2_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68020, 16000000)
MCFG_CPU_PROGRAM_MAP(sgi_ip2_map)
- MCFG_CPU_VBLANK_INT(TERMINAL_TAG ":" TERMINAL_SCREEN_TAG, sgi_ip2_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER(TERMINAL_TAG ":" TERMINAL_SCREEN_TAG, sgi_ip2_state, sgi_ip2_vbl)
/* video hardware */
diff --git a/src/mess/drivers/sgi_ip6.c b/src/mess/drivers/sgi_ip6.c
index db60e1f9af6..6cfee1b3abf 100644
--- a/src/mess/drivers/sgi_ip6.c
+++ b/src/mess/drivers/sgi_ip6.c
@@ -42,6 +42,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_sgi_ip6(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(sgi_ip6_vbl);
};
@@ -192,7 +193,7 @@ WRITE32_MEMBER(sgi_ip6_state::ip6_unk3_w)
verboselog(machine(), 0, "ip6_unk3_w: Unknown address: %08x = %08x & %08x\n", 0x1fb00000 + (offset << 2), data, mem_mask );
}
-static INTERRUPT_GEN( sgi_ip6_vbl )
+INTERRUPT_GEN_MEMBER(sgi_ip6_state::sgi_ip6_vbl)
{
}
@@ -233,7 +234,7 @@ static MACHINE_CONFIG_START( sgi_ip6, sgi_ip6_state )
MCFG_CPU_ADD( "maincpu", R3000BE, 20000000 ) // FIXME: Should be R2000
MCFG_CPU_CONFIG( config )
MCFG_CPU_PROGRAM_MAP( sgi_ip6_map )
- MCFG_CPU_VBLANK_INT("screen", sgi_ip6_vbl)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", sgi_ip6_state, sgi_ip6_vbl)
/* video hardware */
diff --git a/src/mess/drivers/sm1800.c b/src/mess/drivers/sm1800.c
index 752e6b78650..c98150c819b 100644
--- a/src/mess/drivers/sm1800.c
+++ b/src/mess/drivers/sm1800.c
@@ -45,6 +45,7 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_sm1800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(sm1800_vblank_interrupt);
};
static ADDRESS_MAP_START(sm1800_mem, AS_PROGRAM, 8, sm1800_state)
@@ -92,11 +93,10 @@ UINT32 sm1800_state::screen_update_sm1800(screen_device &screen, bitmap_ind16 &b
return 0;
}
-static INTERRUPT_GEN( sm1800_vblank_interrupt )
+INTERRUPT_GEN_MEMBER(sm1800_state::sm1800_vblank_interrupt)
{
- sm1800_state *state = device->machine().driver_data<sm1800_state>();
- device->machine().device("maincpu")->execute().set_input_line(0, state->m_irq_state ? HOLD_LINE : CLEAR_LINE);
- state->m_irq_state ^= 1;
+ machine().device("maincpu")->execute().set_input_line(0, m_irq_state ? HOLD_LINE : CLEAR_LINE);
+ m_irq_state ^= 1;
}
static I8275_DISPLAY_PIXELS(sm1800_display_pixels)
@@ -189,7 +189,7 @@ static MACHINE_CONFIG_START( sm1800, sm1800_state )
MCFG_CPU_ADD("maincpu",I8080, XTAL_2MHz)
MCFG_CPU_PROGRAM_MAP(sm1800_mem)
MCFG_CPU_IO_MAP(sm1800_io)
- MCFG_CPU_VBLANK_INT("screen", sm1800_vblank_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", sm1800_state, sm1800_vblank_interrupt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/smc777.c b/src/mess/drivers/smc777.c
index c8b272ecea9..f3ee4785ada 100644
--- a/src/mess/drivers/smc777.c
+++ b/src/mess/drivers/smc777.c
@@ -87,6 +87,7 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_smc777(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(smc777_vblank_irq);
};
@@ -1046,12 +1047,11 @@ static const floppy_interface smc777_floppy_interface =
NULL
};
-static INTERRUPT_GEN( smc777_vblank_irq )
+INTERRUPT_GEN_MEMBER(smc777_state::smc777_vblank_irq)
{
- smc777_state *state = device->machine().driver_data<smc777_state>();
- if(state->m_irq_mask)
- device->execute().set_input_line(0,HOLD_LINE);
+ if(m_irq_mask)
+ device.execute().set_input_line(0,HOLD_LINE);
}
@@ -1079,7 +1079,7 @@ static MACHINE_CONFIG_START( smc777, smc777_state )
MCFG_CPU_ADD("maincpu",Z80, MASTER_CLOCK)
MCFG_CPU_PROGRAM_MAP(smc777_mem)
MCFG_CPU_IO_MAP(smc777_io)
- MCFG_CPU_VBLANK_INT("screen",smc777_vblank_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", smc777_state, smc777_vblank_irq)
/* video hardware */
diff --git a/src/mess/drivers/socrates.c b/src/mess/drivers/socrates.c
index 6e77144dfc7..61b96e0e2c9 100644
--- a/src/mess/drivers/socrates.c
+++ b/src/mess/drivers/socrates.c
@@ -128,6 +128,7 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_socrates(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(assert_irq);
};
@@ -909,14 +910,13 @@ static TIMER_CALLBACK( clear_irq_cb )
state->m_vblankstate = 0;
}
-static INTERRUPT_GEN( assert_irq )
+INTERRUPT_GEN_MEMBER(socrates_state::assert_irq)
{
- socrates_state *state = device->machine().driver_data<socrates_state>();
- device->execute().set_input_line(0, ASSERT_LINE);
- device->machine().scheduler().timer_set(downcast<cpu_device *>(device)->cycles_to_attotime(44), FUNC(clear_irq_cb));
+ device.execute().set_input_line(0, ASSERT_LINE);
+ machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(44), FUNC(clear_irq_cb));
// 44 is a complete and total guess, need to properly measure how many clocks/microseconds the int line is high for.
- state->m_vblankstate = 1;
- state->m_kbmcu_rscount = 0; // clear the mcu poke count
+ m_vblankstate = 1;
+ m_kbmcu_rscount = 0; // clear the mcu poke count
}
static MACHINE_CONFIG_START( socrates, socrates_state )
@@ -925,7 +925,7 @@ static MACHINE_CONFIG_START( socrates, socrates_state )
MCFG_CPU_PROGRAM_MAP(z80_mem)
MCFG_CPU_IO_MAP(z80_io)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
- MCFG_CPU_VBLANK_INT("screen", assert_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", socrates_state, assert_irq)
//MCFG_MACHINE_START_OVERRIDE(socrates_state,socrates)
/* video hardware */
diff --git a/src/mess/drivers/spectrum.c b/src/mess/drivers/spectrum.c
index 32c18017e5e..9c4d7ed15bf 100644
--- a/src/mess/drivers/spectrum.c
+++ b/src/mess/drivers/spectrum.c
@@ -660,9 +660,9 @@ static GFXDECODE_START( spectrum )
GFXDECODE_END
-static INTERRUPT_GEN( spec_interrupt )
+INTERRUPT_GEN_MEMBER(spectrum_state::spec_interrupt)
{
- device->execute().set_input_line(0, HOLD_LINE);
+ device.execute().set_input_line(0, HOLD_LINE);
}
static const cassette_interface spectrum_cassette_interface =
@@ -708,7 +708,7 @@ MACHINE_CONFIG_START( spectrum_common, spectrum_state )
MCFG_CPU_ADD("maincpu", Z80, X1 / 4) /* This is verified only for the ZX Spectum. Other clones are reported to have different clocks */
MCFG_CPU_PROGRAM_MAP(spectrum_mem)
MCFG_CPU_IO_MAP(spectrum_io)
- MCFG_CPU_VBLANK_INT("screen", spec_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", spectrum_state, spec_interrupt)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_MACHINE_RESET_OVERRIDE(spectrum_state, spectrum )
diff --git a/src/mess/drivers/supracan.c b/src/mess/drivers/supracan.c
index 6866fddfcb5..9aaa8958e08 100644
--- a/src/mess/drivers/supracan.c
+++ b/src/mess/drivers/supracan.c
@@ -201,6 +201,8 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_supracan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(supracan_irq);
+ INTERRUPT_GEN_MEMBER(supracan_sound_irq);
};
@@ -1870,31 +1872,29 @@ static GFXDECODE_START( supracan )
GFXDECODE_ENTRY( "ram_gfx3", 0, supracan_gfx1bpp_alt, 0, 0x80 )
GFXDECODE_END
-static INTERRUPT_GEN( supracan_irq )
+INTERRUPT_GEN_MEMBER(supracan_state::supracan_irq)
{
#if 0
- supracan_state *state = (supracan_state *)device->machine().driver_data<supracan_state>();
- if(state->m_irq_mask)
+ if(m_irq_mask)
{
- device->execute().set_input_line(7, HOLD_LINE);
+ device.execute().set_input_line(7, HOLD_LINE);
}
#endif
}
-static INTERRUPT_GEN( supracan_sound_irq )
+INTERRUPT_GEN_MEMBER(supracan_state::supracan_sound_irq)
{
- supracan_state *state = (supracan_state *)device->machine().driver_data<supracan_state>();
- state->m_sound_irq_source_reg |= 0x80;
+ m_sound_irq_source_reg |= 0x80;
- if(state->m_sound_irq_enable_reg & state->m_sound_irq_source_reg)
+ if(m_sound_irq_enable_reg & m_sound_irq_source_reg)
{
- device->machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE);
}
else
{
- device->machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE);
}
}
@@ -1902,11 +1902,11 @@ static MACHINE_CONFIG_START( supracan, supracan_state )
MCFG_CPU_ADD( "maincpu", M68000, XTAL_10_738635MHz ) /* Correct frequency unknown */
MCFG_CPU_PROGRAM_MAP( supracan_mem )
- MCFG_CPU_VBLANK_INT("screen", supracan_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", supracan_state, supracan_irq)
MCFG_CPU_ADD( "soundcpu", M6502, XTAL_3_579545MHz ) /* TODO: Verify actual clock */
MCFG_CPU_PROGRAM_MAP( supracan_sound_mem )
- MCFG_CPU_VBLANK_INT("screen", supracan_sound_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", supracan_state, supracan_sound_irq)
#if !(SOUNDCPU_BOOT_HACK)
MCFG_QUANTUM_PERFECT_CPU("maincpu")
diff --git a/src/mess/drivers/svision.c b/src/mess/drivers/svision.c
index 4372fbaf6c0..9fa25bdd801 100644
--- a/src/mess/drivers/svision.c
+++ b/src/mess/drivers/svision.c
@@ -414,13 +414,12 @@ UINT32 svision_state::screen_update_tvlink(screen_device &screen, bitmap_rgb32 &
return 0;
}
-static INTERRUPT_GEN( svision_frame_int )
+INTERRUPT_GEN_MEMBER(svision_state::svision_frame_int)
{
- svision_state *state = device->machine().driver_data<svision_state>();
- if (state->BANK&1)
- device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+ if (BANK&1)
+ device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
- svision_sound_decrement(state->m_sound);
+ svision_sound_decrement(m_sound);
}
DRIVER_INIT_MEMBER(svision_state,svision)
@@ -514,7 +513,7 @@ static MACHINE_CONFIG_START( svision, svision_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M65C02, 4000000) /* ? stz used! speed? */
MCFG_CPU_PROGRAM_MAP(svision_mem)
- MCFG_CPU_VBLANK_INT("screen", svision_frame_int)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", svision_state, svision_frame_int)
/* video hardware */
diff --git a/src/mess/drivers/ti990_10.c b/src/mess/drivers/ti990_10.c
index c3b9e0cfd65..181718d3a77 100644
--- a/src/mess/drivers/ti990_10.c
+++ b/src/mess/drivers/ti990_10.c
@@ -89,6 +89,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_ti990_10(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(ti990_10_line_interrupt);
};
@@ -106,12 +107,11 @@ void ti990_10_state::machine_reset()
ti990_hdc_init(machine(), ti990_set_int13);
}
-static INTERRUPT_GEN( ti990_10_line_interrupt )
+INTERRUPT_GEN_MEMBER(ti990_10_state::ti990_10_line_interrupt)
{
- ti990_10_state *state = device->machine().driver_data<ti990_10_state>();
- vdt911_keyboard(state->m_terminal);
+ vdt911_keyboard(m_terminal);
- ti990_line_interrupt(device->machine());
+ ti990_line_interrupt(machine());
}
#ifdef UNUSED_FUNCTION
@@ -215,7 +215,7 @@ static MACHINE_CONFIG_START( ti990_10, ti990_10_state )
MCFG_CPU_CONFIG(reset_params)
MCFG_CPU_PROGRAM_MAP(ti990_10_memmap)
MCFG_CPU_IO_MAP(ti990_10_io)
- MCFG_CPU_PERIODIC_INT(ti990_10_line_interrupt, 120/*or 100 in Europe*/)
+ MCFG_CPU_PERIODIC_INT_DRIVER(ti990_10_state, ti990_10_line_interrupt, 120/*or 100 in Europe*/)
/* video hardware - we emulate a single 911 vdt display */
diff --git a/src/mess/drivers/ti990_4.c b/src/mess/drivers/ti990_4.c
index ac7efce58c4..b02a3412868 100644
--- a/src/mess/drivers/ti990_4.c
+++ b/src/mess/drivers/ti990_4.c
@@ -62,6 +62,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_ti990_4(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(ti990_4_line_interrupt);
};
@@ -75,17 +76,16 @@ void ti990_4_state::machine_reset()
}
-static INTERRUPT_GEN( ti990_4_line_interrupt )
+INTERRUPT_GEN_MEMBER(ti990_4_state::ti990_4_line_interrupt)
{
- ti990_4_state *state = device->machine().driver_data<ti990_4_state>();
#if VIDEO_911
- vdt911_keyboard(state->m_terminal);
+ vdt911_keyboard(m_terminal);
#else
- asr733_keyboard(state->m_terminal);
+ asr733_keyboard(m_terminal);
#endif
- ti990_line_interrupt(device->machine());
+ ti990_line_interrupt(machine());
}
#ifdef UNUSED_FUNCTION
@@ -245,7 +245,7 @@ static MACHINE_CONFIG_START( ti990_4, ti990_4_state )
MCFG_CPU_ADD("maincpu", TMS9900L, 3000000)
MCFG_CPU_PROGRAM_MAP(ti990_4_memmap)
MCFG_CPU_IO_MAP(ti990_4_cru_map)
- MCFG_CPU_PERIODIC_INT(ti990_4_line_interrupt, 120/*or TIME_IN_HZ(100) in Europe*/)
+ MCFG_CPU_PERIODIC_INT_DRIVER(ti990_4_state, ti990_4_line_interrupt, 120/*or TIME_IN_HZ(100) in Europe*/)
/* video hardware - we emulate a single 911 vdt display */
diff --git a/src/mess/drivers/ti99_2.c b/src/mess/drivers/ti99_2.c
index 51656ecd17f..8847f7166dd 100644
--- a/src/mess/drivers/ti99_2.c
+++ b/src/mess/drivers/ti99_2.c
@@ -102,6 +102,7 @@ public:
virtual void machine_reset();
virtual void palette_init();
UINT32 screen_update_ti99_2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(ti99_2_vblank_interrupt);
};
@@ -130,11 +131,10 @@ void ti99_2_state::machine_reset()
membank("bank1")->set_base((memregion("maincpu")->base()+0x4000));
}
-static INTERRUPT_GEN( ti99_2_vblank_interrupt )
+INTERRUPT_GEN_MEMBER(ti99_2_state::ti99_2_vblank_interrupt)
{
- ti99_2_state *state = device->machine().driver_data<ti99_2_state>();
- device->execute().set_input_line(1, state->m_irq_state);
- state->m_irq_state = (state->m_irq_state == ASSERT_LINE) ? CLEAR_LINE : ASSERT_LINE;
+ device.execute().set_input_line(1, m_irq_state);
+ m_irq_state = (m_irq_state == ASSERT_LINE) ? CLEAR_LINE : ASSERT_LINE;
}
@@ -380,7 +380,7 @@ static MACHINE_CONFIG_START( ti99_2, ti99_2_state )
MCFG_CPU_CONFIG(ti99_2_processor_config)
MCFG_CPU_PROGRAM_MAP(ti99_2_memmap)
MCFG_CPU_IO_MAP(ti99_2_io)
- MCFG_CPU_VBLANK_INT("screen", ti99_2_vblank_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", ti99_2_state, ti99_2_vblank_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/tim011.c b/src/mess/drivers/tim011.c
index 9b537083ec0..fe053d4b0f1 100644
--- a/src/mess/drivers/tim011.c
+++ b/src/mess/drivers/tim011.c
@@ -56,7 +56,7 @@ static MACHINE_CONFIG_START( tim011,tim011_state )
MCFG_CPU_ADD("maincpu",Z180, XTAL_12_288MHz / 2)
MCFG_CPU_PROGRAM_MAP(tim011_mem)
MCFG_CPU_IO_MAP(tim011_io)
- MCFG_CPU_VBLANK_INT("screen",irq0_line_hold)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", tim011_state, irq0_line_hold)
/* video hardware */
diff --git a/src/mess/drivers/trs80.c b/src/mess/drivers/trs80.c
index 996ff96e456..aca82e962d8 100644
--- a/src/mess/drivers/trs80.c
+++ b/src/mess/drivers/trs80.c
@@ -610,7 +610,7 @@ static MACHINE_CONFIG_DERIVED( model1, trs80 ) // model I, level II
MCFG_CPU_MODIFY( "maincpu" )
MCFG_CPU_PROGRAM_MAP( model1_map)
MCFG_CPU_IO_MAP( model1_io)
- MCFG_CPU_PERIODIC_INT(trs80_rtc_interrupt, 40)
+ MCFG_CPU_PERIODIC_INT_DRIVER(trs80_state, trs80_rtc_interrupt, 40)
/* devices */
MCFG_CASSETTE_MODIFY( CASSETTE_TAG, trs80l2_cassette_interface )
@@ -625,7 +625,7 @@ static MACHINE_CONFIG_DERIVED( model3, model1 )
MCFG_CPU_MODIFY( "maincpu" )
MCFG_CPU_PROGRAM_MAP( model3_map)
MCFG_CPU_IO_MAP( model3_io)
- MCFG_CPU_PERIODIC_INT(trs80_rtc_interrupt, 30)
+ MCFG_CPU_PERIODIC_INT_DRIVER(trs80_state, trs80_rtc_interrupt, 30)
MCFG_MACHINE_RESET_OVERRIDE(trs80_state, trs80m4 )
diff --git a/src/mess/drivers/tx0.c b/src/mess/drivers/tx0.c
index e11511fca33..fabaf530b8e 100644
--- a/src/mess/drivers/tx0.c
+++ b/src/mess/drivers/tx0.c
@@ -1498,9 +1498,8 @@ static void tx0_keyboard(running_machine &machine)
/*
Not a real interrupt - just handle keyboard input
*/
-static INTERRUPT_GEN( tx0_interrupt )
+INTERRUPT_GEN_MEMBER(tx0_state::tx0_interrupt)
{
- tx0_state *state = device->machine().driver_data<tx0_state>();
int control_keys;
int tsr_keys;
@@ -1509,93 +1508,93 @@ static INTERRUPT_GEN( tx0_interrupt )
/* read new state of control keys */
- control_keys = state->ioport("CSW")->read();
+ control_keys = ioport("CSW")->read();
if (control_keys & tx0_control)
{
/* compute transitions */
- control_transitions = control_keys & (~ state->m_old_control_keys);
+ control_transitions = control_keys & (~ m_old_control_keys);
if (control_transitions & tx0_stop_cyc0)
{
- device->machine().device("maincpu")->state().set_state_int(TX0_STOP_CYC0, !device->machine().device("maincpu")->state().state_int(TX0_STOP_CYC0));
+ machine().device("maincpu")->state().set_state_int(TX0_STOP_CYC0, !machine().device("maincpu")->state().state_int(TX0_STOP_CYC0));
}
if (control_transitions & tx0_stop_cyc1)
{
- device->machine().device("maincpu")->state().set_state_int(TX0_STOP_CYC1, !device->machine().device("maincpu")->state().state_int(TX0_STOP_CYC1));
+ machine().device("maincpu")->state().set_state_int(TX0_STOP_CYC1, !machine().device("maincpu")->state().state_int(TX0_STOP_CYC1));
}
if (control_transitions & tx0_gbl_cm_sel)
{
- device->machine().device("maincpu")->state().set_state_int(TX0_GBL_CM_SEL, !device->machine().device("maincpu")->state().state_int(TX0_GBL_CM_SEL));
+ machine().device("maincpu")->state().set_state_int(TX0_GBL_CM_SEL, !machine().device("maincpu")->state().state_int(TX0_GBL_CM_SEL));
}
if (control_transitions & tx0_stop)
{
- device->machine().device("maincpu")->state().set_state_int(TX0_RUN, (UINT64)0);
- device->machine().device("maincpu")->state().set_state_int(TX0_RIM, (UINT64)0);
+ machine().device("maincpu")->state().set_state_int(TX0_RUN, (UINT64)0);
+ machine().device("maincpu")->state().set_state_int(TX0_RIM, (UINT64)0);
}
if (control_transitions & tx0_restart)
{
- device->machine().device("maincpu")->state().set_state_int(TX0_RUN, 1);
- device->machine().device("maincpu")->state().set_state_int(TX0_RIM, (UINT64)0);
+ machine().device("maincpu")->state().set_state_int(TX0_RUN, 1);
+ machine().device("maincpu")->state().set_state_int(TX0_RIM, (UINT64)0);
}
if (control_transitions & tx0_read_in)
{ /* set cpu to read instructions from perforated tape */
- device->machine().device("maincpu")->state().set_state_int(TX0_RESET, (UINT64)0);
- device->machine().device("maincpu")->state().set_state_int(TX0_RUN, (UINT64)0);
- device->machine().device("maincpu")->state().set_state_int(TX0_RIM, 1);
+ machine().device("maincpu")->state().set_state_int(TX0_RESET, (UINT64)0);
+ machine().device("maincpu")->state().set_state_int(TX0_RUN, (UINT64)0);
+ machine().device("maincpu")->state().set_state_int(TX0_RIM, 1);
}
if (control_transitions & tx0_toggle_dn)
{
- state->m_tsr_index++;
- if (state->m_tsr_index == 18)
- state->m_tsr_index = 0;
+ m_tsr_index++;
+ if (m_tsr_index == 18)
+ m_tsr_index = 0;
}
if (control_transitions & tx0_toggle_up)
{
- state->m_tsr_index--;
- if (state->m_tsr_index == -1)
- state->m_tsr_index = 17;
+ m_tsr_index--;
+ if (m_tsr_index == -1)
+ m_tsr_index = 17;
}
if (control_transitions & tx0_cm_sel)
{
- if (state->m_tsr_index >= 2)
+ if (m_tsr_index >= 2)
{
- UINT32 cm_sel = (UINT32) device->machine().device("maincpu")->state().state_int(TX0_CM_SEL);
- device->machine().device("maincpu")->state().set_state_int(TX0_CM_SEL, cm_sel ^ (1 << (state->m_tsr_index - 2)));
+ UINT32 cm_sel = (UINT32) machine().device("maincpu")->state().state_int(TX0_CM_SEL);
+ machine().device("maincpu")->state().set_state_int(TX0_CM_SEL, cm_sel ^ (1 << (m_tsr_index - 2)));
}
}
if (control_transitions & tx0_lr_sel)
{
- if (state->m_tsr_index >= 2)
+ if (m_tsr_index >= 2)
{
- UINT32 lr_sel = (UINT32) device->machine().device("maincpu")->state().state_int(TX0_LR_SEL);
- device->machine().device("maincpu")->state().set_state_int(TX0_LR_SEL, (lr_sel ^ (1 << (state->m_tsr_index - 2))));
+ UINT32 lr_sel = (UINT32) machine().device("maincpu")->state().state_int(TX0_LR_SEL);
+ machine().device("maincpu")->state().set_state_int(TX0_LR_SEL, (lr_sel ^ (1 << (m_tsr_index - 2))));
}
}
/* remember new state of control keys */
- state->m_old_control_keys = control_keys;
+ m_old_control_keys = control_keys;
/* handle toggle switch register keys */
- tsr_keys = (device->machine().root_device().ioport("MSW")->read() << 16) | device->machine().root_device().ioport("LSW")->read();
+ tsr_keys = (machine().root_device().ioport("MSW")->read() << 16) | machine().root_device().ioport("LSW")->read();
/* compute transitions */
- tsr_transitions = tsr_keys & (~ state->m_old_tsr_keys);
+ tsr_transitions = tsr_keys & (~ m_old_tsr_keys);
/* update toggle switch register */
if (tsr_transitions)
- device->machine().device("maincpu")->state().set_state_int(TX0_TBR+state->m_tsr_index, device->machine().device("maincpu")->state().state_int(TX0_TBR+state->m_tsr_index) ^ tsr_transitions);
+ machine().device("maincpu")->state().set_state_int(TX0_TBR+m_tsr_index, machine().device("maincpu")->state().state_int(TX0_TBR+m_tsr_index) ^ tsr_transitions);
/* remember new state of toggle switch register keys */
- state->m_old_tsr_keys = tsr_keys;
+ m_old_tsr_keys = tsr_keys;
}
else
{
- state->m_old_control_keys = 0;
- state->m_old_tsr_keys = 0;
+ m_old_control_keys = 0;
+ m_old_tsr_keys = 0;
- tx0_keyboard(device->machine());
+ tx0_keyboard(machine());
}
}
@@ -1606,7 +1605,7 @@ static MACHINE_CONFIG_START( tx0_64kw, tx0_state )
MCFG_CPU_CONFIG(tx0_reset_param)
MCFG_CPU_PROGRAM_MAP(tx0_64kw_map)
/* dummy interrupt: handles input */
- MCFG_CPU_VBLANK_INT("screen", tx0_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", tx0_state, tx0_interrupt)
/* video hardware (includes the control panel and typewriter output) */
diff --git a/src/mess/drivers/vc4000.c b/src/mess/drivers/vc4000.c
index 3ecdf08f145..64629d4cc60 100644
--- a/src/mess/drivers/vc4000.c
+++ b/src/mess/drivers/vc4000.c
@@ -392,7 +392,7 @@ static MACHINE_CONFIG_START( vc4000, vc4000_state )
MCFG_CPU_ADD("maincpu", S2650, 3546875/4)
MCFG_CPU_PROGRAM_MAP(vc4000_mem)
MCFG_CPU_IO_MAP(vc4000_io)
- MCFG_CPU_PERIODIC_INT(vc4000_video_line, 312*53) // GOLF needs this exact value
+ MCFG_CPU_PERIODIC_INT_DRIVER(vc4000_state, vc4000_video_line, 312*53) // GOLF needs this exact value
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/vector06.c b/src/mess/drivers/vector06.c
index 66398c6cce1..2111cf57c1c 100644
--- a/src/mess/drivers/vector06.c
+++ b/src/mess/drivers/vector06.c
@@ -163,7 +163,7 @@ static MACHINE_CONFIG_START( vector06, vector06_state )
// MCFG_CPU_ADD("maincpu", Z80, 3000000)
MCFG_CPU_PROGRAM_MAP(vector06_mem)
MCFG_CPU_IO_MAP(vector06_io)
- MCFG_CPU_VBLANK_INT("screen", vector06_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", vector06_state, vector06_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/vic10.c b/src/mess/drivers/vic10.c
index df5b55adeff..a7ff6bc4b84 100644
--- a/src/mess/drivers/vic10.c
+++ b/src/mess/drivers/vic10.c
@@ -202,9 +202,9 @@ INPUT_PORTS_END
// vic2_interface vic_intf
//-------------------------------------------------
-static INTERRUPT_GEN( vic10_frame_interrupt )
+INTERRUPT_GEN_MEMBER(vic10_state::vic10_frame_interrupt)
{
- cbm_common_interrupt(device);
+ cbm_common_interrupt(&device);
}
READ8_MEMBER( vic10_state::vic_lightpen_x_cb )
@@ -614,7 +614,7 @@ static MACHINE_CONFIG_START( vic10, vic10_state )
MCFG_CPU_ADD(M6510_TAG, M6510, VIC6566_CLOCK)
MCFG_CPU_PROGRAM_MAP(vic10_mem)
MCFG_CPU_CONFIG(cpu_intf)
- MCFG_CPU_VBLANK_INT(SCREEN_TAG, vic10_frame_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, vic10_state, vic10_frame_interrupt)
MCFG_QUANTUM_PERFECT_CPU(M6510_TAG)
// video hardware
diff --git a/src/mess/drivers/vic20.c b/src/mess/drivers/vic20.c
index 0eb7e8a3567..1c4e38a49df 100644
--- a/src/mess/drivers/vic20.c
+++ b/src/mess/drivers/vic20.c
@@ -308,10 +308,9 @@ READ8_MEMBER( vic20_state::vic_videoram_r )
// VIDEO
//**************************************************************************
-static INTERRUPT_GEN( vic20_raster_interrupt )
+INTERRUPT_GEN_MEMBER(vic20_state::vic20_raster_interrupt)
{
- vic20_state *state = device->machine().driver_data<vic20_state>();
- state->m_vic->raster_interrupt_gen();
+ m_vic->raster_interrupt_gen();
}
@@ -756,7 +755,7 @@ static MACHINE_CONFIG_DERIVED( ntsc, vic20 )
// basic machine hardware
MCFG_CPU_ADD(M6502_TAG, M6502, MOS6560_CLOCK)
MCFG_CPU_PROGRAM_MAP(vic20_mem)
- MCFG_CPU_PERIODIC_INT(vic20_raster_interrupt, MOS656X_HRETRACERATE)
+ MCFG_CPU_PERIODIC_INT_DRIVER(vic20_state, vic20_raster_interrupt, MOS656X_HRETRACERATE)
// video/sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -782,7 +781,7 @@ static MACHINE_CONFIG_DERIVED( pal, vic20 )
// basic machine hardware
MCFG_CPU_ADD(M6502_TAG, M6502, MOS6561_CLOCK)
MCFG_CPU_PROGRAM_MAP(vic20_mem)
- MCFG_CPU_PERIODIC_INT(vic20_raster_interrupt, MOS656X_HRETRACERATE)
+ MCFG_CPU_PERIODIC_INT_DRIVER(vic20_state, vic20_raster_interrupt, MOS656X_HRETRACERATE)
// video/sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/vii.c b/src/mess/drivers/vii.c
index 6929501abbd..bd465f58bb7 100644
--- a/src/mess/drivers/vii.c
+++ b/src/mess/drivers/vii.c
@@ -140,6 +140,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_vii(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(vii_vblank);
};
enum
@@ -1021,71 +1022,70 @@ void vii_state::machine_reset()
{
}
-static INTERRUPT_GEN( vii_vblank )
+INTERRUPT_GEN_MEMBER(vii_state::vii_vblank)
{
- vii_state *state = device->machine().driver_data<vii_state>();
- UINT32 x = device->machine().rand() & 0x3ff;
- UINT32 y = device->machine().rand() & 0x3ff;
- UINT32 z = device->machine().rand() & 0x3ff;
+ UINT32 x = machine().rand() & 0x3ff;
+ UINT32 y = machine().rand() & 0x3ff;
+ UINT32 z = machine().rand() & 0x3ff;
- state->m_controller_input[0] = state->ioport("P1")->read();
- state->m_controller_input[1] = (UINT8)x;
- state->m_controller_input[2] = (UINT8)y;
- state->m_controller_input[3] = (UINT8)z;
- state->m_controller_input[4] = 0;
+ m_controller_input[0] = ioport("P1")->read();
+ m_controller_input[1] = (UINT8)x;
+ m_controller_input[2] = (UINT8)y;
+ m_controller_input[3] = (UINT8)z;
+ m_controller_input[4] = 0;
x >>= 8;
y >>= 8;
z >>= 8;
- state->m_controller_input[5] = (z << 4) | (y << 2) | x;
- state->m_controller_input[6] = 0xff;
- state->m_controller_input[7] = 0;
+ m_controller_input[5] = (z << 4) | (y << 2) | x;
+ m_controller_input[6] = 0xff;
+ m_controller_input[7] = 0;
- state->m_uart_rx_count = 0;
+ m_uart_rx_count = 0;
- state->VII_VIDEO_IRQ_STATUS = state->VII_VIDEO_IRQ_ENABLE & 1;
- if(state->VII_VIDEO_IRQ_STATUS)
+ VII_VIDEO_IRQ_STATUS = VII_VIDEO_IRQ_ENABLE & 1;
+ if(VII_VIDEO_IRQ_STATUS)
{
- verboselog(device->machine(), 0, "Video IRQ\n");
- device->machine().device("maincpu")->execute().set_input_line(UNSP_IRQ0_LINE, ASSERT_LINE);
+ verboselog(machine(), 0, "Video IRQ\n");
+ machine().device("maincpu")->execute().set_input_line(UNSP_IRQ0_LINE, ASSERT_LINE);
}
// {
-// verboselog(device->machine(), 0, "audio 1 IRQ\n");
-// device->machine().device("maincpu")->execute().set_input_line(UNSP_IRQ1_LINE, ASSERT_LINE);
+// verboselog(machine(), 0, "audio 1 IRQ\n");
+// machine().device("maincpu")->execute().set_input_line(UNSP_IRQ1_LINE, ASSERT_LINE);
// }
- if(state->m_io_regs[0x22] & state->m_io_regs[0x21] & 0x0c00)
+ if(m_io_regs[0x22] & m_io_regs[0x21] & 0x0c00)
{
- verboselog(device->machine(), 0, "timerA, timer B IRQ\n");
- device->machine().device("maincpu")->execute().set_input_line(UNSP_IRQ2_LINE, ASSERT_LINE);
+ verboselog(machine(), 0, "timerA, timer B IRQ\n");
+ machine().device("maincpu")->execute().set_input_line(UNSP_IRQ2_LINE, ASSERT_LINE);
}
- //if(state->m_io_regs[0x22] & state->m_io_regs[0x21] & 0x2100)
+ //if(m_io_regs[0x22] & m_io_regs[0x21] & 0x2100)
// For now trigger always if any enabled
- if(state->VII_CTLR_IRQ_ENABLE)
+ if(VII_CTLR_IRQ_ENABLE)
{
- verboselog(device->machine(), 0, "UART, ADC IRQ\n");
- device->machine().device("maincpu")->execute().set_input_line(UNSP_IRQ3_LINE, ASSERT_LINE);
+ verboselog(machine(), 0, "UART, ADC IRQ\n");
+ machine().device("maincpu")->execute().set_input_line(UNSP_IRQ3_LINE, ASSERT_LINE);
}
// {
-// verboselog(device->machine(), 0, "audio 4 IRQ\n");
-// device->machine().device("maincpu")->execute().set_input_line(UNSP_IRQ4_LINE, ASSERT_LINE);
+// verboselog(machine(), 0, "audio 4 IRQ\n");
+// machine().device("maincpu")->execute().set_input_line(UNSP_IRQ4_LINE, ASSERT_LINE);
// }
- if(state->m_io_regs[0x22] & state->m_io_regs[0x21] & 0x1200)
+ if(m_io_regs[0x22] & m_io_regs[0x21] & 0x1200)
{
- verboselog(device->machine(), 0, "External IRQ\n");
- device->machine().device("maincpu")->execute().set_input_line(UNSP_IRQ5_LINE, ASSERT_LINE);
+ verboselog(machine(), 0, "External IRQ\n");
+ machine().device("maincpu")->execute().set_input_line(UNSP_IRQ5_LINE, ASSERT_LINE);
}
- if(state->m_io_regs[0x22] & state->m_io_regs[0x21] & 0x0070)
+ if(m_io_regs[0x22] & m_io_regs[0x21] & 0x0070)
{
- verboselog(device->machine(), 0, "1024Hz, 2048HZ, 4096HZ IRQ\n");
- device->machine().device("maincpu")->execute().set_input_line(UNSP_IRQ6_LINE, ASSERT_LINE);
+ verboselog(machine(), 0, "1024Hz, 2048HZ, 4096HZ IRQ\n");
+ machine().device("maincpu")->execute().set_input_line(UNSP_IRQ6_LINE, ASSERT_LINE);
}
- if(state->m_io_regs[0x22] & state->m_io_regs[0x21] & 0x008b)
+ if(m_io_regs[0x22] & m_io_regs[0x21] & 0x008b)
{
- verboselog(device->machine(), 0, "TMB1, TMB2, 4Hz, key change IRQ\n");
- device->machine().device("maincpu")->execute().set_input_line(UNSP_IRQ7_LINE, ASSERT_LINE);
+ verboselog(machine(), 0, "TMB1, TMB2, 4Hz, key change IRQ\n");
+ machine().device("maincpu")->execute().set_input_line(UNSP_IRQ7_LINE, ASSERT_LINE);
}
}
@@ -1094,7 +1094,7 @@ static MACHINE_CONFIG_START( vii, vii_state )
MCFG_CPU_ADD( "maincpu", UNSP, XTAL_27MHz)
MCFG_CPU_PROGRAM_MAP( vii_mem )
- MCFG_CPU_VBLANK_INT("screen", vii_vblank)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", vii_state, vii_vblank)
MCFG_SCREEN_ADD( "screen", RASTER )
@@ -1116,7 +1116,7 @@ static MACHINE_CONFIG_START( vsmile, vii_state )
MCFG_CPU_ADD( "maincpu", UNSP, XTAL_27MHz)
MCFG_CPU_PROGRAM_MAP( vii_mem )
- MCFG_CPU_VBLANK_INT("screen", vii_vblank)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", vii_state, vii_vblank)
MCFG_SCREEN_ADD( "screen", RASTER )
@@ -1141,7 +1141,7 @@ static MACHINE_CONFIG_START( batman, vii_state )
MCFG_CPU_ADD( "maincpu", UNSP, XTAL_27MHz)
MCFG_CPU_PROGRAM_MAP( vii_mem )
- MCFG_CPU_VBLANK_INT("screen", vii_vblank)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", vii_state, vii_vblank)
MCFG_I2CMEM_ADD("i2cmem",i2cmem_interface)
diff --git a/src/mess/drivers/vt100.c b/src/mess/drivers/vt100.c
index 0b92b583e6e..a49ff534fde 100644
--- a/src/mess/drivers/vt100.c
+++ b/src/mess/drivers/vt100.c
@@ -57,6 +57,7 @@ public:
virtual void machine_start();
virtual void machine_reset();
UINT32 screen_update_vt100(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(vt100_vertical_interrupt);
};
@@ -379,11 +380,10 @@ static const vt_video_interface vt100_video_interface =
DEVCB_DRIVER_MEMBER(vt100_state, vt100_clear_video_interrupt)
};
-static INTERRUPT_GEN( vt100_vertical_interrupt )
+INTERRUPT_GEN_MEMBER(vt100_state::vt100_vertical_interrupt)
{
- vt100_state *state = device->machine().driver_data<vt100_state>();
- state->m_vertical_int = 1;
- device->execute().set_input_line(0, HOLD_LINE);
+ m_vertical_int = 1;
+ device.execute().set_input_line(0, HOLD_LINE);
}
/* F4 Character Displayer */
@@ -412,7 +412,7 @@ static MACHINE_CONFIG_START( vt100, vt100_state )
MCFG_CPU_ADD("maincpu",I8080, XTAL_24_8832MHz / 9)
MCFG_CPU_PROGRAM_MAP(vt100_mem)
MCFG_CPU_IO_MAP(vt100_io)
- MCFG_CPU_VBLANK_INT("screen", vt100_vertical_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", vt100_state, vt100_vertical_interrupt)
/* video hardware */
diff --git a/src/mess/drivers/vt240.c b/src/mess/drivers/vt240.c
index 673818a942c..8170dca0dad 100644
--- a/src/mess/drivers/vt240.c
+++ b/src/mess/drivers/vt240.c
@@ -47,6 +47,7 @@ public:
required_shared_ptr<UINT8> m_video_ram;
DECLARE_DRIVER_INIT(vt240);
virtual void machine_reset();
+ INTERRUPT_GEN_MEMBER(vt240_irq);
};
/* TODO */
@@ -140,9 +141,9 @@ static UPD7220_INTERFACE( hgdc_intf )
DEVCB_NULL
};
-static INTERRUPT_GEN( vt240_irq )
+INTERRUPT_GEN_MEMBER(vt240_state::vt240_irq)
{
- //device->execute().set_input_line(I8085_RST65_LINE, ASSERT_LINE);
+ //device.execute().set_input_line(I8085_RST65_LINE, ASSERT_LINE);
}
static const gfx_layout vt240_chars_8x8 =
@@ -165,7 +166,7 @@ static MACHINE_CONFIG_START( vt240, vt240_state )
MCFG_CPU_ADD("maincpu", I8085A, XTAL_16MHz / 4)
MCFG_CPU_PROGRAM_MAP(vt240_mem)
MCFG_CPU_IO_MAP(vt240_io)
- MCFG_CPU_VBLANK_INT("screen",vt240_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", vt240_state, vt240_irq)
/* video hardware */
diff --git a/src/mess/drivers/vtech2.c b/src/mess/drivers/vtech2.c
index ac7e7cbc4cc..5b4f5c2b34b 100644
--- a/src/mess/drivers/vtech2.c
+++ b/src/mess/drivers/vtech2.c
@@ -398,9 +398,9 @@ void vtech2_state::palette_init()
colortable_entry_set_value(machine().colortable, 512+i, i);
}
-static INTERRUPT_GEN( vtech2_interrupt )
+INTERRUPT_GEN_MEMBER(vtech2_state::vtech2_interrupt)
{
- device->machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
+ machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
}
static const cassette_interface laser_cassette_interface =
@@ -430,7 +430,7 @@ static MACHINE_CONFIG_START( laser350, vtech2_state )
MCFG_CPU_ADD("maincpu", Z80, 3694700) /* 3.694700 MHz */
MCFG_CPU_PROGRAM_MAP(vtech2_mem)
MCFG_CPU_IO_MAP(vtech2_io)
- MCFG_CPU_VBLANK_INT("screen", vtech2_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", vtech2_state, vtech2_interrupt)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
diff --git a/src/mess/drivers/x68k.c b/src/mess/drivers/x68k.c
index 7c712f4d470..39498bad0d2 100644
--- a/src/mess/drivers/x68k.c
+++ b/src/mess/drivers/x68k.c
@@ -1895,22 +1895,22 @@ static WRITE_LINE_DEVICE_HANDLER( mfp_irq_callback )
drvstate->m_mfp_prev = state;
}
-static INTERRUPT_GEN( x68k_vsync_irq )
+INTERRUPT_GEN_MEMBER(x68k_state::x68k_vsync_irq)
{
#if 0
x68k_state *state = machine.driver_data<x68k_state>();
- if(state->m_mfp.ierb & 0x40)
+ if(m_mfp.ierb & 0x40)
{
- state->m_mfp.isrb |= 0x40;
- state->m_current_vector[6] = (state->m_mfp.vr & 0xf0) | 0x06; // GPIP4 (V-DISP)
- state->m_current_irq_line = 6;
+ m_mfp.isrb |= 0x40;
+ m_current_vector[6] = (m_mfp.vr & 0xf0) | 0x06; // GPIP4 (V-DISP)
+ m_current_irq_line = 6;
mfp_timer_a_callback(0); // Timer A is usually always in event count mode, and is tied to V-DISP
mfp_trigger_irq(MFP_IRQ_GPIP4);
}
- if(state->m_crtc.height == 256)
- machine.primary_screen->update_partial(256);//state->m_crtc.reg[4]/2);
+ if(m_crtc.height == 256)
+ machine.primary_screen->update_partial(256);//m_crtc.reg[4]/2);
else
- machine.primary_screen->update_partial(512);//state->m_crtc.reg[4]);
+ machine.primary_screen->update_partial(512);//m_crtc.reg[4]);
#endif
}
@@ -2741,7 +2741,7 @@ static MACHINE_CONFIG_FRAGMENT( x68000_base )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */
MCFG_CPU_PROGRAM_MAP(x68k_map)
- MCFG_CPU_VBLANK_INT("screen", x68k_vsync_irq)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", x68k_state, x68k_vsync_irq)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_MACHINE_START_OVERRIDE(x68k_state, x68000 )
diff --git a/src/mess/includes/apple3.h b/src/mess/includes/apple3.h
index efb6984d15e..a0ebefd4272 100644
--- a/src/mess/includes/apple3.h
+++ b/src/mess/includes/apple3.h
@@ -60,6 +60,7 @@ public:
DECLARE_MACHINE_RESET(apple3);
DECLARE_VIDEO_START(apple3);
UINT32 screen_update_apple3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(apple3_interrupt);
};
@@ -69,9 +70,6 @@ extern const applefdc_interface apple3_fdc_interface;
extern const via6522_interface apple3_via_0_intf;
extern const via6522_interface apple3_via_1_intf;
-
-INTERRUPT_GEN( apple3_interrupt );
-
/*----------- defined in video/apple3.c -----------*/
void apple3_write_charmem(running_machine &machine);
diff --git a/src/mess/includes/arcadia.h b/src/mess/includes/arcadia.h
index a746bb857b7..236d786cf96 100644
--- a/src/mess/includes/arcadia.h
+++ b/src/mess/includes/arcadia.h
@@ -81,7 +81,6 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_arcadia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(arcadia_video_line);
};
-
-extern INTERRUPT_GEN( arcadia_video_line );
#endif /* ARCADIA_H_ */
diff --git a/src/mess/includes/b2m.h b/src/mess/includes/b2m.h
index d4ed2612542..d5065be982d 100644
--- a/src/mess/includes/b2m.h
+++ b/src/mess/includes/b2m.h
@@ -49,6 +49,7 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_b2m(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(b2m_vblank_interrupt);
};
/*----------- defined in machine/b2m.c -----------*/
@@ -60,6 +61,4 @@ extern const i8255_interface b2m_ppi8255_interface_1;
extern const i8255_interface b2m_ppi8255_interface_2;
extern const i8255_interface b2m_ppi8255_interface_3;
-extern INTERRUPT_GEN( b2m_vblank_interrupt );
-
#endif
diff --git a/src/mess/includes/bbc.h b/src/mess/includes/bbc.h
index dbdfc2852c3..52fadd1bcd8 100644
--- a/src/mess/includes/bbc.h
+++ b/src/mess/includes/bbc.h
@@ -282,6 +282,9 @@ public:
DECLARE_MACHINE_RESET(bbcbp);
DECLARE_VIDEO_START(bbcbp);
UINT32 screen_update_bbc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(bbcb_vsync);
+ INTERRUPT_GEN_MEMBER(bbcb_keyscan);
+ INTERRUPT_GEN_MEMBER(bbcm_keyscan);
};
@@ -295,9 +298,6 @@ extern const via6522_interface bbcb_system_via;
extern const via6522_interface bbcb_user_via;
extern const wd17xx_interface bbc_wd17xx_interface;
-INTERRUPT_GEN( bbcb_keyscan );
-INTERRUPT_GEN( bbcm_keyscan );
-
/* disc support */
DEVICE_IMAGE_LOAD ( bbcb_cart );
diff --git a/src/mess/includes/c128.h b/src/mess/includes/c128.h
index f0ce211c874..5c3a55e003d 100644
--- a/src/mess/includes/c128.h
+++ b/src/mess/includes/c128.h
@@ -220,13 +220,12 @@ public:
DECLARE_DRIVER_INIT(c128d);
DECLARE_DRIVER_INIT(c128);
DECLARE_DRIVER_INIT(c128d81);
+ INTERRUPT_GEN_MEMBER(c128_frame_interrupt);
};
/*----------- defined in machine/c128.c -----------*/
-extern INTERRUPT_GEN( c128_frame_interrupt );
-
extern const mos6526_interface c128_cia1_intf, c128_cia2_intf;
#endif /* __C128_H__ */
diff --git a/src/mess/includes/c16.h b/src/mess/includes/c16.h
index c6ac537b23a..77a10bb101a 100644
--- a/src/mess/includes/c16.h
+++ b/src/mess/includes/c16.h
@@ -75,8 +75,6 @@ extern void c16_interrupt(running_machine &machine, int level);
extern int c16_dma_read(running_machine &machine, int offset);
extern int c16_dma_read_rom(running_machine &machine, int offset);
-extern INTERRUPT_GEN( c16_frame_interrupt );
-
MACHINE_CONFIG_EXTERN( c16_cartslot );
#endif /* __C16_H__ */
diff --git a/src/mess/includes/c64.h b/src/mess/includes/c64.h
index de3b08e01b4..494bc0bf3d6 100644
--- a/src/mess/includes/c64.h
+++ b/src/mess/includes/c64.h
@@ -142,6 +142,7 @@ public:
int m_cass_rd;
int m_iec_srq;
DECLARE_DRIVER_INIT(c64pal);
+ INTERRUPT_GEN_MEMBER(c64_frame_interrupt);
};
diff --git a/src/mess/includes/c64_legacy.h b/src/mess/includes/c64_legacy.h
index 516e32c0ce1..3e92375f149 100644
--- a/src/mess/includes/c64_legacy.h
+++ b/src/mess/includes/c64_legacy.h
@@ -90,6 +90,7 @@ public:
DECLARE_DRIVER_INIT( ultimax );
DECLARE_DRIVER_INIT( c64gs );
DECLARE_DRIVER_INIT( sx64 );
+ INTERRUPT_GEN_MEMBER(c64_frame_interrupt);
};
@@ -105,7 +106,6 @@ DECLARE_WRITE8_HANDLER ( c64_colorram_write );
MACHINE_START( c64 );
MACHINE_RESET( c64 );
-INTERRUPT_GEN( c64_frame_interrupt );
TIMER_CALLBACK( c64_tape_timer );
/* private area */
diff --git a/src/mess/includes/c65.h b/src/mess/includes/c65.h
index 90b0eb10290..58a99a0fe96 100644
--- a/src/mess/includes/c65.h
+++ b/src/mess/includes/c65.h
@@ -65,6 +65,8 @@ public:
DECLARE_MACHINE_START(c65);
DECLARE_PALETTE_INIT(c65);
UINT32 screen_update_c65(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(vic3_raster_irq);
+ INTERRUPT_GEN_MEMBER(c65_frame_interrupt);
};
@@ -85,9 +87,6 @@ int c65_dma_read_color(running_machine &machine, int offset);
void c65_vic_interrupt(running_machine &machine, int level);
void c65_bankswitch_interface(running_machine &machine, int value);
-
-INTERRUPT_GEN( c65_frame_interrupt );
-
extern const mos6526_interface c65_cia0;
extern const mos6526_interface c65_cia1;
diff --git a/src/mess/includes/cgenie.h b/src/mess/includes/cgenie.h
index 7cbe8407a8d..b2ed3fb103a 100644
--- a/src/mess/includes/cgenie.h
+++ b/src/mess/includes/cgenie.h
@@ -71,6 +71,8 @@ public:
DECLARE_PALETTE_INIT(cgenie);
DECLARE_PALETTE_INIT(cgenienz);
UINT32 screen_update_cgenie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(cgenie_timer_interrupt);
+ INTERRUPT_GEN_MEMBER(cgenie_frame_interrupt);
};
@@ -100,9 +102,6 @@ DECLARE_WRITE8_HANDLER ( cgenie_port_ff_w );
DECLARE_READ8_HANDLER ( cgenie_port_ff_r );
int cgenie_port_xx_r(int offset);
-INTERRUPT_GEN( cgenie_timer_interrupt );
-INTERRUPT_GEN( cgenie_frame_interrupt );
-
DECLARE_READ8_HANDLER ( cgenie_status_r );
DECLARE_READ8_HANDLER ( cgenie_track_r );
DECLARE_READ8_HANDLER ( cgenie_sector_r );
diff --git a/src/mess/includes/compis.h b/src/mess/includes/compis.h
index 46616d7a10a..d905919f527 100644
--- a/src/mess/includes/compis.h
+++ b/src/mess/includes/compis.h
@@ -187,6 +187,7 @@ public:
virtual void machine_reset();
virtual void palette_init();
UINT32 screen_update_compis2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(compis_vblank_int);
};
@@ -200,6 +201,4 @@ extern const struct pic8259_interface compis_pic8259_slave_config;
extern const i8251_interface compis_usart_interface;
extern const upd765_interface compis_fdc_interface;
-INTERRUPT_GEN(compis_vblank_int);
-
#endif /* COMPIS_H_ */
diff --git a/src/mess/includes/concept.h b/src/mess/includes/concept.h
index 656db9077a6..774e7f3bdc0 100644
--- a/src/mess/includes/concept.h
+++ b/src/mess/includes/concept.h
@@ -56,6 +56,7 @@ public:
virtual void machine_start();
virtual void video_start();
UINT32 screen_update_concept(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(concept_interrupt);
};
@@ -64,7 +65,4 @@ public:
extern const via6522_interface concept_via6522_intf;
extern const wd17xx_interface concept_wd17xx_interface;
-INTERRUPT_GEN( concept_interrupt );
-
-
#endif /* CONCEPT_H_ */
diff --git a/src/mess/includes/fmtowns.h b/src/mess/includes/fmtowns.h
index 508697eb031..d9978a85793 100644
--- a/src/mess/includes/fmtowns.h
+++ b/src/mess/includes/fmtowns.h
@@ -274,6 +274,8 @@ class towns_state : public driver_device
void poll_keyboard();
void mouse_timeout();
void wait_end();
+public:
+ INTERRUPT_GEN_MEMBER(towns_vsync_irq);
};
class marty_state : public towns_state
@@ -286,8 +288,4 @@ class marty_state : public towns_state
virtual void driver_start();
};
-INTERRUPT_GEN( towns_vsync_irq );
-//VIDEO_START( towns );
-//SCREEN_UPDATE_RGB32( towns );
-
#endif /*FMTOWNS_H_*/
diff --git a/src/mess/includes/galaxy.h b/src/mess/includes/galaxy.h
index 967fd5c8468..37da82ef0f4 100644
--- a/src/mess/includes/galaxy.h
+++ b/src/mess/includes/galaxy.h
@@ -32,11 +32,11 @@ public:
DECLARE_MACHINE_RESET(galaxy);
DECLARE_MACHINE_RESET(galaxyp);
UINT32 screen_update_galaxy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(galaxy_interrupt);
};
/*----------- defined in machine/galaxy.c -----------*/
-INTERRUPT_GEN( galaxy_interrupt );
SNAPSHOT_LOAD( galaxy );
/*----------- defined in video/galaxy.c -----------*/
diff --git a/src/mess/includes/gamecom.h b/src/mess/includes/gamecom.h
index d743c410d0f..75f59454e9e 100644
--- a/src/mess/includes/gamecom.h
+++ b/src/mess/includes/gamecom.h
@@ -243,6 +243,7 @@ public:
virtual void machine_reset();
virtual void video_start();
virtual void palette_init();
+ INTERRUPT_GEN_MEMBER(gamecom_interrupt);
};
diff --git a/src/mess/includes/gb.h b/src/mess/includes/gb.h
index 3e0a6f2a1d1..4e9808f9c84 100644
--- a/src/mess/includes/gb.h
+++ b/src/mess/includes/gb.h
@@ -245,6 +245,7 @@ public:
DECLARE_PALETTE_INIT(gbc);
DECLARE_MACHINE_START(gb_video);
DECLARE_MACHINE_START(gbc_video);
+ INTERRUPT_GEN_MEMBER(gb_scanline_interrupt);
};
@@ -252,7 +253,6 @@ public:
DEVICE_START(gb_cart);
DEVICE_IMAGE_LOAD(gb_cart);
-INTERRUPT_GEN( gb_scanline_interrupt );
void gb_timer_callback(lr35902_cpu_device *device, int cycles);
diff --git a/src/mess/includes/gmaster.h b/src/mess/includes/gmaster.h
index 34b9af6167b..8bf6e3ec57b 100644
--- a/src/mess/includes/gmaster.h
+++ b/src/mess/includes/gmaster.h
@@ -32,6 +32,7 @@ public:
DECLARE_DRIVER_INIT(gmaster);
virtual void palette_init();
UINT32 screen_update_gmaster(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(gmaster_interrupt);
};
diff --git a/src/mess/includes/intv.h b/src/mess/includes/intv.h
index eeedb655ede..605113e7de4 100644
--- a/src/mess/includes/intv.h
+++ b/src/mess/includes/intv.h
@@ -132,6 +132,8 @@ public:
DECLARE_MACHINE_RESET(intvecs);
UINT32 screen_update_intv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_intvkbd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(intv_interrupt2);
+ INTERRUPT_GEN_MEMBER(intv_interrupt);
};
/*----------- defined in video/intv.c -----------*/
@@ -144,7 +146,6 @@ void intv_stic_screenrefresh(running_machine &machine);
DEVICE_START( intv_cart );
DEVICE_IMAGE_LOAD( intv_cart );
-extern INTERRUPT_GEN( intv_interrupt );
/* for the console + keyboard component... */
DEVICE_IMAGE_LOAD( intvkbd_cart );
diff --git a/src/mess/includes/kaypro.h b/src/mess/includes/kaypro.h
index 6758137f51f..5b17abf5931 100644
--- a/src/mess/includes/kaypro.h
+++ b/src/mess/includes/kaypro.h
@@ -78,6 +78,7 @@ public:
UINT32 screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_kaypro2x(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
UINT32 screen_update_omni2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(kay_kbd_interrupt);
};
@@ -86,7 +87,6 @@ public:
UINT8 kay_kbd_c_r( running_machine &machine );
UINT8 kay_kbd_d_r( running_machine &machine );
void kay_kbd_d_w( running_machine &machine, UINT8 data );
-INTERRUPT_GEN( kay_kbd_interrupt );
INPUT_PORTS_EXTERN( kay_kbd );
diff --git a/src/mess/includes/lisa.h b/src/mess/includes/lisa.h
index b2d4955ded6..614593da754 100644
--- a/src/mess/includes/lisa.h
+++ b/src/mess/includes/lisa.h
@@ -164,6 +164,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_lisa(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(lisa_interrupt);
};
@@ -174,8 +175,6 @@ extern const via6522_interface lisa_via6522_1_intf;
extern NVRAM_HANDLER(lisa);
-INTERRUPT_GEN( lisa_interrupt );
-
#endif /* LISA_H_ */
diff --git a/src/mess/includes/lynx.h b/src/mess/includes/lynx.h
index 0af7f9fbefa..ab019d5e9b4 100644
--- a/src/mess/includes/lynx.h
+++ b/src/mess/includes/lynx.h
@@ -145,13 +145,8 @@ public:
/*----------- defined in machine/lynx.c -----------*/
-
-
-
void lynx_timer_count_down(running_machine &machine, int nr);
-INTERRUPT_GEN( lynx_frame_int );
-
/* These functions are also needed for the Quickload */
int lynx_verify_cart (char *header, int kind);
void lynx_crc_keyword(device_image_interface &image);
diff --git a/src/mess/includes/mac.h b/src/mess/includes/mac.h
index 374d2e66c68..29bef81d3c4 100644
--- a/src/mess/includes/mac.h
+++ b/src/mess/includes/mac.h
@@ -522,6 +522,7 @@ public:
UINT32 screen_update_macdafb(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
UINT32 screen_update_macrbvvram(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
UINT32 screen_update_macpbwd(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(mac_rbv_vbl);
};
#endif /* MAC_H_ */
diff --git a/src/mess/includes/mbee.h b/src/mess/includes/mbee.h
index 16102e9dbc7..c27d66b7672 100644
--- a/src/mess/includes/mbee.h
+++ b/src/mess/includes/mbee.h
@@ -141,6 +141,7 @@ public:
DECLARE_MACHINE_RESET(mbee256);
DECLARE_MACHINE_RESET(mbeett);
UINT32 screen_update_mbee(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(mbee_interrupt);
};
@@ -149,7 +150,6 @@ public:
extern const wd17xx_interface mbee_wd17xx_interface;
extern const z80pio_interface mbee_z80pio_intf;
-INTERRUPT_GEN( mbee_interrupt );
QUICKLOAD_LOAD( mbee );
diff --git a/src/mess/includes/microtan.h b/src/mess/includes/microtan.h
index cb73bbfeff1..f3277a2c465 100644
--- a/src/mess/includes/microtan.h
+++ b/src/mess/includes/microtan.h
@@ -52,6 +52,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_microtan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(microtan_interrupt);
};
@@ -63,6 +64,4 @@ extern const via6522_interface microtan_via6522_1;
SNAPSHOT_LOAD( microtan );
QUICKLOAD_LOAD( microtan_hexfile );
-INTERRUPT_GEN( microtan_interrupt );
-
#endif /* MICROTAN_H_ */
diff --git a/src/mess/includes/msx.h b/src/mess/includes/msx.h
index e475b3ee400..69fcddb3e16 100644
--- a/src/mess/includes/msx.h
+++ b/src/mess/includes/msx.h
@@ -124,6 +124,7 @@ public:
DECLARE_MACHINE_RESET(msx);
DECLARE_MACHINE_START(msx2);
DECLARE_MACHINE_RESET(msx2);
+ INTERRUPT_GEN_MEMBER(msx_interrupt);
};
@@ -132,7 +133,6 @@ public:
extern const i8255_interface msx_ppi8255_interface;
extern const wd17xx_interface msx_wd17xx_interface;
/* start/stop functions */
-extern INTERRUPT_GEN( msx_interrupt );
extern TIMER_DEVICE_CALLBACK( msx2_interrupt );
DEVICE_IMAGE_LOAD( msx_cart );
diff --git a/src/mess/includes/newbrain.h b/src/mess/includes/newbrain.h
index b0a036bf245..2a48245120a 100644
--- a/src/mess/includes/newbrain.h
+++ b/src/mess/includes/newbrain.h
@@ -157,6 +157,7 @@ public:
int m_copstate;
int m_copbytes;
int m_copregint;
+ INTERRUPT_GEN_MEMBER(newbrain_interrupt);
};
class newbrain_eim_state : public newbrain_state
diff --git a/src/mess/includes/ondra.h b/src/mess/includes/ondra.h
index 41554599cd2..2195e1bf324 100644
--- a/src/mess/includes/ondra.h
+++ b/src/mess/includes/ondra.h
@@ -24,6 +24,7 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(ondra_interrupt);
};
#endif
diff --git a/src/mess/includes/orion.h b/src/mess/includes/orion.h
index 756478b5ca6..758736b82f7 100644
--- a/src/mess/includes/orion.h
+++ b/src/mess/includes/orion.h
@@ -63,15 +63,11 @@ public:
DECLARE_MACHINE_RESET(orionz80);
DECLARE_MACHINE_RESET(orionpro);
UINT32 screen_update_orion128(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(orionz80_interrupt);
};
-
/*----------- defined in machine/orion.c -----------*/
-
extern const i8255_interface orion128_ppi8255_interface_1;
-extern INTERRUPT_GEN( orionz80_interrupt );
-
-
#endif /* ORION_H_ */
diff --git a/src/mess/includes/p2000t.h b/src/mess/includes/p2000t.h
index d1e08496140..e900e1355ca 100644
--- a/src/mess/includes/p2000t.h
+++ b/src/mess/includes/p2000t.h
@@ -44,6 +44,7 @@ public:
DECLARE_VIDEO_START(p2000m);
DECLARE_PALETTE_INIT(p2000m);
UINT32 screen_update_p2000m(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(p2000_interrupt);
};
#endif /* P2000T_H_ */
diff --git a/src/mess/includes/pdp1.h b/src/mess/includes/pdp1.h
index e507224270e..9871f6ae235 100644
--- a/src/mess/includes/pdp1.h
+++ b/src/mess/includes/pdp1.h
@@ -261,6 +261,7 @@ public:
virtual void palette_init();
UINT32 screen_update_pdp1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_eof_pdp1(screen_device &screen, bool state);
+ INTERRUPT_GEN_MEMBER(pdp1_interrupt);
};
/*----------- defined in video/pdp1.c -----------*/
diff --git a/src/mess/includes/pet.h b/src/mess/includes/pet.h
index cbae4639734..d9fda31cd52 100644
--- a/src/mess/includes/pet.h
+++ b/src/mess/includes/pet.h
@@ -56,6 +56,7 @@ public:
virtual void palette_init();
DECLARE_VIDEO_START(pet_crtc);
UINT32 screen_update_pet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(pet_frame_interrupt);
};
/*----------- defined in video/pet.c -----------*/
@@ -82,9 +83,6 @@ DECLARE_WRITE8_HANDLER(cbm8096_w);
extern DECLARE_READ8_HANDLER(superpet_r);
extern DECLARE_WRITE8_HANDLER(superpet_w);
-
-INTERRUPT_GEN( pet_frame_interrupt );
-
MACHINE_CONFIG_EXTERN( pet_cartslot );
MACHINE_CONFIG_EXTERN( pet4_cartslot );
diff --git a/src/mess/includes/pk8020.h b/src/mess/includes/pk8020.h
index 3830853c6a4..b9f00b52963 100644
--- a/src/mess/includes/pk8020.h
+++ b/src/mess/includes/pk8020.h
@@ -45,6 +45,7 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_pk8020(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(pk8020_interrupt);
};
@@ -54,6 +55,5 @@ extern const i8255_interface pk8020_ppi8255_interface_2;
extern const i8255_interface pk8020_ppi8255_interface_3;
extern const struct pit8253_config pk8020_pit8253_intf;
extern const struct pic8259_interface pk8020_pic8259_config;
-extern INTERRUPT_GEN( pk8020_interrupt );
#endif /* pk8020_H_ */
diff --git a/src/mess/includes/plus4.h b/src/mess/includes/plus4.h
index 4a9d194aaad..966b00b8ce6 100644
--- a/src/mess/includes/plus4.h
+++ b/src/mess/includes/plus4.h
@@ -107,6 +107,8 @@ public:
// keyboard state
UINT8 m_port6529;
UINT8 m_keyline[10];
+ INTERRUPT_GEN_MEMBER(c16_raster_interrupt);
+ INTERRUPT_GEN_MEMBER(c16_frame_interrupt);
};
diff --git a/src/mess/includes/poly88.h b/src/mess/includes/poly88.h
index 292dab4d55f..9947b6c9a47 100644
--- a/src/mess/includes/poly88.h
+++ b/src/mess/includes/poly88.h
@@ -34,14 +34,11 @@ public:
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_poly88(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(poly88_interrupt);
};
/*----------- defined in machine/poly88.c -----------*/
-
-
-INTERRUPT_GEN( poly88_interrupt );
-
extern const i8251_interface poly88_usart_interface;
extern SNAPSHOT_LOAD( poly88 );
diff --git a/src/mess/includes/primo.h b/src/mess/includes/primo.h
index be7a7b9cfed..90b7b8a4f84 100644
--- a/src/mess/includes/primo.h
+++ b/src/mess/includes/primo.h
@@ -34,12 +34,12 @@ public:
virtual void machine_reset();
DECLARE_MACHINE_RESET(primob);
UINT32 screen_update_primo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(primo_vblank_interrupt);
};
/*----------- defined in machine/primo.c -----------*/
-extern INTERRUPT_GEN( primo_vblank_interrupt );
extern SNAPSHOT_LOAD( primo );
extern QUICKLOAD_LOAD( primo );
diff --git a/src/mess/includes/samcoupe.h b/src/mess/includes/samcoupe.h
index d8066401de6..a38e0b5188a 100644
--- a/src/mess/includes/samcoupe.h
+++ b/src/mess/includes/samcoupe.h
@@ -82,6 +82,7 @@ public:
virtual void machine_start();
virtual void machine_reset();
virtual void palette_init();
+ INTERRUPT_GEN_MEMBER(samcoupe_frame_interrupt);
};
diff --git a/src/mess/includes/spectrum.h b/src/mess/includes/spectrum.h
index fa76a1b0be4..2a2519a21e7 100644
--- a/src/mess/includes/spectrum.h
+++ b/src/mess/includes/spectrum.h
@@ -123,6 +123,7 @@ public:
UINT32 screen_update_tc2048(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_ts2068(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_eof_spectrum(screen_device &screen, bool state);
+ INTERRUPT_GEN_MEMBER(spec_interrupt);
};
diff --git a/src/mess/includes/svision.h b/src/mess/includes/svision.h
index 8553d3a45b3..7b3668c5264 100644
--- a/src/mess/includes/svision.h
+++ b/src/mess/includes/svision.h
@@ -56,6 +56,7 @@ public:
DECLARE_MACHINE_RESET(tvlink);
UINT32 screen_update_svision(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_tvlink(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(svision_frame_int);
};
diff --git a/src/mess/includes/trs80.h b/src/mess/includes/trs80.h
index 6340a639247..b593553d7d7 100644
--- a/src/mess/includes/trs80.h
+++ b/src/mess/includes/trs80.h
@@ -122,6 +122,8 @@ public:
UINT32 screen_update_lnw80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_radionic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_meritum(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(trs80_rtc_interrupt);
+ INTERRUPT_GEN_MEMBER(trs80_fdc_interrupt);
};
@@ -129,7 +131,4 @@ public:
extern const wd17xx_interface trs80_wd17xx_interface;
-INTERRUPT_GEN( trs80_rtc_interrupt );
-INTERRUPT_GEN( trs80_fdc_interrupt );
-
#endif /* TRS80_H_ */
diff --git a/src/mess/includes/tx0.h b/src/mess/includes/tx0.h
index 076c8fbe391..60f1a637cf2 100644
--- a/src/mess/includes/tx0.h
+++ b/src/mess/includes/tx0.h
@@ -152,6 +152,7 @@ public:
virtual void palette_init();
UINT32 screen_update_tx0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_eof_tx0(screen_device &screen, bool state);
+ INTERRUPT_GEN_MEMBER(tx0_interrupt);
};
diff --git a/src/mess/includes/vc4000.h b/src/mess/includes/vc4000.h
index aab4688e0a4..5b7c4eb208e 100644
--- a/src/mess/includes/vc4000.h
+++ b/src/mess/includes/vc4000.h
@@ -97,13 +97,9 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_vc4000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(vc4000_video_line);
};
-
-/*----------- defined in video/vc4000.c -----------*/
-
-extern INTERRUPT_GEN( vc4000_video_line );
-
/*----------- defined in audio/vc4000.c -----------*/
class vc4000_sound_device : public device_t,
diff --git a/src/mess/includes/vector06.h b/src/mess/includes/vector06.h
index 3c90e638806..582fd6f3188 100644
--- a/src/mess/includes/vector06.h
+++ b/src/mess/includes/vector06.h
@@ -64,14 +64,12 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_vector06(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(vector06_interrupt);
};
/*----------- defined in machine/vector06.c -----------*/
-
extern const i8255_interface vector06_ppi8255_interface;
extern const i8255_interface vector06_ppi8255_2_interface;
-extern INTERRUPT_GEN( vector06_interrupt );
-
#endif /* VECTOR06_H_ */
diff --git a/src/mess/includes/vic10.h b/src/mess/includes/vic10.h
index 8c952d9e35a..2bdf3529775 100644
--- a/src/mess/includes/vic10.h
+++ b/src/mess/includes/vic10.h
@@ -83,6 +83,7 @@ public:
int m_cia_irq;
int m_vic_irq;
int m_exp_irq;
+ INTERRUPT_GEN_MEMBER(vic10_frame_interrupt);
};
diff --git a/src/mess/includes/vic20.h b/src/mess/includes/vic20.h
index c8d762fb058..d4009b8c236 100644
--- a/src/mess/includes/vic20.h
+++ b/src/mess/includes/vic20.h
@@ -91,6 +91,7 @@ public:
// keyboard state
int m_key_col;
+ INTERRUPT_GEN_MEMBER(vic20_raster_interrupt);
};
#endif
diff --git a/src/mess/includes/vtech2.h b/src/mess/includes/vtech2.h
index 6bb05fb6bed..b99480fca53 100644
--- a/src/mess/includes/vtech2.h
+++ b/src/mess/includes/vtech2.h
@@ -55,6 +55,7 @@ public:
DECLARE_MACHINE_RESET(laser500);
DECLARE_MACHINE_RESET(laser700);
UINT32 screen_update_laser(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(vtech2_interrupt);
};
diff --git a/src/mess/includes/x68k.h b/src/mess/includes/x68k.h
index e92ee20ee01..3b665ba601d 100644
--- a/src/mess/includes/x68k.h
+++ b/src/mess/includes/x68k.h
@@ -267,6 +267,7 @@ public:
DECLARE_VIDEO_START(x68000);
DECLARE_PALETTE_INIT(x68000);
UINT32 screen_update_x68000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(x68k_vsync_irq);
};
diff --git a/src/mess/machine/apple3.c b/src/mess/machine/apple3.c
index 4eb3919e703..8474fbf8617 100644
--- a/src/mess/machine/apple3.c
+++ b/src/mess/machine/apple3.c
@@ -246,13 +246,13 @@ WRITE8_MEMBER(apple3_state::apple3_c0xx_w)
}
}
-INTERRUPT_GEN( apple3_interrupt )
+INTERRUPT_GEN_MEMBER(apple3_state::apple3_interrupt)
{
- via6522_device *via_1 = device->machine().device<via6522_device>("via6522_1");
+ via6522_device *via_1 = machine().device<via6522_device>("via6522_1");
- via_1->write_ca2((AY3600_keydata_strobe_r(device->machine()) & 0x80) ? 1 : 0);
- via_1->write_cb1(device->machine().primary_screen->vblank());
- via_1->write_cb2(device->machine().primary_screen->vblank());
+ via_1->write_ca2((AY3600_keydata_strobe_r(machine()) & 0x80) ? 1 : 0);
+ via_1->write_cb1(machine().primary_screen->vblank());
+ via_1->write_cb2(machine().primary_screen->vblank());
}
diff --git a/src/mess/machine/b2m.c b/src/mess/machine/b2m.c
index 4af961ebacf..ce44900bd6a 100644
--- a/src/mess/machine/b2m.c
+++ b/src/mess/machine/b2m.c
@@ -357,12 +357,11 @@ const struct pic8259_interface b2m_pic8259_config =
DEVCB_NULL
};
-INTERRUPT_GEN( b2m_vblank_interrupt )
+INTERRUPT_GEN_MEMBER(b2m_state::b2m_vblank_interrupt)
{
- b2m_state *state = device->machine().driver_data<b2m_state>();
- state->m_vblank_state++;
- if (state->m_vblank_state>1) state->m_vblank_state=0;
- pic8259_ir0_w(state->m_pic, state->m_vblank_state);
+ m_vblank_state++;
+ if (m_vblank_state>1) m_vblank_state=0;
+ pic8259_ir0_w(m_pic, m_vblank_state);
}
void b2m_state::machine_reset()
diff --git a/src/mess/machine/bbc.c b/src/mess/machine/bbc.c
index 8dccb8725fc..84d30054e22 100644
--- a/src/mess/machine/bbc.c
+++ b/src/mess/machine/bbc.c
@@ -733,28 +733,27 @@ B7 - Operates the SHIFT lock LED (Pin 16 keyboard connector)
-INTERRUPT_GEN( bbcb_keyscan )
+INTERRUPT_GEN_MEMBER(bbc_state::bbcb_keyscan)
{
- bbc_state *state = device->machine().driver_data<bbc_state>();
static const char *const colnames[] = {
"COL0", "COL1", "COL2", "COL3", "COL4",
"COL5", "COL6", "COL7", "COL8", "COL9"
};
- via6522_device *via_0 = device->machine().device<via6522_device>("via6522_0");
+ via6522_device *via_0 = machine().device<via6522_device>("via6522_0");
/* only do auto scan if keyboard is not enabled */
- if (state->m_b3_keyboard == 1)
+ if (m_b3_keyboard == 1)
{
/* KBD IC1 4 bit addressable counter */
/* KBD IC3 4 to 10 line decoder */
/* keyboard not enabled so increment counter */
- state->m_column = (state->m_column + 1) % 16;
- if (state->m_column < 10)
+ m_column = (m_column + 1) % 16;
+ if (m_column < 10)
{
/* KBD IC4 8 input NAND gate */
/* set the value of via_system ca2, by checking for any keys
- being pressed on the selected state->m_column */
- if ((device->machine().root_device().ioport(colnames[state->m_column])->read() | 0x01) != 0xff)
+ being pressed on the selected m_column */
+ if ((machine().root_device().ioport(colnames[m_column])->read() | 0x01) != 0xff)
{
via_0->write_ca2(1);
}
@@ -772,30 +771,29 @@ INTERRUPT_GEN( bbcb_keyscan )
}
-INTERRUPT_GEN( bbcm_keyscan )
+INTERRUPT_GEN_MEMBER(bbc_state::bbcm_keyscan)
{
- bbc_state *state = device->machine().driver_data<bbc_state>();
static const char *const colnames[] = {
"COL0", "COL1", "COL2", "COL3", "COL4",
"COL5", "COL6", "COL7", "COL8", "COL9"
};
- via6522_device *via_0 = device->machine().device<via6522_device>("via6522_0");
+ via6522_device *via_0 = machine().device<via6522_device>("via6522_0");
/* only do auto scan if keyboard is not enabled */
- if (state->m_b3_keyboard == 1)
+ if (m_b3_keyboard == 1)
{
/* KBD IC1 4 bit addressable counter */
/* KBD IC3 4 to 10 line decoder */
/* keyboard not enabled so increment counter */
- state->m_column = (state->m_column + 1) % 16;
+ m_column = (m_column + 1) % 16;
/* this IF should be removed as soon as the dip switches (keyboard keys) are set for the master */
- if (state->m_column < 10)
+ if (m_column < 10)
{
/* KBD IC4 8 input NAND gate */
/* set the value of via_system ca2, by checking for any keys
- being pressed on the selected state->m_column */
- if ((device->machine().root_device().ioport(colnames[state->m_column])->read() | 0x01) != 0xff)
+ being pressed on the selected m_column */
+ if ((machine().root_device().ioport(colnames[m_column])->read() | 0x01) != 0xff)
{
via_0->write_ca2(1);
}
diff --git a/src/mess/machine/c128.c b/src/mess/machine/c128.c
index 3132ee108e0..2954a330a4b 100644
--- a/src/mess/machine/c128.c
+++ b/src/mess/machine/c128.c
@@ -1129,29 +1129,28 @@ void c128_state::machine_reset()
}
-INTERRUPT_GEN( c128_frame_interrupt )
+INTERRUPT_GEN_MEMBER(c128_state::c128_frame_interrupt)
{
- c128_state *state = device->machine().driver_data<c128_state>();
static const char *const c128ports[] = { "KP0", "KP1", "KP2" };
int i, value;
- //device_t *vic2e = device->machine().device("vic2e");
- //device_t *vdc8563 = device->machine().device("vdc8563");
+ //device_t *vic2e = machine().device("vic2e");
+ //device_t *vdc8563 = machine().device("vdc8563");
- state->nmi();
+ nmi();
/* common keys input ports */
- cbm_common_interrupt(device);
+ cbm_common_interrupt(&device);
/* Fix Me! Currently, neither left Shift nor Shift Lock work in c128, but reading the correspondent input produces a bug!
Hence, we overwrite the actual reading as it never happens */
- if ((device->machine().root_device().ioport("SPECIAL")->read() & 0x40)) //
+ if ((machine().root_device().ioport("SPECIAL")->read() & 0x40)) //
c64_keyline[1] |= 0x80;
/* c128 specific: keypad input ports */
for (i = 0; i < 3; i++)
{
value = 0xff;
- value &= ~device->machine().root_device().ioport(c128ports[i])->read();
- state->m_keyline[i] = value;
+ value &= ~machine().root_device().ioport(c128ports[i])->read();
+ m_keyline[i] = value;
}
}
diff --git a/src/mess/machine/c64.c b/src/mess/machine/c64.c
index f5c501111f9..67960bd3559 100644
--- a/src/mess/machine/c64.c
+++ b/src/mess/machine/c64.c
@@ -840,10 +840,10 @@ MACHINE_START( c64 )
c64_bankswitch(machine, 1);
}
-INTERRUPT_GEN( c64_frame_interrupt )
+INTERRUPT_GEN_MEMBER(legacy_c64_state::c64_frame_interrupt)
{
- c64_nmi(device->machine());
- cbm_common_interrupt(device);
+ c64_nmi(machine());
+ cbm_common_interrupt(&device);
}
diff --git a/src/mess/machine/c65.c b/src/mess/machine/c65.c
index 34f72242e02..f0dbe554eeb 100644
--- a/src/mess/machine/c65.c
+++ b/src/mess/machine/c65.c
@@ -1023,19 +1023,18 @@ MACHINE_START_MEMBER(c65_state,c65)
}
-INTERRUPT_GEN( c65_frame_interrupt )
+INTERRUPT_GEN_MEMBER(c65_state::c65_frame_interrupt)
{
- c65_state *state = device->machine().driver_data<c65_state>();
int value;
- c65_nmi(device->machine());
+ c65_nmi(machine());
/* common keys input ports */
- cbm_common_interrupt(device);
+ cbm_common_interrupt(&device);
/* c65 specific: function keys input ports */
value = 0xff;
- value &= ~state->ioport("FUNCT")->read();
- state->m_keyline = value;
+ value &= ~ioport("FUNCT")->read();
+ m_keyline = value;
}
diff --git a/src/mess/machine/cgenie.c b/src/mess/machine/cgenie.c
index a4e2712a9f4..23f70a7e1f3 100644
--- a/src/mess/machine/cgenie.c
+++ b/src/mess/machine/cgenie.c
@@ -411,13 +411,12 @@ int result = state->m_irq_status;
return result;
}
-INTERRUPT_GEN( cgenie_timer_interrupt )
+INTERRUPT_GEN_MEMBER(cgenie_state::cgenie_timer_interrupt)
{
- cgenie_state *state = device->machine().driver_data<cgenie_state>();
- if( (state->m_irq_status & IRQ_TIMER) == 0 )
+ if( (m_irq_status & IRQ_TIMER) == 0 )
{
- state->m_irq_status |= IRQ_TIMER;
- device->machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
+ m_irq_status |= IRQ_TIMER;
+ machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
}
}
@@ -591,15 +590,14 @@ WRITE8_HANDLER( cgenie_fontram_w )
*
*************************************/
-INTERRUPT_GEN( cgenie_frame_interrupt )
+INTERRUPT_GEN_MEMBER(cgenie_state::cgenie_frame_interrupt)
{
- cgenie_state *state = device->machine().driver_data<cgenie_state>();
- if( state->m_tv_mode != (device->machine().root_device().ioport("DSW0")->read() & 0x10) )
+ if( m_tv_mode != (machine().root_device().ioport("DSW0")->read() & 0x10) )
{
- state->m_tv_mode = state->ioport("DSW0")->read() & 0x10;
+ m_tv_mode = ioport("DSW0")->read() & 0x10;
/* force setting of background color */
- state->m_port_ff ^= FF_BGD0;
- cgenie_port_ff_w(*device->machine().device("maincpu")->memory().space(AS_PROGRAM), 0, state->m_port_ff ^ FF_BGD0);
+ m_port_ff ^= FF_BGD0;
+ cgenie_port_ff_w(*machine().device("maincpu")->memory().space(AS_PROGRAM), 0, m_port_ff ^ FF_BGD0);
}
}
diff --git a/src/mess/machine/compis.c b/src/mess/machine/compis.c
index 697fa583b6b..c10b7142767 100644
--- a/src/mess/machine/compis.c
+++ b/src/mess/machine/compis.c
@@ -1395,8 +1395,8 @@ void compis_state::machine_reset()
/* Name: compis */
/* Desc: Interrupt - Vertical Blanking Interrupt */
/*-------------------------------------------------------------------------*/
-INTERRUPT_GEN( compis_vblank_int )
+INTERRUPT_GEN_MEMBER(compis_state::compis_vblank_int)
{
// compis_gdc_vblank_int();
- compis_keyb_update(device->machine());
+ compis_keyb_update(machine());
}
diff --git a/src/mess/machine/concept.c b/src/mess/machine/concept.c
index f7c5596b619..136c911542f 100644
--- a/src/mess/machine/concept.c
+++ b/src/mess/machine/concept.c
@@ -182,9 +182,9 @@ static void poll_keyboard(running_machine &machine)
}
}
-INTERRUPT_GEN( concept_interrupt )
+INTERRUPT_GEN_MEMBER(concept_state::concept_interrupt)
{
- poll_keyboard(device->machine());
+ poll_keyboard(machine());
}
/*
diff --git a/src/mess/machine/galaxy.c b/src/mess/machine/galaxy.c
index 937985f41c7..2d10cca9b64 100644
--- a/src/mess/machine/galaxy.c
+++ b/src/mess/machine/galaxy.c
@@ -45,9 +45,9 @@ WRITE8_MEMBER(galaxy_state::galaxy_latch_w)
Interrupts
***************************************************************************/
-INTERRUPT_GEN( galaxy_interrupt )
+INTERRUPT_GEN_MEMBER(galaxy_state::galaxy_interrupt)
{
- device->execute().set_input_line(0, HOLD_LINE);
+ device.execute().set_input_line(0, HOLD_LINE);
}
static IRQ_CALLBACK ( galaxy_irq_callback )
diff --git a/src/mess/machine/gb.c b/src/mess/machine/gb.c
index 2c4b9fa4a56..f1726f1e953 100644
--- a/src/mess/machine/gb.c
+++ b/src/mess/machine/gb.c
@@ -1892,7 +1892,7 @@ DEVICE_IMAGE_LOAD(gb_cart)
return IMAGE_INIT_PASS;
}
-INTERRUPT_GEN( gb_scanline_interrupt )
+INTERRUPT_GEN_MEMBER(gb_state::gb_scanline_interrupt)
{
}
diff --git a/src/mess/machine/intv.c b/src/mess/machine/intv.c
index a9bccab0fba..f92d2fa0995 100644
--- a/src/mess/machine/intv.c
+++ b/src/mess/machine/intv.c
@@ -671,29 +671,28 @@ static TIMER_CALLBACK(intv_btb_fill)
state->m_backtab_row += 1;
}
-INTERRUPT_GEN( intv_interrupt )
+INTERRUPT_GEN_MEMBER(intv_state::intv_interrupt)
{
- intv_state *state = device->machine().driver_data<intv_state>();
- device->machine().device("maincpu")->execute().set_input_line(CP1610_INT_INTRM, ASSERT_LINE);
- state->m_sr1_int_pending = 1;
- state->m_bus_copy_mode = 1;
- state->m_backtab_row = 0;
+ machine().device("maincpu")->execute().set_input_line(CP1610_INT_INTRM, ASSERT_LINE);
+ m_sr1_int_pending = 1;
+ m_bus_copy_mode = 1;
+ m_backtab_row = 0;
UINT8 row;
- device->machine().device("maincpu")->execute().adjust_icount(-(12*STIC_ROW_BUSRQ+STIC_FRAME_BUSRQ)); // Account for stic cycle stealing
- device->machine().scheduler().timer_set(device->machine().device<cpu_device>("maincpu")
+ machine().device("maincpu")->execute().adjust_icount(-(12*STIC_ROW_BUSRQ+STIC_FRAME_BUSRQ)); // Account for stic cycle stealing
+ machine().scheduler().timer_set(machine().device<cpu_device>("maincpu")
->cycles_to_attotime(STIC_VBLANK_END), FUNC(intv_interrupt_complete));
for (row=0; row < STIC_BACKTAB_HEIGHT; row++)
{
- device->machine().scheduler().timer_set(device->machine().device<cpu_device>("maincpu")
- ->cycles_to_attotime(STIC_FIRST_FETCH-STIC_FRAME_BUSRQ+STIC_CYCLES_PER_SCANLINE*STIC_Y_SCALE*state->m_row_delay + (STIC_CYCLES_PER_SCANLINE*STIC_Y_SCALE*STIC_CARD_HEIGHT - STIC_ROW_BUSRQ)*row), FUNC(intv_btb_fill));
+ machine().scheduler().timer_set(machine().device<cpu_device>("maincpu")
+ ->cycles_to_attotime(STIC_FIRST_FETCH-STIC_FRAME_BUSRQ+STIC_CYCLES_PER_SCANLINE*STIC_Y_SCALE*m_row_delay + (STIC_CYCLES_PER_SCANLINE*STIC_Y_SCALE*STIC_CARD_HEIGHT - STIC_ROW_BUSRQ)*row), FUNC(intv_btb_fill));
}
- if (state->m_row_delay == 0)
+ if (m_row_delay == 0)
{
- device->machine().device("maincpu")->execute().adjust_icount(-STIC_ROW_BUSRQ); // extra row fetch occurs if vertical delay == 0
+ machine().device("maincpu")->execute().adjust_icount(-STIC_ROW_BUSRQ); // extra row fetch occurs if vertical delay == 0
}
- intv_stic_screenrefresh(device->machine());
+ intv_stic_screenrefresh(machine());
}
/* hand 0 == left, 1 == right, 2 == ECS hand controller 1, 3 == ECS hand controller 2 */
diff --git a/src/mess/machine/kay_kbd.c b/src/mess/machine/kay_kbd.c
index 7ac43f62248..03012f49811 100644
--- a/src/mess/machine/kay_kbd.c
+++ b/src/mess/machine/kay_kbd.c
@@ -302,10 +302,9 @@ MACHINE_RESET_MEMBER(kaypro_state,kay_kbd)
* also drives keyboard LEDs and
* and handles autorepeating keys
******************************************************/
-INTERRUPT_GEN( kay_kbd_interrupt )
+INTERRUPT_GEN_MEMBER(kaypro_state::kay_kbd_interrupt)
{
- kaypro_state *state = device->machine().driver_data<kaypro_state>();
- kay_kbd_t *kbd = state->m_kbd;
+ kay_kbd_t *kbd = m_kbd;
int mod, row, col, chg, newval;
UINT8 *keyrows = kbd->keyrows;
@@ -321,18 +320,18 @@ INTERRUPT_GEN( kay_kbd_interrupt )
}
row = 9;
- newval = device->machine().root_device().ioport("ROW9")->read();
+ newval = machine().root_device().ioport("ROW9")->read();
chg = keyrows[row] ^ newval;
- if (!chg) { newval = device->machine().root_device().ioport("ROW8")->read(); chg = keyrows[--row] ^ newval; }
- if (!chg) { newval = device->machine().root_device().ioport("ROW7")->read(); chg = keyrows[--row] ^ newval; }
- if (!chg) { newval = device->machine().root_device().ioport("ROW6")->read(); chg = keyrows[--row] ^ newval; }
- if (!chg) { newval = device->machine().root_device().ioport("ROW5")->read(); chg = keyrows[--row] ^ newval; }
- if (!chg) { newval = device->machine().root_device().ioport("ROW4")->read(); chg = keyrows[--row] ^ newval; }
- if (!chg) { newval = device->machine().root_device().ioport("ROW3")->read(); chg = keyrows[--row] ^ newval; }
- if (!chg) { newval = device->machine().root_device().ioport("ROW2")->read(); chg = keyrows[--row] ^ newval; }
- if (!chg) { newval = device->machine().root_device().ioport("ROW1")->read(); chg = keyrows[--row] ^ newval; }
- if (!chg) { newval = device->machine().root_device().ioport("ROW0")->read(); chg = keyrows[--row] ^ newval; }
+ if (!chg) { newval = machine().root_device().ioport("ROW8")->read(); chg = keyrows[--row] ^ newval; }
+ if (!chg) { newval = machine().root_device().ioport("ROW7")->read(); chg = keyrows[--row] ^ newval; }
+ if (!chg) { newval = machine().root_device().ioport("ROW6")->read(); chg = keyrows[--row] ^ newval; }
+ if (!chg) { newval = machine().root_device().ioport("ROW5")->read(); chg = keyrows[--row] ^ newval; }
+ if (!chg) { newval = machine().root_device().ioport("ROW4")->read(); chg = keyrows[--row] ^ newval; }
+ if (!chg) { newval = machine().root_device().ioport("ROW3")->read(); chg = keyrows[--row] ^ newval; }
+ if (!chg) { newval = machine().root_device().ioport("ROW2")->read(); chg = keyrows[--row] ^ newval; }
+ if (!chg) { newval = machine().root_device().ioport("ROW1")->read(); chg = keyrows[--row] ^ newval; }
+ if (!chg) { newval = machine().root_device().ioport("ROW0")->read(); chg = keyrows[--row] ^ newval; }
if (!chg) --row;
if (row >= 0)
@@ -343,7 +342,7 @@ INTERRUPT_GEN( kay_kbd_interrupt )
kbd->lastrow = row;
/* CapsLock LED */
if( row == 3 && chg == 0x80 )
- set_led_status(device->machine(), 1, (kbd->keyrows[3] & 0x80) ? 0 : 1);
+ set_led_status(machine(), 1, (kbd->keyrows[3] & 0x80) ? 0 : 1);
if (newval & chg) /* key(s) pressed ? */
{
@@ -376,11 +375,11 @@ INTERRUPT_GEN( kay_kbd_interrupt )
if( kbd->key ) /* normal key */
{
kbd->repeater = 30;
- kay_kbd_in(device->machine(), kbd->key);
+ kay_kbd_in(machine(), kbd->key);
}
else
if( (row == 0) && (chg == 0x04) ) /* Ctrl-@ (NUL) */
- kay_kbd_in(device->machine(), 0);
+ kay_kbd_in(machine(), 0);
keyrows[row] |= newval;
}
else
@@ -391,7 +390,7 @@ INTERRUPT_GEN( kay_kbd_interrupt )
}
else if ( kbd->key && (keyrows[kbd->lastrow] & kbd->mask) && kbd->repeat == 0 )
{
- kay_kbd_in(device->machine(), kbd->key);
+ kay_kbd_in(machine(), kbd->key);
}
}
diff --git a/src/mess/machine/lisa.c b/src/mess/machine/lisa.c
index 9eff06bf05c..d3fb575cc94 100644
--- a/src/mess/machine/lisa.c
+++ b/src/mess/machine/lisa.c
@@ -1086,22 +1086,21 @@ void lisa_state::machine_reset()
machine().device("maincpu")->reset();
}
-INTERRUPT_GEN( lisa_interrupt )
+INTERRUPT_GEN_MEMBER(lisa_state::lisa_interrupt)
{
- lisa_state *state = device->machine().driver_data<lisa_state>();
- if ((++state->m_frame_count) == 6)
+ if ((++m_frame_count) == 6)
{ /* increment clock every 1/10s */
- state->m_frame_count = 0;
+ m_frame_count = 0;
- if (state->m_clock_regs.clock_mode != clock_timer_disable)
+ if (m_clock_regs.clock_mode != clock_timer_disable)
{
- if ((++state->m_clock_regs.tenths) == 10)
+ if ((++m_clock_regs.tenths) == 10)
{
- state->m_clock_regs.tenths = 0;
+ m_clock_regs.tenths = 0;
- if (state->m_clock_regs.clock_mode != timer_disable)
+ if (m_clock_regs.clock_mode != timer_disable)
{
- if (state->m_clock_regs.alarm == 0)
+ if (m_clock_regs.alarm == 0)
{
/* generate reset (should cause a VIA interrupt...) */
static const UINT8 cmd[2] =
@@ -1109,61 +1108,61 @@ INTERRUPT_GEN( lisa_interrupt )
0x80, /* RESET code */
0xFC /* timer time-out */
};
- COPS_queue_data(device->machine(), cmd, 2);
+ COPS_queue_data(machine(), cmd, 2);
- state->m_clock_regs.alarm = 0xfffffL;
+ m_clock_regs.alarm = 0xfffffL;
}
else
{
- state->m_clock_regs.alarm--;
+ m_clock_regs.alarm--;
}
}
- if ((++state->m_clock_regs.seconds2) == 10)
+ if ((++m_clock_regs.seconds2) == 10)
{
- state->m_clock_regs.seconds2 = 0;
+ m_clock_regs.seconds2 = 0;
- if ((++state->m_clock_regs.seconds1) == 6)
+ if ((++m_clock_regs.seconds1) == 6)
{
- state->m_clock_regs.seconds1 = 0;
+ m_clock_regs.seconds1 = 0;
- if ((++state->m_clock_regs.minutes2) == 10)
+ if ((++m_clock_regs.minutes2) == 10)
{
- state->m_clock_regs.minutes2 = 0;
+ m_clock_regs.minutes2 = 0;
- if ((++state->m_clock_regs.minutes1) == 6)
+ if ((++m_clock_regs.minutes1) == 6)
{
- state->m_clock_regs.minutes1 = 0;
+ m_clock_regs.minutes1 = 0;
- if ((++state->m_clock_regs.hours2) == 10)
+ if ((++m_clock_regs.hours2) == 10)
{
- state->m_clock_regs.hours2 = 0;
+ m_clock_regs.hours2 = 0;
- state->m_clock_regs.hours1++;
+ m_clock_regs.hours1++;
}
- if ((state->m_clock_regs.hours1*10 + state->m_clock_regs.hours2) == 24)
+ if ((m_clock_regs.hours1*10 + m_clock_regs.hours2) == 24)
{
- state->m_clock_regs.hours1 = state->m_clock_regs.hours2 = 0;
+ m_clock_regs.hours1 = m_clock_regs.hours2 = 0;
- if ((++state->m_clock_regs.days3) == 10)
+ if ((++m_clock_regs.days3) == 10)
{
- state->m_clock_regs.days3 = 0;
+ m_clock_regs.days3 = 0;
- if ((++state->m_clock_regs.days2) == 10)
+ if ((++m_clock_regs.days2) == 10)
{
- state->m_clock_regs.days2 = 0;
+ m_clock_regs.days2 = 0;
- state->m_clock_regs.days1++;
+ m_clock_regs.days1++;
}
}
- if ((state->m_clock_regs.days1*100 + state->m_clock_regs.days2*10 + state->m_clock_regs.days3) ==
- ((state->m_clock_regs.years % 4) ? 366 : 367))
+ if ((m_clock_regs.days1*100 + m_clock_regs.days2*10 + m_clock_regs.days3) ==
+ ((m_clock_regs.years % 4) ? 366 : 367))
{
- state->m_clock_regs.days1 = state->m_clock_regs.days2 = state->m_clock_regs.days3 = 0;
+ m_clock_regs.days1 = m_clock_regs.days2 = m_clock_regs.days3 = 0;
- state->m_clock_regs.years = (state->m_clock_regs.years + 1) & 0xf;
+ m_clock_regs.years = (m_clock_regs.years + 1) & 0xf;
}
}
}
@@ -1175,13 +1174,13 @@ INTERRUPT_GEN( lisa_interrupt )
}
/* set VBI */
- if (state->m_VTMSK)
- set_VTIR(device->machine(), 1);
+ if (m_VTMSK)
+ set_VTIR(machine(), 1);
else
- set_VTIR(device->machine(), 0);
+ set_VTIR(machine(), 0);
/* do keyboard scan */
- scan_keyboard(device->machine());
+ scan_keyboard(machine());
}
/*
diff --git a/src/mess/machine/mbee.c b/src/mess/machine/mbee.c
index f3d3f6dbd9e..44d3d161edf 100644
--- a/src/mess/machine/mbee.c
+++ b/src/mess/machine/mbee.c
@@ -559,25 +559,24 @@ MACHINE_RESET_MEMBER(mbee_state,mbeett)
machine().scheduler().timer_set(attotime::from_usec(4), FUNC(mbee_reset));
}
-INTERRUPT_GEN( mbee_interrupt )
+INTERRUPT_GEN_MEMBER(mbee_state::mbee_interrupt)
{
// Due to the uncertainly and hackage here, this is commented out for now - Robbbert - 05-Oct-2010
#if 0
- mbee_state *state = device->machine().driver_data<mbee_state>();
- //address_space &space = *device->machine().device("maincpu")->memory().space(AS_PROGRAM);
+ //address_space &space = *machine().device("maincpu")->memory().space(AS_PROGRAM);
/* The printer status connects to the pio ASTB pin, and the printer changing to not
busy should signal an interrupt routine at B61C, (next line) but this doesn't work.
The line below does what the interrupt should be doing. */
/* But it would break any program loaded to that area of memory, such as CP/M programs */
- //state->m_z80pio->strobe_a(centronics_busy_r(state->m_printer)); /* signal int when not busy (L->H) */
- //space.write_byte(0x109, centronics_busy_r(state->m_printer));
+ //m_z80pio->strobe_a(centronics_busy_r(m_printer)); /* signal int when not busy (L->H) */
+ //space.write_byte(0x109, centronics_busy_r(m_printer));
/* once per frame, pulse the PIO B bit 7 - it is in the schematic as an option,
but need to find out what it does */
- state->m_clock_pulse = 0x80;
+ m_clock_pulse = 0x80;
irq0_line_hold(device);
#endif
diff --git a/src/mess/machine/microtan.c b/src/mess/machine/microtan.c
index 4d2c7927e47..7bcb842405a 100644
--- a/src/mess/machine/microtan.c
+++ b/src/mess/machine/microtan.c
@@ -421,93 +421,92 @@ static void store_key(running_machine &machine, int key)
microtan_set_irq_line(machine);
}
-INTERRUPT_GEN( microtan_interrupt )
+INTERRUPT_GEN_MEMBER(microtan_state::microtan_interrupt)
{
- microtan_state *state = device->machine().driver_data<microtan_state>();
int mod, row, col, chg, newvar;
static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROW8" };
- if( state->m_repeat )
+ if( m_repeat )
{
- if( !--state->m_repeat )
- state->m_repeater = 4;
+ if( !--m_repeat )
+ m_repeater = 4;
}
- else if( state->m_repeater )
+ else if( m_repeater )
{
- state->m_repeat = state->m_repeater;
+ m_repeat = m_repeater;
}
row = 9;
- newvar = device->machine().root_device().ioport("ROW8")->read();
- chg = state->m_keyrows[--row] ^ newvar;
+ newvar = machine().root_device().ioport("ROW8")->read();
+ chg = m_keyrows[--row] ^ newvar;
while ( !chg && row > 0)
{
- newvar = device->machine().root_device().ioport(keynames[row - 1])->read();
- chg = state->m_keyrows[--row] ^ newvar;
+ newvar = machine().root_device().ioport(keynames[row - 1])->read();
+ chg = m_keyrows[--row] ^ newvar;
}
if (!chg)
--row;
if (row >= 0)
{
- state->m_repeater = 0x00;
- state->m_mask = 0x00;
- state->m_key = 0x00;
- state->m_lastrow = row;
+ m_repeater = 0x00;
+ m_mask = 0x00;
+ m_key = 0x00;
+ m_lastrow = row;
/* CapsLock LED */
if( row == 3 && chg == 0x80 )
- set_led_status(device->machine(), 1, (state->m_keyrows[3] & 0x80) ? 0 : 1);
+ set_led_status(machine(), 1, (m_keyrows[3] & 0x80) ? 0 : 1);
if (newvar & chg) /* key(s) pressed ? */
{
mod = 0;
/* Shift modifier */
- if ( (state->m_keyrows[5] & 0x10) || (state->m_keyrows[6] & 0x80) )
+ if ( (m_keyrows[5] & 0x10) || (m_keyrows[6] & 0x80) )
mod |= 1;
/* Control modifier */
- if (state->m_keyrows[3] & 0x40)
+ if (m_keyrows[3] & 0x40)
mod |= 2;
/* CapsLock modifier */
- if (state->m_keyrows[3] & 0x80)
+ if (m_keyrows[3] & 0x80)
mod |= 4;
/* find newvar key */
- state->m_mask = 0x01;
+ m_mask = 0x01;
for (col = 0; col < 8; col ++)
{
- if (chg & state->m_mask)
+ if (chg & m_mask)
{
- newvar &= state->m_mask;
- state->m_key = keyboard[mod][row][col];
+ newvar &= m_mask;
+ m_key = keyboard[mod][row][col];
break;
}
- state->m_mask <<= 1;
+ m_mask <<= 1;
}
- if( state->m_key ) /* normal key */
+ if( m_key ) /* normal key */
{
- state->m_repeater = 30;
- store_key(device->machine(), state->m_key);
+ m_repeater = 30;
+ store_key(machine(), m_key);
}
else
if( (row == 0) && (chg == 0x04) ) /* Ctrl-@ (NUL) */
- store_key(device->machine(), 0);
- state->m_keyrows[row] |= newvar;
+ store_key(machine(), 0);
+ m_keyrows[row] |= newvar;
}
else
{
- state->m_keyrows[row] = newvar;
+ m_keyrows[row] = newvar;
}
- state->m_repeat = state->m_repeater;
+ m_repeat = m_repeater;
}
else
- if ( state->m_key && (state->m_keyrows[state->m_lastrow] & state->m_mask) && state->m_repeat == 0 )
+ if ( m_key && (m_keyrows[m_lastrow] & m_mask) && m_repeat == 0 )
{
- store_key(device->machine(), state->m_key);
+ store_key(machine(), m_key);
}
}
diff --git a/src/mess/machine/msx.c b/src/mess/machine/msx.c
index 6e20a08e1b0..245974869c1 100644
--- a/src/mess/machine/msx.c
+++ b/src/mess/machine/msx.c
@@ -532,15 +532,14 @@ TIMER_DEVICE_CALLBACK( msx2_interrupt )
state->m_v9938->interrupt();
}
-INTERRUPT_GEN( msx_interrupt )
+INTERRUPT_GEN_MEMBER(msx_state::msx_interrupt)
{
- msx_state *state = device->machine().driver_data<msx_state>();
int i;
for (i=0; i<2; i++)
{
- state->m_mouse[i] = state->ioport(i ? "MOUSE1" : "MOUSE0")->read();
- state->m_mouse_stat[i] = -1;
+ m_mouse[i] = ioport(i ? "MOUSE1" : "MOUSE0")->read();
+ m_mouse_stat[i] = -1;
}
}
diff --git a/src/mess/machine/orion.c b/src/mess/machine/orion.c
index e1f8665a9b8..fa5c29a7042 100644
--- a/src/mess/machine/orion.c
+++ b/src/mess/machine/orion.c
@@ -365,12 +365,11 @@ MACHINE_RESET_MEMBER(orion_state,orionz80)
radio86_init_keyboard(machine());
}
-INTERRUPT_GEN( orionz80_interrupt )
+INTERRUPT_GEN_MEMBER(orion_state::orionz80_interrupt)
{
- orion_state *state = device->machine().driver_data<orion_state>();
- if ((state->m_orionz80_dispatcher & 0x40)==0x40)
+ if ((m_orionz80_dispatcher & 0x40)==0x40)
{
- device->execute().set_input_line(0, HOLD_LINE);
+ device.execute().set_input_line(0, HOLD_LINE);
}
}
diff --git a/src/mess/machine/pet.c b/src/mess/machine/pet.c
index 7e98c66d549..8ae44a13bc0 100644
--- a/src/mess/machine/pet.c
+++ b/src/mess/machine/pet.c
@@ -762,26 +762,25 @@ void pet_state::machine_reset()
}
-INTERRUPT_GEN( pet_frame_interrupt )
+INTERRUPT_GEN_MEMBER(pet_state::pet_frame_interrupt)
{
- pet_state *state = device->machine().driver_data<pet_state>();
- if (state->m_superpet)
+ if (m_superpet)
{
- if (state->ioport("CFG")->read() & 0x04)
+ if (ioport("CFG")->read() & 0x04)
{
- device->execute().set_input_line(INPUT_LINE_HALT, 1);
- device->execute().set_input_line(INPUT_LINE_HALT, 0);
- state->m_font |= 2;
+ device.execute().set_input_line(INPUT_LINE_HALT, 1);
+ device.execute().set_input_line(INPUT_LINE_HALT, 0);
+ m_font |= 2;
}
else
{
- device->execute().set_input_line(INPUT_LINE_HALT, 0);
- device->execute().set_input_line(INPUT_LINE_HALT, 1);
- state->m_font &= ~2;
+ device.execute().set_input_line(INPUT_LINE_HALT, 0);
+ device.execute().set_input_line(INPUT_LINE_HALT, 1);
+ m_font &= ~2;
}
}
- set_led_status (device->machine(),1, device->machine().root_device().ioport("SPECIAL")->read() & 0x80 ? 1 : 0); /* Shift Lock */
+ set_led_status (machine(),1, machine().root_device().ioport("SPECIAL")->read() & 0x80 ? 1 : 0); /* Shift Lock */
}
diff --git a/src/mess/machine/pk8020.c b/src/mess/machine/pk8020.c
index 97f24d1a25e..8e5e2b2a831 100644
--- a/src/mess/machine/pk8020.c
+++ b/src/mess/machine/pk8020.c
@@ -1003,9 +1003,8 @@ void pk8020_state::machine_reset()
m_sound_level = 0;
}
-INTERRUPT_GEN( pk8020_interrupt )
+INTERRUPT_GEN_MEMBER(pk8020_state::pk8020_interrupt)
{
- pk8020_state *state = device->machine().driver_data<pk8020_state>();
- state->m_takt ^= 1;
- pic8259_ir4_w(device->machine().device("pic8259"), 1);
+ m_takt ^= 1;
+ pic8259_ir4_w(machine().device("pic8259"), 1);
}
diff --git a/src/mess/machine/poly88.c b/src/mess/machine/poly88.c
index 30533997c0d..a3ff4edc47b 100644
--- a/src/mess/machine/poly88.c
+++ b/src/mess/machine/poly88.c
@@ -216,11 +216,10 @@ void poly88_state::machine_reset()
machine().scheduler().timer_set(attotime::zero, FUNC(setup_machine_state));
}
-INTERRUPT_GEN( poly88_interrupt )
+INTERRUPT_GEN_MEMBER(poly88_state::poly88_interrupt)
{
- poly88_state *state = device->machine().driver_data<poly88_state>();
- state->m_int_vector = 0xf7;
- device->execute().set_input_line(0, HOLD_LINE);
+ m_int_vector = 0xf7;
+ device.execute().set_input_line(0, HOLD_LINE);
}
static WRITE_LINE_DEVICE_HANDLER( poly88_usart_rxready )
diff --git a/src/mess/machine/primo.c b/src/mess/machine/primo.c
index f30cd7011c5..2ddbc1492df 100644
--- a/src/mess/machine/primo.c
+++ b/src/mess/machine/primo.c
@@ -31,11 +31,10 @@
*******************************************************************************/
-INTERRUPT_GEN( primo_vblank_interrupt )
+INTERRUPT_GEN_MEMBER(primo_state::primo_vblank_interrupt)
{
- primo_state *state = device->machine().driver_data<primo_state>();
- if (state->m_nmi)
- device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+ if (m_nmi)
+ device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/*******************************************************************************
diff --git a/src/mess/machine/trs80.c b/src/mess/machine/trs80.c
index 01232da6a84..7eb2d39d2ae 100644
--- a/src/mess/machine/trs80.c
+++ b/src/mess/machine/trs80.c
@@ -624,25 +624,24 @@ WRITE8_MEMBER( trs80_state::trs80m4_ff_w )
*
*************************************/
-INTERRUPT_GEN( trs80_rtc_interrupt )
+INTERRUPT_GEN_MEMBER(trs80_state::trs80_rtc_interrupt)
{
- trs80_state *state = device->machine().driver_data<trs80_state>();
/* This enables the processing of interrupts for the clock and the flashing cursor.
The OS counts one tick for each interrupt. The Model I has 40 ticks per
second, while the Model III/4 has 30. */
- if (state->m_model4) // Model 4
+ if (m_model4) // Model 4
{
- if (state->m_mask & IRQ_M4_RTC)
+ if (m_mask & IRQ_M4_RTC)
{
- state->m_irq |= IRQ_M4_RTC;
- device->execute().set_input_line(0, HOLD_LINE);
+ m_irq |= IRQ_M4_RTC;
+ device.execute().set_input_line(0, HOLD_LINE);
}
}
else // Model 1
{
- state->m_irq |= IRQ_M1_RTC;
- device->execute().set_input_line(0, HOLD_LINE);
+ m_irq |= IRQ_M1_RTC;
+ device.execute().set_input_line(0, HOLD_LINE);
}
}
@@ -664,9 +663,9 @@ static void trs80_fdc_interrupt_internal(running_machine &machine)
}
}
-INTERRUPT_GEN( trs80_fdc_interrupt ) /* not used - should it be? */
+INTERRUPT_GEN_MEMBER(trs80_state::trs80_fdc_interrupt)/* not used - should it be? */
{
- trs80_fdc_interrupt_internal(device->machine());
+ trs80_fdc_interrupt_internal(machine());
}
static WRITE_LINE_DEVICE_HANDLER( trs80_fdc_intrq_w )
diff --git a/src/mess/machine/vector06.c b/src/mess/machine/vector06.c
index 394ae4d8b77..1fd85af2153 100644
--- a/src/mess/machine/vector06.c
+++ b/src/mess/machine/vector06.c
@@ -122,12 +122,11 @@ WRITE8_MEMBER( vector06_state::vector06_8255_2_w )
m_ppi2->write(space, offset^3, data);
}
-INTERRUPT_GEN( vector06_interrupt )
+INTERRUPT_GEN_MEMBER(vector06_state::vector06_interrupt)
{
- vector06_state *state = device->machine().driver_data<vector06_state>();
- state->m_vblank_state++;
- if (state->m_vblank_state>1) state->m_vblank_state=0;
- device->execute().set_input_line(0,state->m_vblank_state ? HOLD_LINE : CLEAR_LINE);
+ m_vblank_state++;
+ if (m_vblank_state>1) m_vblank_state=0;
+ device.execute().set_input_line(0,m_vblank_state ? HOLD_LINE : CLEAR_LINE);
}
diff --git a/src/mess/video/arcadia.c b/src/mess/video/arcadia.c
index b7ccdb6a4e5..663bb5e8a9d 100644
--- a/src/mess/video/arcadia.c
+++ b/src/mess/video/arcadia.c
@@ -613,59 +613,58 @@ static void arcadia_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap)
if (arcadia_sprite_collision(state,2,3)) state->m_reg.d.collision_sprite&=~0x20; //guess
}
-INTERRUPT_GEN( arcadia_video_line )
+INTERRUPT_GEN_MEMBER(arcadia_state::arcadia_video_line)
{
- arcadia_state *state = device->machine().driver_data<arcadia_state>();
- screen_device *screen = device->machine().first_screen();
+ screen_device *screen = machine().first_screen();
int width = screen->width();
- if (state->m_ad_delay<=0)
- state->m_ad_select=state->m_reg.d.pal[1]&0x40;
- else state->m_ad_delay--;
+ if (m_ad_delay<=0)
+ m_ad_select=m_reg.d.pal[1]&0x40;
+ else m_ad_delay--;
- state->m_line++;
- state->m_line%=262;
+ m_line++;
+ m_line%=262;
// unbelievable, reflects only charline, but alien invaders uses it for
// alien scrolling
- if (state->m_line<state->m_ypos)
+ if (m_line<m_ypos)
{
- state->m_bitmap->plot_box(0, state->m_line, width, 1, (state->m_reg.d.pal[1])&7);
- memset(state->m_bg[state->m_line], 0, sizeof(state->m_bg[0]));
+ m_bitmap->plot_box(0, m_line, width, 1, (m_reg.d.pal[1])&7);
+ memset(m_bg[m_line], 0, sizeof(m_bg[0]));
}
else
{
- int h=state->m_doublescan?16:8;
+ int h=m_doublescan?16:8;
- state->m_charline=(state->m_line-state->m_ypos)/h;
+ m_charline=(m_line-m_ypos)/h;
- if (state->m_charline<13)
+ if (m_charline<13)
{
- if (((state->m_line-state->m_ypos)&(h-1))==0)
+ if (((m_line-m_ypos)&(h-1))==0)
{
- arcadia_vh_draw_line(device->machine(), *state->m_bitmap, state->m_charline*h+state->m_ypos,
- state->m_reg.d.chars1[state->m_charline]);
+ arcadia_vh_draw_line(machine(), *m_bitmap, m_charline*h+m_ypos,
+ m_reg.d.chars1[m_charline]);
}
}
else
- if (state->m_lines26 && (state->m_charline<26))
+ if (m_lines26 && (m_charline<26))
{
- if (((state->m_line-state->m_ypos)&(h-1))==0)
+ if (((m_line-m_ypos)&(h-1))==0)
{
- arcadia_vh_draw_line(device->machine(), *state->m_bitmap, state->m_charline*h+state->m_ypos,
- state->m_reg.d.chars2[state->m_charline-13]);
+ arcadia_vh_draw_line(machine(), *m_bitmap, m_charline*h+m_ypos,
+ m_reg.d.chars2[m_charline-13]);
}
- state->m_charline-=13;
+ m_charline-=13;
}
else
{
- state->m_charline=0xd;
- state->m_bitmap->plot_box(0, state->m_line, width, 1, (state->m_reg.d.pal[1])&7);
- memset(state->m_bg[state->m_line], 0, sizeof(state->m_bg[0]));
+ m_charline=0xd;
+ m_bitmap->plot_box(0, m_line, width, 1, (m_reg.d.pal[1])&7);
+ memset(m_bg[m_line], 0, sizeof(m_bg[0]));
}
}
- if (state->m_line==261)
- arcadia_draw_sprites(device->machine(), *state->m_bitmap);
+ if (m_line==261)
+ arcadia_draw_sprites(machine(), *m_bitmap);
}
READ8_MEMBER( arcadia_state::arcadia_vsync_r )
diff --git a/src/mess/video/fmtowns.c b/src/mess/video/fmtowns.c
index 361efeb146c..185541080c6 100644
--- a/src/mess/video/fmtowns.c
+++ b/src/mess/video/fmtowns.c
@@ -1787,18 +1787,17 @@ static TIMER_CALLBACK( towns_vblank_end )
state->m_video.towns_vblank_flag = 0;
}
-INTERRUPT_GEN( towns_vsync_irq )
+INTERRUPT_GEN_MEMBER(towns_state::towns_vsync_irq)
{
- towns_state* state = device->machine().driver_data<towns_state>();
- device_t* dev = state->m_pic_slave;
+ device_t* dev = m_pic_slave;
pic8259_ir3_w(dev, 1); // IRQ11 = VSync
if(IRQ_LOG) logerror("PIC: IRQ11 (VSync) set high\n");
- state->m_video.towns_vblank_flag = 1;
- device->machine().scheduler().timer_set(device->machine().primary_screen->time_until_vblank_end(), FUNC(towns_vblank_end), 0, (void*)dev);
- if(state->m_video.towns_tvram_enable)
+ m_video.towns_vblank_flag = 1;
+ machine().scheduler().timer_set(machine().primary_screen->time_until_vblank_end(), FUNC(towns_vblank_end), 0, (void*)dev);
+ if(m_video.towns_tvram_enable)
draw_text_layer(dev->machine());
- if(state->m_video.towns_sprite_reg[1] & 0x80)
- draw_sprites(dev->machine(),&state->m_video.towns_crtc_layerscr[1]);
+ if(m_video.towns_sprite_reg[1] & 0x80)
+ draw_sprites(dev->machine(),&m_video.towns_crtc_layerscr[1]);
}
void towns_state::video_start()
diff --git a/src/mess/video/vc4000.c b/src/mess/video/vc4000.c
index 34115c4319a..d78105d254b 100644
--- a/src/mess/video/vc4000.c
+++ b/src/mess/video/vc4000.c
@@ -573,76 +573,75 @@ INLINE void vc4000_draw_grid(running_machine &machine, UINT8 *collision)
}
}
-INTERRUPT_GEN( vc4000_video_line )
+INTERRUPT_GEN_MEMBER(vc4000_state::vc4000_video_line)
{
- vc4000_state *state = device->machine().driver_data<vc4000_state>();
int x,y,i;
UINT8 collision[400]={0}; // better alloca or gcc feature of non constant long automatic arrays
- const rectangle &visarea = device->machine().primary_screen->visible_area();
- assert(ARRAY_LENGTH(collision) >= device->machine().primary_screen->width());
+ const rectangle &visarea = machine().primary_screen->visible_area();
+ assert(ARRAY_LENGTH(collision) >= machine().primary_screen->width());
- state->m_video.line++;
- if (state->m_irq_pause) state->m_irq_pause++;
- if (state->m_video.line>311) state->m_video.line=0;
+ m_video.line++;
+ if (m_irq_pause) m_irq_pause++;
+ if (m_video.line>311) m_video.line=0;
- if (state->m_video.line==0)
+ if (m_video.line==0)
{
- state->m_video.background_collision=0;
- state->m_video.sprite_collision=0;
- state->m_video.reg.d.sprite_collision=0;
+ m_video.background_collision=0;
+ m_video.sprite_collision=0;
+ m_video.reg.d.sprite_collision=0;
// logerror("begin of frame\n");
}
- if (state->m_irq_pause>10)
+ if (m_irq_pause>10)
{
- device->machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
- state->m_irq_pause = 0;
+ machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
+ m_irq_pause = 0;
}
- if (state->m_video.line <= VC4000_END_LINE)
+ if (m_video.line <= VC4000_END_LINE)
{
- vc4000_draw_grid(device->machine(), collision);
+ vc4000_draw_grid(machine(), collision);
/* init object colours */
- for (i=visarea.min_x; i<visarea.max_x; i++) state->m_objects[i]=8;
+ for (i=visarea.min_x; i<visarea.max_x; i++) m_objects[i]=8;
/* calculate object colours and OR overlapping object colours */
- vc4000_sprite_update(state, *state->m_bitmap, collision, &state->m_video.sprites[0]);
- vc4000_sprite_update(state, *state->m_bitmap, collision, &state->m_video.sprites[1]);
- vc4000_sprite_update(state, *state->m_bitmap, collision, &state->m_video.sprites[2]);
- vc4000_sprite_update(state, *state->m_bitmap, collision, &state->m_video.sprites[3]);
+ vc4000_sprite_update(this, *m_bitmap, collision, &m_video.sprites[0]);
+ vc4000_sprite_update(this, *m_bitmap, collision, &m_video.sprites[1]);
+ vc4000_sprite_update(this, *m_bitmap, collision, &m_video.sprites[2]);
+ vc4000_sprite_update(this, *m_bitmap, collision, &m_video.sprites[3]);
for (i=visarea.min_x; i<visarea.max_x; i++)
{
- state->m_video.sprite_collision|=state->m_sprite_collision[collision[i]];
- state->m_video.background_collision|=state->m_background_collision[collision[i]];
+ m_video.sprite_collision|=m_sprite_collision[collision[i]];
+ m_video.background_collision|=m_background_collision[collision[i]];
/* display final object colours */
- if (state->m_objects[i] < 8)
- state->m_bitmap->pix16(state->m_video.line, i) = state->m_objects[i];
+ if (m_objects[i] < 8)
+ m_bitmap->pix16(m_video.line, i) = m_objects[i];
}
- y = state->m_video.reg.d.score_control&1?200:20;
+ y = m_video.reg.d.score_control&1?200:20;
- if ((state->m_video.line>=y)&&(state->m_video.line<y+20))
+ if ((m_video.line>=y)&&(m_video.line<y+20))
{
x = 60;
- vc4000_draw_digit(state, *state->m_bitmap, x, y, state->m_video.reg.d.bcd[0]>>4, state->m_video.line-y);
- vc4000_draw_digit(state, *state->m_bitmap, x+16, y, state->m_video.reg.d.bcd[0]&0xf, state->m_video.line-y);
- if (state->m_video.reg.d.score_control&2) x -= 16;
- vc4000_draw_digit(state, *state->m_bitmap, x+48, y, state->m_video.reg.d.bcd[1]>>4, state->m_video.line-y);
- vc4000_draw_digit(state, *state->m_bitmap, x+64, y, state->m_video.reg.d.bcd[1]&0xf, state->m_video.line-y);
+ vc4000_draw_digit(this, *m_bitmap, x, y, m_video.reg.d.bcd[0]>>4, m_video.line-y);
+ vc4000_draw_digit(this, *m_bitmap, x+16, y, m_video.reg.d.bcd[0]&0xf, m_video.line-y);
+ if (m_video.reg.d.score_control&2) x -= 16;
+ vc4000_draw_digit(this, *m_bitmap, x+48, y, m_video.reg.d.bcd[1]>>4, m_video.line-y);
+ vc4000_draw_digit(this, *m_bitmap, x+64, y, m_video.reg.d.bcd[1]&0xf, m_video.line-y);
}
}
- if (state->m_video.line==VC4000_END_LINE) state->m_video.reg.d.sprite_collision |=0x40;
+ if (m_video.line==VC4000_END_LINE) m_video.reg.d.sprite_collision |=0x40;
- if (((state->m_video.line == VC4000_END_LINE) |
- (state->m_video.sprites[3].finished_now) |
- (state->m_video.sprites[2].finished_now) |
- (state->m_video.sprites[1].finished_now) |
- (state->m_video.sprites[0].finished_now)) && (!state->m_irq_pause))
+ if (((m_video.line == VC4000_END_LINE) |
+ (m_video.sprites[3].finished_now) |
+ (m_video.sprites[2].finished_now) |
+ (m_video.sprites[1].finished_now) |
+ (m_video.sprites[0].finished_now)) && (!m_irq_pause))
{
- device->machine().device("maincpu")->execute().set_input_line_and_vector(0, ASSERT_LINE, 3);
- state->m_irq_pause=1;
+ machine().device("maincpu")->execute().set_input_line_and_vector(0, ASSERT_LINE, 3);
+ m_irq_pause=1;
}
}