mirror of
https://github.com/holub/mame
synced 2025-05-23 14:19:01 +03:00
Fixed a number of regressions due to recent 68000 IRQ changes.
This commit is contained in:
parent
e348c244aa
commit
d707ec622e
@ -129,6 +129,12 @@ static WRITE16_HANDLER( control_w )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_CALLBACK( irq_off )
|
||||
{
|
||||
hack_irq = 0;
|
||||
update_irq_state(machine);
|
||||
}
|
||||
|
||||
static READ16_HANDLER( ultennis_hack_r )
|
||||
{
|
||||
/* IRQ5 points to: jsr (a5); rte */
|
||||
@ -136,8 +142,7 @@ static READ16_HANDLER( ultennis_hack_r )
|
||||
{
|
||||
hack_irq = 1;
|
||||
update_irq_state(machine);
|
||||
hack_irq = 0;
|
||||
update_irq_state(machine);
|
||||
timer_set(ATTOTIME_IN_USEC(1), NULL, 0, irq_off);
|
||||
}
|
||||
return input_port_read(machine, "300000");
|
||||
}
|
||||
|
@ -1896,8 +1896,8 @@ static INTERRUPT_GEN( interrupt_scudhamm )
|
||||
{
|
||||
switch ( cpu_getiloops() )
|
||||
{
|
||||
case 0: cpunum_set_input_line(machine, 0, 3, PULSE_LINE); // update palette, layers etc. Not the sprites.
|
||||
case 14: cpunum_set_input_line(machine, 0, 2, PULSE_LINE); // "real" vblank. It just sets a flag that
|
||||
case 0: cpunum_set_input_line(machine, 0, 3, HOLD_LINE); // update palette, layers etc. Not the sprites.
|
||||
case 14: cpunum_set_input_line(machine, 0, 2, HOLD_LINE); // "real" vblank. It just sets a flag that
|
||||
// the main loop polls before updating the sprites.
|
||||
}
|
||||
}
|
||||
@ -1949,8 +1949,8 @@ static INTERRUPT_GEN( interrupt_armchmp2)
|
||||
{
|
||||
switch ( cpu_getiloops() )
|
||||
{
|
||||
case 0: cpunum_set_input_line(machine, 0, 4, PULSE_LINE);
|
||||
case 14: cpunum_set_input_line(machine, 0, 2, PULSE_LINE);
|
||||
case 0: cpunum_set_input_line(machine, 0, 4, HOLD_LINE);
|
||||
case 14: cpunum_set_input_line(machine, 0, 2, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -425,23 +425,31 @@ static const ym3812_interface fuuki16_ym3812_intf =
|
||||
also used for water effects and titlescreen linescroll on gogomile
|
||||
*/
|
||||
|
||||
static TIMER_CALLBACK( irq_off )
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, param, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( level_1_interrupt_callback )
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, 1, PULSE_LINE);
|
||||
cpunum_set_input_line(machine, 0, 1, ASSERT_LINE);
|
||||
timer_set(ATTOTIME_IN_USEC(1), NULL, 1, irq_off);
|
||||
timer_set(video_screen_get_time_until_pos(machine->primary_screen, 248, 0), NULL, 0, level_1_interrupt_callback);
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( vblank_interrupt_callback )
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, 3, PULSE_LINE); // VBlank IRQ
|
||||
cpunum_set_input_line(machine, 0, 3, ASSERT_LINE); // VBlank IRQ
|
||||
timer_set(ATTOTIME_IN_USEC(1), NULL, 3, irq_off);
|
||||
timer_set(video_screen_get_time_until_vblank_start(machine->primary_screen), NULL, 0, vblank_interrupt_callback);
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( raster_interrupt_callback )
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, 5, PULSE_LINE); // Raster Line IRQ
|
||||
cpunum_set_input_line(machine, 0, 5, ASSERT_LINE); // Raster Line IRQ
|
||||
timer_set(ATTOTIME_IN_USEC(1), NULL, 5, irq_off);
|
||||
video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
|
||||
timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_frame_period(machine->primary_screen), 0);
|
||||
}
|
||||
|
@ -543,23 +543,31 @@ GFXDECODE_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static TIMER_CALLBACK( irq_off )
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, param, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( level_1_interrupt_callback )
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, 1, PULSE_LINE);
|
||||
cpunum_set_input_line(machine, 0, 1, ASSERT_LINE);
|
||||
timer_set(ATTOTIME_IN_USEC(1), NULL, 1, irq_off);
|
||||
timer_set(video_screen_get_time_until_pos(machine->primary_screen, 248, 0), NULL, 0, level_1_interrupt_callback);
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( vblank_interrupt_callback )
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, 3, PULSE_LINE); // VBlank IRQ
|
||||
cpunum_set_input_line(machine, 0, 3, ASSERT_LINE); // VBlank IRQ
|
||||
timer_set(ATTOTIME_IN_USEC(1), NULL, 3, irq_off);
|
||||
timer_set(video_screen_get_time_until_vblank_start(machine->primary_screen), NULL, 0, vblank_interrupt_callback);
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( raster_interrupt_callback )
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, 5, PULSE_LINE); // Raster Line IRQ
|
||||
cpunum_set_input_line(machine, 0, 5, ASSERT_LINE); // Raster Line IRQ
|
||||
timer_set(ATTOTIME_IN_USEC(1), NULL, 5, irq_off);
|
||||
video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
|
||||
timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_frame_period(machine->primary_screen), 0);
|
||||
}
|
||||
|
@ -1151,12 +1151,16 @@ ROM_START( hangplt )
|
||||
ROM_LOAD32_WORD( "685a14.12w", 0x000000, 0x400000, CRC(87437739) SHA1(0d45637af40938a54d5efd29c125b0fafd55f9a4) )
|
||||
ROM_END
|
||||
|
||||
static TIMER_CALLBACK( irq_off )
|
||||
{
|
||||
cpunum_set_input_line(machine, 1, param, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static void sound_irq_callback(running_machine *machine, int irq)
|
||||
{
|
||||
if (irq == 0)
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ1, PULSE_LINE);
|
||||
else
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ2, PULSE_LINE);
|
||||
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
|
||||
cpunum_set_input_line(machine, 1, line, ASSERT_LINE);
|
||||
timer_set(ATTOTIME_IN_USEC(1), NULL, line, irq_off);
|
||||
}
|
||||
|
||||
static DRIVER_INIT(gticlub)
|
||||
|
@ -567,11 +567,17 @@ void itech8_update_interrupts(running_machine *machine, int periodic, int tms340
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_CALLBACK( irq_off )
|
||||
{
|
||||
itech8_update_interrupts(machine, 0, -1, -1);
|
||||
}
|
||||
|
||||
|
||||
static INTERRUPT_GEN( generate_nmi )
|
||||
{
|
||||
/* signal the NMI */
|
||||
itech8_update_interrupts(machine, 1, -1, -1);
|
||||
itech8_update_interrupts(machine, 0, -1, -1);
|
||||
timer_set(ATTOTIME_IN_USEC(1), NULL, 0, irq_off);
|
||||
|
||||
if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", video_screen_get_vpos(machine->primary_screen));
|
||||
}
|
||||
|
@ -812,7 +812,7 @@ static INPUT_PORTS_START( bigappg )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("IN3")
|
||||
PORT_START("DSW")
|
||||
PORT_DIPNAME( 0x01, 0x01, "4" )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -858,7 +858,7 @@ static const ppi8255_interface ppi8255_intf[2] =
|
||||
NULL /* Port C write */
|
||||
},
|
||||
{
|
||||
DEVICE8_PORT("IN3"), /* Port A read */
|
||||
DEVICE8_PORT("DSW"), /* Port A read */
|
||||
NULL, /* Port B read */
|
||||
NULL, /* Port C read */
|
||||
NULL, /* Port A write */
|
||||
|
@ -1728,8 +1728,10 @@ static void scsp_irq(running_machine *machine, int irq)
|
||||
if (irq > 0)
|
||||
{
|
||||
scsp_last_line = irq;
|
||||
cpunum_set_input_line(machine, 1, irq, PULSE_LINE);
|
||||
cpunum_set_input_line(machine, 1, irq, ASSERT_LINE);
|
||||
}
|
||||
else
|
||||
cpunum_set_input_line(machine, 1, -irq, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const scsp_interface scsp_config =
|
||||
|
@ -4269,8 +4269,10 @@ static void scsp_irq(running_machine *machine, int irq)
|
||||
if (irq > 0)
|
||||
{
|
||||
scsp_last_line = irq;
|
||||
cpunum_set_input_line(machine, 1, irq, PULSE_LINE);
|
||||
cpunum_set_input_line(machine, 1, irq, ASSERT_LINE);
|
||||
}
|
||||
else
|
||||
cpunum_set_input_line(machine, 1, -irq, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const scsp_interface scsp_config =
|
||||
|
@ -830,12 +830,16 @@ MACHINE_DRIVER_END
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static TIMER_CALLBACK( irq_off )
|
||||
{
|
||||
cpunum_set_input_line(machine, 1, param, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static void sound_irq_callback(running_machine *machine, int irq)
|
||||
{
|
||||
if (irq == 0)
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ1, PULSE_LINE);
|
||||
else
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ2, PULSE_LINE);
|
||||
int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
|
||||
cpunum_set_input_line(machine, 1, line, ASSERT_LINE);
|
||||
timer_set(ATTOTIME_IN_USEC(1), NULL, line, irq_off);
|
||||
}
|
||||
|
||||
static void init_zr107(running_machine *machine)
|
||||
|
Loading…
Reference in New Issue
Block a user