This commit is contained in:
ekeeke31 2007-08-21 21:00:54 +00:00
parent 16cdbc33d2
commit 0f863ec61b
2 changed files with 8 additions and 1 deletions

View File

@ -50,6 +50,7 @@ void m68k_run (int cyc)
/* interrupt handling */
if (vint_pending && (reg[1] & 0x20)) m68k_set_irq(6);
else if (hint_pending && (reg[0] & 0x10)) m68k_set_irq(4);
else m68k_set_irq(0);
if (cyc_do > 0) m68k_execute(cyc_do);
count_m68k += cyc_do;
vint_pending = 0;

View File

@ -469,10 +469,17 @@ void vdp_reg_w (uint8 r, uint8 d)
switch (r)
{
case 0x00: /* CTRL #1 */
/* update IRQ level */
if (!vint_pending && !(d & 0x10)) m68k_set_irq(0);
/* latch HVC */
if (!(d & 0x02)) hc_latch = -1;
break;
case 0x01: /* CTRL #2 */
/* update IRQ level */
if (!hint_pending && !(d & 0x20)) m68k_set_irq(0);
/* Change the frame timing */
frame_end = (d & 8) ? 0xF0 : 0xE0;
@ -590,6 +597,5 @@ int vdp_int_ack_callback (int int_level)
{
if (vint_pending) vint_pending = 0;
else hint_pending = 0;
if (!hint_pending && !vint_pending) m68k_set_irq(0);
return M68K_INT_ACK_AUTOVECTOR;
}