Fix vector handling in Z80 core.

Remove hack in Seibu Sound (Fixes tempo in Raiden)
[IQ_132 & Dink]
This commit is contained in:
iq_132 2014-08-16 15:47:18 +00:00
parent 70405078bb
commit 5b77a05905
2 changed files with 5 additions and 8 deletions

View File

@ -83,10 +83,8 @@ static void update_irq_lines(INT32 param)
if ((irq1 & irq2) == 0xff) {
ZetSetIRQLine(0, ZET_IRQSTATUS_NONE);
} else {
if (irq2 == 0xdf) {
ZetSetVector(irq1 & irq2);
ZetSetIRQLine(0, ZET_IRQSTATUS_ACK);
}
ZetSetVector(irq1 & irq2);
ZetSetIRQLine(0, ZET_IRQSTATUS_ACK);
}
}

View File

@ -109,7 +109,7 @@ static Z80WriteProgHandler Z80ProgramWrite;
static Z80ReadOpHandler Z80CPUReadOp;
static Z80ReadOpArgHandler Z80CPUReadOpArg;
unsigned char Z80Vector = 0;
unsigned char Z80Vector = 0xff;
#define VERBOSE 0
@ -3306,7 +3306,6 @@ OP(op,ff) { RST(0x38); } /* RST 7 */
static void take_interrupt(void)
{
int irq_vector = Z80Vector;
Z80Vector = 0;
/* there isn't a valid previous program counter */
PRVPC = (UINT32)-1;
@ -3791,8 +3790,6 @@ static void z80_init(int index, int clock, const void *config, int (*irqcallback
Z80.irq_callback = irqcallback;
IX = IY = 0xffff; /* IX and IY are FFFF after a reset! */
F = ZF; /* Zero flag is set */
Z80Vector = 0;
}
/****************************************************************************
@ -3809,6 +3806,8 @@ static void z80_reset(void)
Z80.irq_state = Z80_CLEAR_LINE;
Z80.after_ei = FALSE;
Z80Vector = 0xff; // Correct to reset this to 0xff?
if (Z80.daisy)
z80daisy_reset(Z80.daisy);