ZXHawk: Finally (hopefully) resolved all tape trap issues
This commit is contained in:
parent
be253911c6
commit
bdbfc3fb4e
|
@ -700,7 +700,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
_machine.Spectrum.OSD_TapePlayingAuto();
|
_machine.Spectrum.OSD_TapePlayingAuto();
|
||||||
}
|
}
|
||||||
|
|
||||||
_monitorTimeOut = 250;
|
_monitorTimeOut = 50;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -747,17 +747,20 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
|
|
||||||
if (_monitorTimeOut < 0)
|
if (_monitorTimeOut < 0)
|
||||||
{
|
{
|
||||||
// does not work properly - disabled for now (handled elsewhere)
|
AutoStopTape();
|
||||||
|
return;
|
||||||
//Stop();
|
|
||||||
//_machine.Spectrum.OSD_TapeStoppedAuto();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fallback in case usual monitor detection methods do not work
|
||||||
|
|
||||||
// number of t-states since last IN operation
|
// number of t-states since last IN operation
|
||||||
long diff = _machine.CPU.TotalExecutedCycles - _lastINCycle;
|
long diff = _machine.CPU.TotalExecutedCycles - _lastINCycle;
|
||||||
|
|
||||||
|
// get current datablock
|
||||||
|
var block = DataBlocks[_currentDataBlockIndex];
|
||||||
|
|
||||||
// pause in ms at the end of the current block
|
// pause in ms at the end of the current block
|
||||||
int blockPause = DataBlocks[_currentDataBlockIndex].PauseInMS;
|
int blockPause = block.PauseInMS;
|
||||||
|
|
||||||
// timeout in t-states (equiv. to blockpause)
|
// timeout in t-states (equiv. to blockpause)
|
||||||
int timeout = ((_machine.ULADevice.FrameLength * 50) / 1000) * blockPause;
|
int timeout = ((_machine.ULADevice.FrameLength * 50) / 1000) * blockPause;
|
||||||
|
@ -772,8 +775,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
// Autostop the tape
|
// Autostop the tape
|
||||||
AutoStopTape();
|
AutoStopTape();
|
||||||
_lastCycle = _cpu.TotalExecutedCycles;
|
_lastCycle = _cpu.TotalExecutedCycles;
|
||||||
|
|
||||||
//MonitorReset();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue