v60, fix v60RunEnd()

This commit is contained in:
dinkc64 2021-02-21 00:11:39 -05:00
parent e4e60dc539
commit 370b4b517a

View File

@ -523,6 +523,7 @@ static struct v60info {
UINT32 current_cycles;
UINT32 cycles;
INT32 stall_io;
INT32 end_run;
} v60;
@ -1012,12 +1013,14 @@ INT32 v60Run(int cycles)
{
UINT32 inc;
v60.end_run = 0;
v60.cycles = cycles;
v60_ICount = cycles;
if(v60.irq_line != CLEAR_LINE)
v60_try_irq();
while(v60_ICount >= 0) {
do {
v60.PPC = PC;
// CALL_MAME_DEBUG;
v60_ICount -= 8; /* fix me -- this is just an average */
@ -1025,7 +1028,7 @@ INT32 v60Run(int cycles)
PC += inc;
if(v60.irq_line != CLEAR_LINE)
v60_try_irq();
}
} while (v60_ICount > 0 && !v60.end_run);
cycles = cycles - v60_ICount;
@ -1039,13 +1042,7 @@ INT32 v60Run(int cycles)
void v60SetIRQLine(INT32 irqline, INT32 state)
{
if (state == CPU_IRQSTATUS_AUTO) {
// INT32 tmp0 = v60.current_cycles;
// INT32 tmp1 = v60.cycles;
set_irq_line(irqline,1);
v60Run(100);
// if (tmp1) tmp1 -= 100;
set_irq_line(irqline,0);
v60Run(100);
bprintf(0, _T("v60SetIRQLine(): there is no _AUTO !\n"));
}
else
{
@ -1060,7 +1057,7 @@ INT32 v60TotalCycles()
void v60RunEnd()
{
v60_ICount = 0;
v60.end_run = 1;
}
INT32 v60Idle(INT32 cycles)