diff options
author | 2008-01-08 03:05:19 +0000 | |
---|---|---|
committer | 2008-01-08 03:05:19 +0000 | |
commit | 990bc873d652c51ba4d86269cac33a7d2c4dfced (patch) | |
tree | 8f247009c65ccb08f6baeb8af457e2e77ec29358 | |
parent | f57292b93c434b1466f89d425b4286ee93071c9b (diff) |
(From AtariAce)
Added machine and cpunum parameters to INTERRUPT_GEN callbacks.
Fixed several places that were not using INTERRUPT_GEN or OPBASE_HANDLER macros.
69 files changed, 151 insertions, 154 deletions
diff --git a/src/emu/cpuexec.c b/src/emu/cpuexec.c index 0f3dfde968d..6077756c328 100644 --- a/src/emu/cpuexec.c +++ b/src/emu/cpuexec.c @@ -1221,7 +1221,7 @@ static TIMER_CALLBACK( cpu_vblankcallback ) if (machine->drv->cpu[cpunum].vblank_interrupt && !cpunum_is_suspended(cpunum, SUSPEND_REASON_HALT | SUSPEND_REASON_RESET | SUSPEND_REASON_DISABLE)) { cpuintrf_push_context(cpunum); - (*machine->drv->cpu[cpunum].vblank_interrupt)(); + (*machine->drv->cpu[cpunum].vblank_interrupt)(machine, cpunum); cpuintrf_pop_context(); } @@ -1303,7 +1303,7 @@ static TIMER_CALLBACK( cpu_timedintcallback ) if (machine->drv->cpu[param].timed_interrupt && !cpunum_is_suspended(param, SUSPEND_REASON_HALT | SUSPEND_REASON_RESET | SUSPEND_REASON_DISABLE)) { cpuintrf_push_context(param); - (*machine->drv->cpu[param].timed_interrupt)(); + (*machine->drv->cpu[param].timed_interrupt)(machine, param); cpuintrf_pop_context(); } } diff --git a/src/emu/cpuexec.h b/src/emu/cpuexec.h index eabc0b86f97..9a7e551c182 100644 --- a/src/emu/cpuexec.h +++ b/src/emu/cpuexec.h @@ -223,9 +223,9 @@ struct _cpu_config int flags; /* flags; see #defines below */ int clock; /* in Hertz */ construct_map_t construct_map[ADDRESS_SPACES][2]; /* 2 memory maps per address space */ - void (*vblank_interrupt)(void); /* for interrupts tied to VBLANK */ + void (*vblank_interrupt)(running_machine *machine, int cpunum); /* for interrupts tied to VBLANK */ int vblank_interrupts_per_frame;/* usually 1 */ - void (*timed_interrupt)(void); /* for interrupts not tied to VBLANK */ + void (*timed_interrupt)(running_machine *machine, int cpunum); /* for interrupts not tied to VBLANK */ attoseconds_t timed_interrupt_period; /* period for periodic interrupts */ const void *reset_param; /* parameter for cpu_reset */ const char *tag; diff --git a/src/emu/cpuint.h b/src/emu/cpuint.h index aa3b08d3864..b1e9fd83c74 100644 --- a/src/emu/cpuint.h +++ b/src/emu/cpuint.h @@ -16,7 +16,7 @@ #include "memory.h" -#define INTERRUPT_GEN(func) void func(void) +#define INTERRUPT_GEN(func) void func(running_machine *machine, int cpunum) diff --git a/src/emu/machine/generic.c b/src/emu/machine/generic.c index 450f70c7e14..1905c332275 100644 --- a/src/emu/machine/generic.c +++ b/src/emu/machine/generic.c @@ -624,9 +624,8 @@ READ8_HANDLER( interrupt_enable_r ) specified state on the active CPU -------------------------------------------------*/ -INLINE void irqn_line_set(int line, int state) +INLINE void irqn_line_set(int cpunum, int line, int state) { - int cpunum = cpu_getactivecpu(); if (interrupt_enable[cpunum]) cpunum_set_input_line(cpunum, line, state); } @@ -636,45 +635,45 @@ INLINE void irqn_line_set(int line, int state) NMI callbacks -------------------------------------------------*/ -INTERRUPT_GEN( nmi_line_pulse ) { irqn_line_set(INPUT_LINE_NMI, PULSE_LINE); } -INTERRUPT_GEN( nmi_line_assert ) { irqn_line_set(INPUT_LINE_NMI, ASSERT_LINE); } +INTERRUPT_GEN( nmi_line_pulse ) { irqn_line_set(cpunum, INPUT_LINE_NMI, PULSE_LINE); } +INTERRUPT_GEN( nmi_line_assert ) { irqn_line_set(cpunum, INPUT_LINE_NMI, ASSERT_LINE); } /*------------------------------------------------- IRQn callbacks -------------------------------------------------*/ -INTERRUPT_GEN( irq0_line_hold ) { irqn_line_set(0, HOLD_LINE); } -INTERRUPT_GEN( irq0_line_pulse ) { irqn_line_set(0, PULSE_LINE); } -INTERRUPT_GEN( irq0_line_assert ) { irqn_line_set(0, ASSERT_LINE); } +INTERRUPT_GEN( irq0_line_hold ) { irqn_line_set(cpunum, 0, HOLD_LINE); } +INTERRUPT_GEN( irq0_line_pulse ) { irqn_line_set(cpunum, 0, PULSE_LINE); } +INTERRUPT_GEN( irq0_line_assert ) { irqn_line_set(cpunum, 0, ASSERT_LINE); } -INTERRUPT_GEN( irq1_line_hold ) { irqn_line_set(1, HOLD_LINE); } -INTERRUPT_GEN( irq1_line_pulse ) { irqn_line_set(1, PULSE_LINE); } -INTERRUPT_GEN( irq1_line_assert ) { irqn_line_set(1, ASSERT_LINE); } +INTERRUPT_GEN( irq1_line_hold ) { irqn_line_set(cpunum, 1, HOLD_LINE); } +INTERRUPT_GEN( irq1_line_pulse ) { irqn_line_set(cpunum, 1, PULSE_LINE); } +INTERRUPT_GEN( irq1_line_assert ) { irqn_line_set(cpunum, 1, ASSERT_LINE); } -INTERRUPT_GEN( irq2_line_hold ) { irqn_line_set(2, HOLD_LINE); } -INTERRUPT_GEN( irq2_line_pulse ) { irqn_line_set(2, PULSE_LINE); } -INTERRUPT_GEN( irq2_line_assert ) { irqn_line_set(2, ASSERT_LINE); } +INTERRUPT_GEN( irq2_line_hold ) { irqn_line_set(cpunum, 2, HOLD_LINE); } +INTERRUPT_GEN( irq2_line_pulse ) { irqn_line_set(cpunum, 2, PULSE_LINE); } +INTERRUPT_GEN( irq2_line_assert ) { irqn_line_set(cpunum, 2, ASSERT_LINE); } -INTERRUPT_GEN( irq3_line_hold ) { irqn_line_set(3, HOLD_LINE); } -INTERRUPT_GEN( irq3_line_pulse ) { irqn_line_set(3, PULSE_LINE); } -INTERRUPT_GEN( irq3_line_assert ) { irqn_line_set(3, ASSERT_LINE); } +INTERRUPT_GEN( irq3_line_hold ) { irqn_line_set(cpunum, 3, HOLD_LINE); } +INTERRUPT_GEN( irq3_line_pulse ) { irqn_line_set(cpunum, 3, PULSE_LINE); } +INTERRUPT_GEN( irq3_line_assert ) { irqn_line_set(cpunum, 3, ASSERT_LINE); } -INTERRUPT_GEN( irq4_line_hold ) { irqn_line_set(4, HOLD_LINE); } -INTERRUPT_GEN( irq4_line_pulse ) { irqn_line_set(4, PULSE_LINE); } -INTERRUPT_GEN( irq4_line_assert ) { irqn_line_set(4, ASSERT_LINE); } +INTERRUPT_GEN( irq4_line_hold ) { irqn_line_set(cpunum, 4, HOLD_LINE); } +INTERRUPT_GEN( irq4_line_pulse ) { irqn_line_set(cpunum, 4, PULSE_LINE); } +INTERRUPT_GEN( irq4_line_assert ) { irqn_line_set(cpunum, 4, ASSERT_LINE); } -INTERRUPT_GEN( irq5_line_hold ) { irqn_line_set(5, HOLD_LINE); } -INTERRUPT_GEN( irq5_line_pulse ) { irqn_line_set(5, PULSE_LINE); } -INTERRUPT_GEN( irq5_line_assert ) { irqn_line_set(5, ASSERT_LINE); } +INTERRUPT_GEN( irq5_line_hold ) { irqn_line_set(cpunum, 5, HOLD_LINE); } +INTERRUPT_GEN( irq5_line_pulse ) { irqn_line_set(cpunum, 5, PULSE_LINE); } +INTERRUPT_GEN( irq5_line_assert ) { irqn_line_set(cpunum, 5, ASSERT_LINE); } -INTERRUPT_GEN( irq6_line_hold ) { irqn_line_set(6, HOLD_LINE); } -INTERRUPT_GEN( irq6_line_pulse ) { irqn_line_set(6, PULSE_LINE); } -INTERRUPT_GEN( irq6_line_assert ) { irqn_line_set(6, ASSERT_LINE); } +INTERRUPT_GEN( irq6_line_hold ) { irqn_line_set(cpunum, 6, HOLD_LINE); } +INTERRUPT_GEN( irq6_line_pulse ) { irqn_line_set(cpunum, 6, PULSE_LINE); } +INTERRUPT_GEN( irq6_line_assert ) { irqn_line_set(cpunum, 6, ASSERT_LINE); } -INTERRUPT_GEN( irq7_line_hold ) { irqn_line_set(7, HOLD_LINE); } -INTERRUPT_GEN( irq7_line_pulse ) { irqn_line_set(7, PULSE_LINE); } -INTERRUPT_GEN( irq7_line_assert ) { irqn_line_set(7, ASSERT_LINE); } +INTERRUPT_GEN( irq7_line_hold ) { irqn_line_set(cpunum, 7, HOLD_LINE); } +INTERRUPT_GEN( irq7_line_pulse ) { irqn_line_set(cpunum, 7, PULSE_LINE); } +INTERRUPT_GEN( irq7_line_assert ) { irqn_line_set(cpunum, 7, ASSERT_LINE); } diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c index 724d41d2acb..4018b1e8c7a 100644 --- a/src/mame/drivers/88games.c +++ b/src/mame/drivers/88games.c @@ -28,7 +28,7 @@ VIDEO_UPDATE( 88games ); static INTERRUPT_GEN( k88games_interrupt ) { if (K052109_is_IRQ_enabled()) - irq0_line_hold(); + irq0_line_hold(machine, cpunum); } static int zoomreadroms; diff --git a/src/mame/drivers/arcadecl.c b/src/mame/drivers/arcadecl.c index 4e1b6fa55e9..e4367a7c7ce 100644 --- a/src/mame/drivers/arcadecl.c +++ b/src/mame/drivers/arcadecl.c @@ -99,7 +99,7 @@ static void scanline_update(running_machine *machine, int scrnum, int scanline) { /* generate 32V signals */ if ((scanline & 32) == 0) - atarigen_scanline_int_gen(); + atarigen_scanline_int_gen(machine, 0); } diff --git a/src/mame/drivers/atarig42.c b/src/mame/drivers/atarig42.c index ad93ba766ad..448dc92c63e 100644 --- a/src/mame/drivers/atarig42.c +++ b/src/mame/drivers/atarig42.c @@ -143,14 +143,14 @@ static WRITE16_HANDLER( mo_command_w ) * *************************************/ -static offs_t sloop_opbase_handler(offs_t pc) +static OPBASE_HANDLER( sloop_opbase_handler ) { - if (pc < 0x80000) + if (address < 0x80000) { opcode_base = opcode_arg_base = (void *)sloop_base; return (offs_t)-1; } - return pc; + return address; } diff --git a/src/mame/drivers/atarigt.c b/src/mame/drivers/atarigt.c index 29dab31a930..9507a7c34de 100644 --- a/src/mame/drivers/atarigt.c +++ b/src/mame/drivers/atarigt.c @@ -90,7 +90,7 @@ static MACHINE_RESET( atarigt ) static void cage_irq_callback(int reason) { if (reason) - atarigen_sound_int_gen(); + atarigen_sound_int_gen(Machine, 0); else atarigen_sound_int_ack_w(0,0,0); } diff --git a/src/mame/drivers/atarisy2.c b/src/mame/drivers/atarisy2.c index d8fdd961a80..174d48489d8 100644 --- a/src/mame/drivers/atarisy2.c +++ b/src/mame/drivers/atarisy2.c @@ -203,7 +203,7 @@ static void scanline_update(running_machine *machine, int scrnum, int scanline) /* generate the 32V interrupt (IRQ 2) */ if ((scanline % 64) == 0) if (interrupt_enable & 4) - atarigen_scanline_int_gen(); + atarigen_scanline_int_gen(machine, 0); } } @@ -215,15 +215,15 @@ static void scanline_update(running_machine *machine, int scrnum, int scanline) * *************************************/ -static offs_t atarisy2_opbase_handler(offs_t pc) +static OPBASE_HANDLER( atarisy2_opbase_handler ) { /* make sure slapstic area looks like ROM */ - if (pc >= 0x8000 && pc < 0x8200) + if (address >= 0x8000 && address < 0x8200) { opcode_base = opcode_arg_base = (UINT8 *)atarisy2_slapstic - 0x8000; return ~0; } - return pc; + return address; } @@ -256,7 +256,7 @@ static INTERRUPT_GEN( vblank_int ) { /* clock the VBLANK through */ if (interrupt_enable & 8) - atarigen_video_int_gen(); + atarigen_video_int_gen(machine, cpunum); } diff --git a/src/mame/drivers/badlands.c b/src/mame/drivers/badlands.c index 9b7128e5b4a..b55915816b3 100644 --- a/src/mame/drivers/badlands.c +++ b/src/mame/drivers/badlands.c @@ -140,7 +140,7 @@ static void scanline_update(running_machine *machine, int scrnum, int scanline) if (scanline & 32) atarigen_6502_irq_ack_r(0); else if (!(readinputport(0) & 0x40)) - atarigen_6502_irq_gen(); + atarigen_6502_irq_gen(machine, 0); } @@ -170,14 +170,14 @@ static INTERRUPT_GEN( vblank_int ) int i; /* update the pedals once per frame */ - for (i = 0; i < 2; i++) + for (i = 0; i < 2; i++) { pedal_value[i]--; if (pedal_state & (1 << i)) pedal_value[i]++; } - atarigen_video_int_gen(); + atarigen_video_int_gen(machine, cpunum); } diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c index f48435f1faa..072768306bd 100644 --- a/src/mame/drivers/bfcobra.c +++ b/src/mame/drivers/bfcobra.c @@ -253,8 +253,8 @@ static VIDEO_UPDATE( bfcobra ) UINT8 x_offset = x + h_scroll; UINT8 pen = *(src + x_offset); - //*dest++ = Machine->pens[pen & ramdac.mask]; - *dest++ = Machine->pens[pen]; + //*dest++ = machine->pens[pen & ramdac.mask]; + *dest++ = machine->pens[pen]; } } diff --git a/src/mame/drivers/cheekyms.c b/src/mame/drivers/cheekyms.c index 6ef7c52bc98..b8f57f4cb0f 100644 --- a/src/mame/drivers/cheekyms.c +++ b/src/mame/drivers/cheekyms.c @@ -37,9 +37,9 @@ ADDRESS_MAP_END static INTERRUPT_GEN( cheekyms_interrupt ) { if (readinputport(2) & 1) /* Coin */ - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); else - irq0_line_hold(); + irq0_line_hold(machine, cpunum); } diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c index e946ee9c930..53d931648c2 100644 --- a/src/mame/drivers/cps1.c +++ b/src/mame/drivers/cps1.c @@ -315,7 +315,7 @@ static UINT8 *qsound_sharedram1,*qsound_sharedram2; INTERRUPT_GEN( cps1_qsound_interrupt ) { - cpunum_set_input_line(cpu_getactivecpu(), 2, HOLD_LINE); + cpunum_set_input_line(cpunum, 2, HOLD_LINE); } diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c index 1ad3d8e8296..afddb79f52d 100644 --- a/src/mame/drivers/cps3.c +++ b/src/mame/drivers/cps3.c @@ -612,7 +612,7 @@ INLINE void cps3_drawgfxzoom( mame_bitmap *dest_bmp,const gfx_element *gfx, -static offs_t cps3_opbase_handler(offs_t address); +static OPBASE_HANDLER( cps3_opbase_handler ); /* Encryption */ @@ -1392,7 +1392,7 @@ static WRITE32_HANDLER( cps3_0xc0000000_ram_w ) -static offs_t cps3_opbase_handler(offs_t address) +static OPBASE_HANDLER( cps3_opbase_handler ) { // if(DEBUG_PRINTF) printf("address %04x\n",address); diff --git a/src/mame/drivers/deadang.c b/src/mame/drivers/deadang.c index 4573b401c54..d62a1f36497 100644 --- a/src/mame/drivers/deadang.c +++ b/src/mame/drivers/deadang.c @@ -254,9 +254,9 @@ SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE static INTERRUPT_GEN( deadang_interrupt ) { if (cpu_getiloops()) - cpunum_set_input_line_and_vector(cpu_getactivecpu(), 0, HOLD_LINE, 0xc8/4); /* VBL */ + cpunum_set_input_line_and_vector(cpunum, 0, HOLD_LINE, 0xc8/4); /* VBL */ else - cpunum_set_input_line_and_vector(cpu_getactivecpu(), 0, HOLD_LINE, 0xc4/4); /* VBL */ + cpunum_set_input_line_and_vector(cpunum, 0, HOLD_LINE, 0xc4/4); /* VBL */ } /* Machine Drivers */ diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c index 0f0ff1d52fd..89856df895d 100644 --- a/src/mame/drivers/dkong.c +++ b/src/mame/drivers/dkong.c @@ -357,7 +357,7 @@ static MACHINE_START( hunchbkd ) UINT8 *p = memory_region(REGION_USER1); int i; - dkong_state *state = Machine->driver_data; + dkong_state *state = machine->driver_data; machine_start_dkong2b(machine); dma8257_config(0, &hb_dma); @@ -375,7 +375,7 @@ static MACHINE_START( hunchbkd ) static MACHINE_START( radarscp ) { - dkong_state *state = Machine->driver_data; + dkong_state *state = machine->driver_data; machine_start_dkong2b(machine); state->hardware_type = HARDWARE_TRS02; @@ -383,7 +383,7 @@ static MACHINE_START( radarscp ) static MACHINE_START( radarsc1 ) { - dkong_state *state = Machine->driver_data; + dkong_state *state = machine->driver_data; machine_start_dkong2b(machine); state->hardware_type = HARDWARE_TRS01; diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c index 151747ae64e..6e243eaace2 100644 --- a/src/mame/drivers/dlair.c +++ b/src/mame/drivers/dlair.c @@ -307,7 +307,7 @@ static MACHINE_RESET( dlair ) * *************************************/ -static void vblank_callback(void) +static INTERRUPT_GEN( vblank_callback ) { /* update the laserdisc */ laserdisc_vsync(discinfo); diff --git a/src/mame/drivers/dynduke.c b/src/mame/drivers/dynduke.c index 69ead6de5d9..386d380491c 100644 --- a/src/mame/drivers/dynduke.c +++ b/src/mame/drivers/dynduke.c @@ -265,7 +265,7 @@ SEIBU_SOUND_SYSTEM_YM3812_HARDWARE static INTERRUPT_GEN( dynduke_interrupt ) { - cpunum_set_input_line_and_vector(cpu_getactivecpu(), 0, HOLD_LINE, 0xc8/4); // VBL + cpunum_set_input_line_and_vector(cpunum, 0, HOLD_LINE, 0xc8/4); // VBL } /* Machine Driver */ diff --git a/src/mame/drivers/espial.c b/src/mame/drivers/espial.c index 3c53d013975..778664a76b9 100644 --- a/src/mame/drivers/espial.c +++ b/src/mame/drivers/espial.c @@ -44,16 +44,16 @@ WRITE8_HANDLER( espial_sound_nmi_enable_w ) INTERRUPT_GEN( espial_sound_nmi_gen ) { if (sound_nmi_enabled) - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); } INTERRUPT_GEN( zodiac_master_interrupt ) { if (cpu_getiloops() == 0) - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); else - irq0_line_hold(); + irq0_line_hold(machine, cpunum); } diff --git a/src/mame/drivers/exidy440.c b/src/mame/drivers/exidy440.c index 4d7bb4ae85e..8931fb8d503 100644 --- a/src/mame/drivers/exidy440.c +++ b/src/mame/drivers/exidy440.c @@ -285,7 +285,7 @@ static INTERRUPT_GEN( main_interrupt ) { /* generate coin interrupts */ handle_coins(); - exidy440_vblank_interrupt(); + exidy440_vblank_interrupt(machine, cpunum); } diff --git a/src/mame/drivers/foodf.c b/src/mame/drivers/foodf.c index 9ce0883f660..f1e6db20e7d 100644 --- a/src/mame/drivers/foodf.c +++ b/src/mame/drivers/foodf.c @@ -138,7 +138,7 @@ static TIMER_CALLBACK( scanline_update ) mystery yet */ /* INT 1 is on 32V */ - atarigen_scanline_int_gen(); + atarigen_scanline_int_gen(machine, 0); /* advance to the next interrupt */ scanline += 64; diff --git a/src/mame/drivers/galaga.c b/src/mame/drivers/galaga.c index 9154f4f3853..f805359cd26 100644 --- a/src/mame/drivers/galaga.c +++ b/src/mame/drivers/galaga.c @@ -713,7 +713,7 @@ static INTERRUPT_GEN( galaga_cpu3_nmi ) { /* see notes at the top of the driver */ if (cpu_getiloops() & 1) - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); } static READ8_HANDLER( bosco_dsw_r ) diff --git a/src/mame/drivers/gaplus.c b/src/mame/drivers/gaplus.c index 2382e4e7cb7..ba159619689 100644 --- a/src/mame/drivers/gaplus.c +++ b/src/mame/drivers/gaplus.c @@ -318,7 +318,7 @@ static MACHINE_RESET( gaplus ) static INTERRUPT_GEN( gaplus_interrupt_1 ) { - irq0_line_assert(); // this also checks if irq is enabled - IMPORTANT! + irq0_line_assert(machine, cpunum); // this also checks if irq is enabled - IMPORTANT! // so don't replace with cpunum_set_input_line(0, 0, ASSERT_LINE); namcoio_set_irq_line(0,PULSE_LINE); diff --git a/src/mame/drivers/gauntlet.c b/src/mame/drivers/gauntlet.c index cf44305fffe..584f40f0e0b 100644 --- a/src/mame/drivers/gauntlet.c +++ b/src/mame/drivers/gauntlet.c @@ -165,7 +165,7 @@ static void scanline_update(running_machine *machine, int scrnum, int scanline) { /* sound IRQ is on 32V */ if (scanline & 32) - atarigen_6502_irq_gen(); + atarigen_6502_irq_gen(machine, 0); else atarigen_6502_irq_ack_r(0); } diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c index 52598fa751e..f5b4c06d342 100644 --- a/src/mame/drivers/grchamp.c +++ b/src/mame/drivers/grchamp.c @@ -92,21 +92,19 @@ static MACHINE_START( grchamp ) static INTERRUPT_GEN( grchamp_cpu0_interrupt ) { - grchamp_state *state = Machine->driver_data; - int cpu = cpu_getactivecpu(); + grchamp_state *state = machine->driver_data; if (state->cpu0_out[0] & 0x01) - cpunum_set_input_line(cpu, 0, ASSERT_LINE); + cpunum_set_input_line(cpunum, 0, ASSERT_LINE); } static INTERRUPT_GEN( grchamp_cpu1_interrupt ) { - grchamp_state *state = Machine->driver_data; - int cpu = cpu_getactivecpu(); + grchamp_state *state = machine->driver_data; if (state->cpu1_out[4] & 0x01) - cpunum_set_input_line(cpu, 0, ASSERT_LINE); + cpunum_set_input_line(cpunum, 0, ASSERT_LINE); } diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c index d1ec857c7b3..1fe40e10551 100644 --- a/src/mame/drivers/istellar.c +++ b/src/mame/drivers/istellar.c @@ -321,7 +321,7 @@ static INTERRUPT_GEN( vblank_callback_istellar ) cpunum_set_input_line(2, 0, ASSERT_LINE); /* Only do the LDP's sync once */ - if (cpu_getactivecpu() == 0) + if (cpunum == 0) laserdisc_vsync(discinfo); } diff --git a/src/mame/drivers/klax.c b/src/mame/drivers/klax.c index c0b015bb757..8a7817a197d 100644 --- a/src/mame/drivers/klax.c +++ b/src/mame/drivers/klax.c @@ -48,7 +48,7 @@ static void scanline_update(running_machine *machine, int scrnum, int scanline) { /* generate 32V signals */ if ((scanline & 32) == 0 && !(readinputport(0) & 0x800)) - atarigen_scanline_int_gen(); + atarigen_scanline_int_gen(machine, 0); } diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c index e64c38abc67..7f89f920307 100644 --- a/src/mame/drivers/konamigx.c +++ b/src/mame/drivers/konamigx.c @@ -732,7 +732,7 @@ static INTERRUPT_GEN(konamigx_hbinterrupt) { if (!cpu_getiloops()) { - konamigx_vbinterrupt_type4(); + konamigx_vbinterrupt_type4(machine, cpunum); } else // hblank { diff --git a/src/mame/drivers/ksys573.c b/src/mame/drivers/ksys573.c index f508bd1392b..3429667cc54 100644 --- a/src/mame/drivers/ksys573.c +++ b/src/mame/drivers/ksys573.c @@ -1571,7 +1571,7 @@ static INTERRUPT_GEN( sys573_vblank ) { update_mode(); - if( strcmp( Machine->gamedrv->name, "ddr2ml" ) == 0 ) + if( strcmp( machine->gamedrv->name, "ddr2ml" ) == 0 ) { /* patch out security-plate error */ @@ -1583,7 +1583,7 @@ static INTERRUPT_GEN( sys573_vblank ) } } - psx_vblank(); + psx_vblank(machine, cpunum); } /* diff --git a/src/mame/drivers/mainevt.c b/src/mame/drivers/mainevt.c index 5a304aa6460..60ab4d90c92 100644 --- a/src/mame/drivers/mainevt.c +++ b/src/mame/drivers/mainevt.c @@ -38,7 +38,7 @@ VIDEO_START( dv ); static INTERRUPT_GEN( mainevt_interrupt ) { if (K052109_is_IRQ_enabled()) - irq0_line_hold(); + irq0_line_hold(machine, cpunum); } @@ -52,7 +52,7 @@ static WRITE8_HANDLER( dv_nmienable_w ) static INTERRUPT_GEN( dv_interrupt ) { if (nmi_enable) - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); } diff --git a/src/mame/drivers/mappy.c b/src/mame/drivers/mappy.c index 4e4c75312da..0a19d440919 100644 --- a/src/mame/drivers/mappy.c +++ b/src/mame/drivers/mappy.c @@ -855,7 +855,7 @@ static MACHINE_RESET( mappy ) static INTERRUPT_GEN( mappy_interrupt_1 ) { - irq0_line_assert(); // this also checks if irq is enabled - IMPORTANT! + irq0_line_assert(machine, cpunum); // this also checks if irq is enabled - IMPORTANT! // so don't replace with cpunum_set_input_line(0, 0, ASSERT_LINE); namcoio_set_irq_line(0,PULSE_LINE); diff --git a/src/mame/drivers/maxaflex.c b/src/mame/drivers/maxaflex.c index 841f2c26775..c4687afa5ce 100644 --- a/src/mame/drivers/maxaflex.c +++ b/src/mame/drivers/maxaflex.c @@ -223,7 +223,7 @@ static MACHINE_RESET(supervisor_board) output_set_digit_value(2, 0x00); } -static void supervisor_board_check_coin_input(void) +static INTERRUPT_GEN( supervisor_board_check_coin_input ) { if ( !readinputport(4) ) { diff --git a/src/mame/drivers/micro3d.c b/src/mame/drivers/micro3d.c index a03db9b7913..5a581fae43a 100644 --- a/src/mame/drivers/micro3d.c +++ b/src/mame/drivers/micro3d.c @@ -395,7 +395,7 @@ static void tms_interrupt(int state) m68901_int_gen(GPIP4); } -static void micro3d_vblank(void) +static INTERRUPT_GEN( micro3d_vblank ) { m68901_int_gen(GPIP7); } diff --git a/src/mame/drivers/missile.c b/src/mame/drivers/missile.c index 8d969877637..e008f93ab11 100644 --- a/src/mame/drivers/missile.c +++ b/src/mame/drivers/missile.c @@ -355,7 +355,7 @@ static TIMER_CALLBACK( adjust_cpu_speed ) } -static offs_t missile_opbase_handler(offs_t address) +static OPBASE_HANDLER( missile_opbase_handler ) { /* offset accounts for lack of A15 decoding */ int offset = address & 0x8000; diff --git a/src/mame/drivers/mouser.c b/src/mame/drivers/mouser.c index 350f3ea5b0a..4a6dd6bc629 100644 --- a/src/mame/drivers/mouser.c +++ b/src/mame/drivers/mouser.c @@ -37,7 +37,7 @@ static WRITE8_HANDLER( mouser_nmi_enable_w ) static INTERRUPT_GEN( mouser_nmi_interrupt ) { if ((mouser_nmi_enable & 1) == 1) - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); } /* Sound CPU interrupted on write */ diff --git a/src/mame/drivers/mustache.c b/src/mame/drivers/mustache.c index eae3317d533..6e1b401923f 100644 --- a/src/mame/drivers/mustache.c +++ b/src/mame/drivers/mustache.c @@ -186,7 +186,7 @@ static TIMER_CALLBACK( clear_irq_cb ) cpunum_set_input_line(0, 0, CLEAR_LINE); } -static void assert_irq(void) +static INTERRUPT_GEN( assert_irq ) { cpunum_set_input_line(0, 0, ASSERT_LINE); timer_set(ATTOTIME_IN_CYCLES(14288, 0), NULL, 0, clear_irq_cb); diff --git a/src/mame/drivers/mystston.c b/src/mame/drivers/mystston.c index 11a90d74270..84f07e2c601 100644 --- a/src/mame/drivers/mystston.c +++ b/src/mame/drivers/mystston.c @@ -219,7 +219,7 @@ static INTERRUPT_GEN( mystston_interrupt ) if (coin == 0) { coin = 1; - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); return; } } diff --git a/src/mame/drivers/namcos11.c b/src/mame/drivers/namcos11.c index d24b35f30a1..01c51ac8bcb 100644 --- a/src/mame/drivers/namcos11.c +++ b/src/mame/drivers/namcos11.c @@ -604,9 +604,9 @@ static INTERRUPT_GEN( namcos11_vblank ) } m_n_oldcoin = ~n_coin; - psx_vblank(); + psx_vblank(machine, cpunum); - if( strcmp( Machine->gamedrv->name, "pocketrc" ) == 0 ) + if( strcmp( machine->gamedrv->name, "pocketrc" ) == 0 ) { if( g_p_n_psxram[ 0x12c74 / 4 ] == 0x1440fff9 ) { diff --git a/src/mame/drivers/pacman.c b/src/mame/drivers/pacman.c index b37a98f38cb..b7b4bf5b742 100644 --- a/src/mame/drivers/pacman.c +++ b/src/mame/drivers/pacman.c @@ -395,7 +395,7 @@ static INTERRUPT_GEN( pacman_interrupt ) { /* always signal a normal VBLANK */ if (cpu_getiloops() == 0) - irq0_line_hold(); + irq0_line_hold(machine, cpunum); /* on other "VBLANK" opportunities, check to make sure the cheat is enabled */ /* and that the speedup button is pressed */ @@ -406,7 +406,7 @@ static INTERRUPT_GEN( pacman_interrupt ) { UINT8 value = readinputport(portnum); if ((value & 7) == 5 || (value & 6) == 2) - irq0_line_hold(); + irq0_line_hold(machine, cpunum); } } } diff --git a/src/mame/drivers/panicr.c b/src/mame/drivers/panicr.c index 726276de46b..5e5f57247bc 100644 --- a/src/mame/drivers/panicr.c +++ b/src/mame/drivers/panicr.c @@ -209,9 +209,9 @@ static VIDEO_UPDATE( panicr) static INTERRUPT_GEN( panicr_interrupt ) { if (cpu_getiloops()) - cpunum_set_input_line_and_vector(cpu_getactivecpu(), 0, HOLD_LINE, 0xc8/4); + cpunum_set_input_line_and_vector(cpunum, 0, HOLD_LINE, 0xc8/4); else - cpunum_set_input_line_and_vector(cpu_getactivecpu(), 0, HOLD_LINE, 0xc4/4); + cpunum_set_input_line_and_vector(cpunum, 0, HOLD_LINE, 0xc4/4); } static INPUT_PORTS_START( panicr ) diff --git a/src/mame/drivers/raiden.c b/src/mame/drivers/raiden.c index 3280862f4c9..ca548d50582 100644 --- a/src/mame/drivers/raiden.c +++ b/src/mame/drivers/raiden.c @@ -226,7 +226,7 @@ SEIBU_SOUND_SYSTEM_YM3812_HARDWARE static INTERRUPT_GEN( raiden_interrupt ) { - cpunum_set_input_line_and_vector(cpu_getactivecpu(), 0, HOLD_LINE, 0xc8/4); /* VBL */ + cpunum_set_input_line_and_vector(cpunum, 0, HOLD_LINE, 0xc8/4); /* VBL */ } static VIDEO_EOF( raiden ) diff --git a/src/mame/drivers/raiden2.c b/src/mame/drivers/raiden2.c index 77fef5f9f9f..1db98aca27f 100644 --- a/src/mame/drivers/raiden2.c +++ b/src/mame/drivers/raiden2.c @@ -448,7 +448,7 @@ static INTERRUPT_GEN( raiden2_interrupt ) mainram[0x74c/2] = readinputport(4) | 0xff00; mainram[0x74e/2] = 0xffff; - cpunum_set_input_line_and_vector(cpu_getactivecpu(), 0, HOLD_LINE, 0xc0/4); /* VBL */ + cpunum_set_input_line_and_vector(cpunum, 0, HOLD_LINE, 0xc0/4); /* VBL */ logerror("VSYNC\n"); } diff --git a/src/mame/drivers/rampart.c b/src/mame/drivers/rampart.c index 560aa6dfcda..877d5ac8989 100644 --- a/src/mame/drivers/rampart.c +++ b/src/mame/drivers/rampart.c @@ -56,7 +56,7 @@ static void scanline_update(running_machine *machine, int scrnum, int scanline) { /* generate 32V signals */ if ((scanline & 32) == 0) - atarigen_scanline_int_gen(); + atarigen_scanline_int_gen(machine, 0); } diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c index 03c33c4cf1a..3513cc060c1 100644 --- a/src/mame/drivers/royalmah.c +++ b/src/mame/drivers/royalmah.c @@ -3351,7 +3351,7 @@ static MACHINE_DRIVER_START( ippatsu ) MDRV_CPU_IO_MAP(ippatsu_iomap,0) MACHINE_DRIVER_END -static void suzume_irq(void) +static INTERRUPT_GEN( suzume_irq ) { if ( suzume_bank & 0x40 ) cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); diff --git a/src/mame/drivers/segahang.c b/src/mame/drivers/segahang.c index 99712565d2a..43f131c859c 100644 --- a/src/mame/drivers/segahang.c +++ b/src/mame/drivers/segahang.c @@ -312,7 +312,7 @@ static INTERRUPT_GEN( i8751_main_cpu_vblank ) /* if we have a fake 8751 handler, call it on VBLANK */ if (i8751_vblank_hook != NULL) (*i8751_vblank_hook)(); - irq4_line_hold(); + irq4_line_hold(machine, cpunum); } diff --git a/src/mame/drivers/shootout.c b/src/mame/drivers/shootout.c index bc308ff937f..ac144bcf470 100644 --- a/src/mame/drivers/shootout.c +++ b/src/mame/drivers/shootout.c @@ -293,7 +293,7 @@ static INTERRUPT_GEN( shootout_interrupt ) if ( readinputport( 2 ) & 0xc0 ) { if ( coin == 0 ) { coin = 1; - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); } } else coin = 0; diff --git a/src/mame/drivers/skullxbo.c b/src/mame/drivers/skullxbo.c index 16ca83ef41e..45cff1f5e1a 100644 --- a/src/mame/drivers/skullxbo.c +++ b/src/mame/drivers/skullxbo.c @@ -50,7 +50,7 @@ static void update_interrupts(void) static TIMER_CALLBACK( irq_gen ) { - atarigen_scanline_int_gen(); + atarigen_scanline_int_gen(machine, 0); } diff --git a/src/mame/drivers/ssozumo.c b/src/mame/drivers/ssozumo.c index dd97288eed8..4c308fb6d79 100644 --- a/src/mame/drivers/ssozumo.c +++ b/src/mame/drivers/ssozumo.c @@ -38,13 +38,13 @@ static INTERRUPT_GEN( ssozumo_interrupt ) if (coin == 0) { coin = 1; - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); return; } } else coin = 0; - irq0_line_hold(); + irq0_line_hold(machine, cpunum); } diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c index 17fb60b997d..fd10e69664c 100644 --- a/src/mame/drivers/superqix.c +++ b/src/mame/drivers/superqix.c @@ -913,14 +913,14 @@ static INTERRUPT_GEN( sqix_interrupt ) { /* highly suspicious... */ if (cpu_getiloops() <= 3) - nmi_line_assert(); + nmi_line_assert(machine, cpunum); } static INTERRUPT_GEN( bootleg_interrupt ) { /* highly suspicious... */ if (cpu_getiloops() <= 3) - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); } diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c index 08dd7879fb1..7a56f4965c5 100644 --- a/src/mame/drivers/tmnt.c +++ b/src/mame/drivers/tmnt.c @@ -209,13 +209,13 @@ static INTERRUPT_GEN(cbj_interrupt) static INTERRUPT_GEN( punkshot_interrupt ) { - if (K052109_is_IRQ_enabled()) irq4_line_hold(); + if (K052109_is_IRQ_enabled()) irq4_line_hold(machine, cpunum); } static INTERRUPT_GEN( lgtnfght_interrupt ) { - if (K052109_is_IRQ_enabled()) irq5_line_hold(); + if (K052109_is_IRQ_enabled()) irq5_line_hold(machine, cpunum); } diff --git a/src/mame/drivers/toypop.c b/src/mame/drivers/toypop.c index f149dd8b84f..d0475d06967 100644 --- a/src/mame/drivers/toypop.c +++ b/src/mame/drivers/toypop.c @@ -182,7 +182,7 @@ static WRITE8_HANDLER( toypop_sound_interrupt_disable_w ) static INTERRUPT_GEN( toypop_main_interrupt ) { - irq0_line_assert(); // this also checks if irq is enabled - IMPORTANT! + irq0_line_assert(machine, cpunum); // this also checks if irq is enabled - IMPORTANT! // so don't replace with cpunum_set_input_line(0, 0, ASSERT_LINE); namcoio_set_irq_line(0,PULSE_LINE); diff --git a/src/mame/drivers/trucocl.c b/src/mame/drivers/trucocl.c index aeb1c66488e..9c9b8098489 100644 --- a/src/mame/drivers/trucocl.c +++ b/src/mame/drivers/trucocl.c @@ -138,7 +138,7 @@ GFXDECODE_END static INTERRUPT_GEN( trucocl_interrupt ) { - irq0_line_hold(); + irq0_line_hold(machine, cpunum); } static MACHINE_DRIVER_START( trucocl ) diff --git a/src/mame/drivers/twin16.c b/src/mame/drivers/twin16.c index b0f9e8a03ee..333b0caebe1 100644 --- a/src/mame/drivers/twin16.c +++ b/src/mame/drivers/twin16.c @@ -948,12 +948,12 @@ static const struct upd7759_interface upd7759_interface = static INTERRUPT_GEN( CPUA_interrupt ) { - if (CPUA_IRQ_ENABLE) cpunum_set_input_line(cpu_getactivecpu(), 5, HOLD_LINE); + if (CPUA_IRQ_ENABLE) cpunum_set_input_line(cpunum, 5, HOLD_LINE); } static INTERRUPT_GEN( CPUB_interrupt ) { - if (CPUB_IRQ_ENABLE) cpunum_set_input_line(cpu_getactivecpu(), 5, HOLD_LINE); + if (CPUB_IRQ_ENABLE) cpunum_set_input_line(cpunum, 5, HOLD_LINE); } /* Machine Drivers */ diff --git a/src/mame/drivers/xmen.c b/src/mame/drivers/xmen.c index d749ba97402..647021b034a 100644 --- a/src/mame/drivers/xmen.c +++ b/src/mame/drivers/xmen.c @@ -508,8 +508,8 @@ static const struct K054539interface k054539_interface = static INTERRUPT_GEN( xmen_interrupt ) { - if (cpu_getiloops() == 0) irq5_line_hold(); - else irq3_line_hold(); + if (cpu_getiloops() == 0) irq5_line_hold(machine, cpunum); + else irq3_line_hold(machine, cpunum); } static MACHINE_START( xmen ) @@ -569,7 +569,7 @@ static INTERRUPT_GEN( xmen6p_interrupt ) { if (cpu_getiloops() == 0) { - irq5_line_hold(); + irq5_line_hold(machine, cpunum); } @@ -577,7 +577,7 @@ static INTERRUPT_GEN( xmen6p_interrupt ) { // if (xmen_irqenabled&0x04) // { - irq3_line_hold(); + irq3_line_hold(machine, cpunum); // xmen_current_frame = 0x0000; // } diff --git a/src/mame/drivers/zn.c b/src/mame/drivers/zn.c index aab3910790d..7a54a28ea2b 100644 --- a/src/mame/drivers/zn.c +++ b/src/mame/drivers/zn.c @@ -1147,7 +1147,7 @@ static WRITE32_HANDLER( bank_coh1000t_w ) static INTERRUPT_GEN( coh1000t_vblank ) { /* kludge: stop dropping into test mode on bootup */ - if( strcmp( Machine->gamedrv->name, "raystorm" ) == 0 ) + if( strcmp( machine->gamedrv->name, "raystorm" ) == 0 ) { if( g_p_n_psxram[ 0x1b358 / 4 ] == 0x34020001 ) { @@ -1155,49 +1155,49 @@ static INTERRUPT_GEN( coh1000t_vblank ) } } /* kludge: stop dropping into test mode on bootup */ - if( strcmp( Machine->gamedrv->name, "raystorj" ) == 0 ) + if( strcmp( machine->gamedrv->name, "raystorj" ) == 0 ) { if( g_p_n_psxram[ 0x1b358 / 4 ] == 0x34020001 ) { g_p_n_psxram[ 0x1b358 / 4 ] = 0x34020000; } } - if(strcmp( Machine->gamedrv->name, "gdarius" ) == 0 ) + if(strcmp( machine->gamedrv->name, "gdarius" ) == 0 ) { if (psxreadbyte(0x165d53) == 0) { psxwritebyte(0x165d53, 1); } } - if(strcmp( Machine->gamedrv->name, "gdariusb" ) == 0 ) + if(strcmp( machine->gamedrv->name, "gdariusb" ) == 0 ) { if (psxreadbyte(0x165dfb) == 0) { psxwritebyte(0x165dfb, 1); } } - if(strcmp( Machine->gamedrv->name, "gdarius2" ) == 0 ) + if(strcmp( machine->gamedrv->name, "gdarius2" ) == 0 ) { if (psxreadbyte(0x16be3b) == 0) { psxwritebyte(0x16be3b, 1); } } - if(strcmp( Machine->gamedrv->name, "ftimpcta" ) == 0 ) + if(strcmp( machine->gamedrv->name, "ftimpcta" ) == 0 ) { if (psxreadbyte(0x0f8997) == 0) { psxwritebyte(0x0f8997, 1); } } - if(strcmp( Machine->gamedrv->name, "ftimpact" ) == 0 ) /* WRONG!!!- Copied from ftimpcta */ + if(strcmp( machine->gamedrv->name, "ftimpact" ) == 0 ) /* WRONG!!!- Copied from ftimpcta */ { if (psxreadbyte(0x0f8997) == 0) /* WRONG!!!- Copied from ftimpcta */ { psxwritebyte(0x0f8997, 1); /* WRONG!!!- Copied from ftimpcta */ } } - psx_vblank(); + psx_vblank(machine, cpunum); } static WRITE8_HANDLER( fx1a_sound_bankswitch_w ) @@ -2652,7 +2652,7 @@ static MACHINE_RESET( coh1002v ) static INTERRUPT_GEN( coh1002v_vblank ) { /* kludge: to stop dropping into test mode on bootup */ - if(strcmp( Machine->gamedrv->name, "sncwgltd" ) == 0 ) + if(strcmp( machine->gamedrv->name, "sncwgltd" ) == 0 ) { if (psxreadbyte(0x0db422) == 0) { @@ -2663,7 +2663,7 @@ static INTERRUPT_GEN( coh1002v_vblank ) psxwritebyte(0x0db423, 1); } } - psx_vblank(); + psx_vblank(machine, cpunum); } static MACHINE_DRIVER_START( coh1002v ) diff --git a/src/mame/includes/atari.h b/src/mame/includes/atari.h index 98fac97c203..523656ba854 100644 --- a/src/mame/includes/atari.h +++ b/src/mame/includes/atari.h @@ -652,10 +652,10 @@ extern int atari_frame_counter; extern VIDEO_START( atari ); extern VIDEO_UPDATE( atari ); -void a400_interrupt(void); -void a800_interrupt(void); -void a800xl_interrupt(void); -void a5200_interrupt(void); +INTERRUPT_GEN( a400_interrupt ); +INTERRUPT_GEN( a800_interrupt ); +INTERRUPT_GEN( a800xl_interrupt ); +INTERRUPT_GEN( a5200_interrupt ); /*----------- defined in drivers/maxaflex.c -----------*/ diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c index a5854c89adb..2dc3c6fd27c 100644 --- a/src/mame/machine/amiga.c +++ b/src/mame/machine/amiga.c @@ -357,7 +357,7 @@ MACHINE_RESET( amiga ) INTERRUPT_GEN( amiga_scanline_callback ) { - int scanline = Machine->screen[0].height - 1 - cpu_getiloops(); + int scanline = machine->screen[0].height - 1 - cpu_getiloops(); /* on the first scanline, we do some extra bookkeeping */ if (scanline == 0) diff --git a/src/mame/machine/atarigen.c b/src/mame/machine/atarigen.c index 5265648620f..e46303151dd 100644 --- a/src/mame/machine/atarigen.c +++ b/src/mame/machine/atarigen.c @@ -271,7 +271,7 @@ WRITE32_HANDLER( atarigen_video_int_ack32_w ) static TIMER_CALLBACK( scanline_interrupt_callback ) { /* generate the interrupt */ - atarigen_scanline_int_gen(); + atarigen_scanline_int_gen(machine, 0); /* set a new timer to go off at the same scan line next frame */ timer_adjust(scanline_interrupt_timer, video_screen_get_frame_period(param), param, attotime_zero); @@ -774,7 +774,7 @@ static TIMER_CALLBACK( delayed_6502_sound_w ) /* set up the states and signal the sound interrupt to the main CPU */ atarigen_sound_to_cpu = param; atarigen_sound_to_cpu_ready = 1; - atarigen_sound_int_gen(); + atarigen_sound_int_gen(machine, 0); } diff --git a/src/mame/video/atari.c b/src/mame/video/atari.c index e64c5eae368..5bf9158a1c6 100644 --- a/src/mame/video/atari.c +++ b/src/mame/video/atari.c @@ -1541,22 +1541,22 @@ static void generic_atari_interrupt(void (*handle_keyboard)(void), int button_co -void a400_interrupt(void) +INTERRUPT_GEN( a400_interrupt ) { generic_atari_interrupt(a800_handle_keyboard, 4); } -void a800_interrupt(void) +INTERRUPT_GEN( a800_interrupt ) { generic_atari_interrupt(a800_handle_keyboard, 4); } -void a800xl_interrupt(void) +INTERRUPT_GEN( a800xl_interrupt ) { generic_atari_interrupt(a800_handle_keyboard, 2); } -void a5200_interrupt(void) +INTERRUPT_GEN( a5200_interrupt ) { generic_atari_interrupt(a5200_handle_keypads, 4); } diff --git a/src/mame/video/atarisy1.c b/src/mame/video/atarisy1.c index 561dfe08d5e..b7967375c06 100644 --- a/src/mame/video/atarisy1.c +++ b/src/mame/video/atarisy1.c @@ -415,7 +415,7 @@ static TIMER_CALLBACK( int3_callback ) int scanline = param; /* update the state */ - atarigen_scanline_int_gen(); + atarigen_scanline_int_gen(machine, 0); /* set a timer to turn it off */ timer_adjust(int3off_timer, video_screen_get_scan_period(0), 0, attotime_zero); diff --git a/src/mame/video/blstroid.c b/src/mame/video/blstroid.c index fb9f7289310..2addc2cdea0 100644 --- a/src/mame/video/blstroid.c +++ b/src/mame/video/blstroid.c @@ -106,7 +106,7 @@ static TIMER_CALLBACK( irq_off ) static TIMER_CALLBACK( irq_on ) { /* generate the interrupt */ - atarigen_scanline_int_gen(); + atarigen_scanline_int_gen(machine, 0); atarigen_update_interrupts(); } diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c index f41b45f7dcb..a15c411dfae 100644 --- a/src/mame/video/dkong.c +++ b/src/mame/video/dkong.c @@ -200,7 +200,7 @@ static const res_net_info radarscp_grid_net_info = PALETTE_INIT( dkong2b) { - dkong_state *state = Machine->driver_data; + dkong_state *state = machine->driver_data; rgb_t *rgb; int i; @@ -229,7 +229,7 @@ PALETTE_INIT( dkong2b) PALETTE_INIT( dkong4b ) { - dkong_state *state = Machine->driver_data; + dkong_state *state = machine->driver_data; int i; int r,g,b; @@ -267,7 +267,7 @@ PALETTE_INIT( dkong4b ) PALETTE_INIT( radarscp ) { - dkong_state *state = Machine->driver_data; + dkong_state *state = machine->driver_data; int i; int r,g,b; @@ -331,7 +331,7 @@ PALETTE_INIT( radarscp ) PALETTE_INIT( radarsc1 ) { - dkong_state *state = Machine->driver_data; + dkong_state *state = machine->driver_data; int i; int r,g,b; @@ -431,7 +431,7 @@ PALETTE_INIT( radarsc1 ) PALETTE_INIT( dkong3 ) { - dkong_state *state = Machine->driver_data; + dkong_state *state = machine->driver_data; rgb_t *rgb; rgb = compute_res_net_all(color_prom, &dkong3_decode_info, &dkong3_net_info); diff --git a/src/mame/video/exidy.c b/src/mame/video/exidy.c index 95cde1ac4b0..c75e8bef7e6 100644 --- a/src/mame/video/exidy.c +++ b/src/mame/video/exidy.c @@ -93,7 +93,7 @@ INTERRUPT_GEN( teetert_vblank_interrupt ) { /* standard stuff */ if (cpu_getiloops() == 0) - exidy_vblank_interrupt(); + exidy_vblank_interrupt(machine, cpunum); /* plus a pulse on the NMI line */ cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); diff --git a/src/mame/video/gyruss.c b/src/mame/video/gyruss.c index 7018f8b86df..ca64c2cb97d 100644 --- a/src/mame/video/gyruss.c +++ b/src/mame/video/gyruss.c @@ -214,5 +214,5 @@ INTERRUPT_GEN( gyruss_6809_interrupt ) memcpy(sprite_mux_buffer + scanline * spriteram_size,spriteram,spriteram_size); if (scanline == 255) - irq0_line_hold(); + irq0_line_hold(machine, cpunum); } diff --git a/src/mame/video/segag80r.c b/src/mame/video/segag80r.c index 4004faf1419..5cfb5e401e7 100644 --- a/src/mame/video/segag80r.c +++ b/src/mame/video/segag80r.c @@ -66,7 +66,7 @@ INTERRUPT_GEN( segag80r_vblank_start ) /* if interrupts are enabled, clock one */ if (video_control & 0x04) - irq0_line_hold(); + irq0_line_hold(machine, cpunum); } @@ -77,7 +77,7 @@ INTERRUPT_GEN( sindbadm_vblank_start ) /* interrupts appear to always be enabled, but they have a manual */ /* acknowledge rather than an automatic ack; they are also not masked */ /* by bit 2 of video_control like a standard G80 */ - irq0_line_assert(); + irq0_line_assert(machine, cpunum); } diff --git a/src/mame/video/timeplt.c b/src/mame/video/timeplt.c index aa0fd21ce8c..7d9b9d5ca74 100644 --- a/src/mame/video/timeplt.c +++ b/src/mame/video/timeplt.c @@ -220,5 +220,5 @@ INTERRUPT_GEN( timeplt_interrupt ) memcpy(sprite_mux_buffer_2 + scanline * spriteram_size,spriteram_2,spriteram_size); if (scanline == 255) - nmi_line_pulse(); + nmi_line_pulse(machine, cpunum); } diff --git a/src/mame/video/tp84.c b/src/mame/video/tp84.c index 5e543c96634..d8f1aa39259 100644 --- a/src/mame/video/tp84.c +++ b/src/mame/video/tp84.c @@ -285,5 +285,5 @@ INTERRUPT_GEN( tp84_6809_interrupt ) memcpy(sprite_mux_buffer + scanline * spriteram_size,spriteram,spriteram_size); if (scanline == 255) - irq0_line_hold(); + irq0_line_hold(machine, cpunum); } diff --git a/src/mame/video/vindictr.c b/src/mame/video/vindictr.c index 1c69805b485..c13cd5e52a0 100644 --- a/src/mame/video/vindictr.c +++ b/src/mame/video/vindictr.c @@ -191,7 +191,7 @@ void vindictr_scanline_update(running_machine *machine, int scrnum, int scanline break; case 6: /* /VIRQ */ - atarigen_scanline_int_gen(); + atarigen_scanline_int_gen(machine, 0); break; case 7: /* /PFVS */ diff --git a/src/mame/video/ygv608.c b/src/mame/video/ygv608.c index 10e3f176345..a006911550c 100644 --- a/src/mame/video/ygv608.c +++ b/src/mame/video/ygv608.c @@ -76,10 +76,10 @@ INTERRUPT_GEN( ygv608_timed_interrupt ) /* once every 60Hz, set the vertical border interval start flag */ if( ( timer % (1000/60) ) == 0 ) - { + { ygv608.ports.s.p6 |= p6_fv; if (ygv608.regs.s.r14 & r14_iev) - irq2_line_hold(); + irq2_line_hold(machine, cpunum); } /* once every 60Hz, set the position detection flag (somewhere) */ @@ -87,7 +87,7 @@ INTERRUPT_GEN( ygv608_timed_interrupt ) { ygv608.ports.s.p6 |= p6_fp; if (ygv608.regs.s.r14 & r14_iep) - irq2_line_hold(); + irq2_line_hold(machine, cpunum); } } |