(From AtariAce)

Added machine and cpunum parameters to INTERRUPT_GEN callbacks.
Fixed several places that were not using INTERRUPT_GEN or OPBASE_HANDLER macros.
This commit is contained in:
Aaron Giles 2008-01-08 03:05:19 +00:00
parent f57292b93c
commit 990bc873d6
69 changed files with 151 additions and 154 deletions

View File

@ -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();
}
}

View File

@ -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;

View File

@ -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)

View File

@ -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); }

View File

@ -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;

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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];
}
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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 */

View File

@ -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;

View File

@ -307,7 +307,7 @@ static MACHINE_RESET( dlair )
*
*************************************/
static void vblank_callback(void)
static INTERRUPT_GEN( vblank_callback )
{
/* update the laserdisc */
laserdisc_vsync(discinfo);

View File

@ -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 */

View File

@ -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);
}

View File

@ -285,7 +285,7 @@ static INTERRUPT_GEN( main_interrupt )
{
/* generate coin interrupts */
handle_coins();
exidy440_vblank_interrupt();
exidy440_vblank_interrupt(machine, cpunum);
}

View File

@ -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;

View File

@ -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 )

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -732,7 +732,7 @@ static INTERRUPT_GEN(konamigx_hbinterrupt)
{
if (!cpu_getiloops())
{
konamigx_vbinterrupt_type4();
konamigx_vbinterrupt_type4(machine, cpunum);
}
else // hblank
{

View File

@ -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);
}
/*

View File

@ -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);
}

View File

@ -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);

View File

@ -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) )
{

View File

@ -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);
}

View File

@ -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;

View File

@ -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 */

View File

@ -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);

View File

@ -219,7 +219,7 @@ static INTERRUPT_GEN( mystston_interrupt )
if (coin == 0)
{
coin = 1;
nmi_line_pulse();
nmi_line_pulse(machine, cpunum);
return;
}
}

View File

@ -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 )
{

View File

@ -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);
}
}
}

View File

@ -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 )

View File

@ -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 )

View File

@ -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");
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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;

View File

@ -50,7 +50,7 @@ static void update_interrupts(void)
static TIMER_CALLBACK( irq_gen )
{
atarigen_scanline_int_gen();
atarigen_scanline_int_gen(machine, 0);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);

View File

@ -138,7 +138,7 @@ GFXDECODE_END
static INTERRUPT_GEN( trucocl_interrupt )
{
irq0_line_hold();
irq0_line_hold(machine, cpunum);
}
static MACHINE_DRIVER_START( trucocl )

View File

@ -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 */

View File

@ -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;
// }

View File

@ -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 )

View File

@ -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 -----------*/

View File

@ -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)

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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();
}

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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 */

View File

@ -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);
}
}