Clear pending IRQ if the IRQ enable flag is disabled in the SNES driver [Angelo Salese]

This commit is contained in:
Angelo Salese 2010-04-02 17:56:30 +00:00
parent a5a7c90161
commit a5aaebdd88

View File

@ -556,6 +556,12 @@ WRITE8_HANDLER( snes_w_io )
}
break;
case NMITIMEN: /* Flag for v-blank, timer int. and joy read */
if((snes_ram[NMITIMEN] & 0x30) == 0x00)
{
cpu_set_input_line(state->maincpu, G65816_LINE_IRQ, CLEAR_LINE );
snes_ram[TIMEUP] = 0; // flag is cleared on both read and write
}
break;
case OLDJOY2: /* Old NES joystick support */
break;
case WRIO: /* Programmable I/O port - latches H/V counters on a 0->1 transition */