ZXHawk: Reset disk overrun detection counter on successful read (fixes IronLord.dsk) - #1158
This commit is contained in:
parent
ab9fb5c4e5
commit
183983043a
|
@ -2415,6 +2415,8 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
|||
switch (ActivePhase)
|
||||
{
|
||||
case Phase.Execution:
|
||||
// reset overrun counter
|
||||
OverrunCounter = 0;
|
||||
|
||||
// execute read
|
||||
ActiveCommand.CommandDelegate();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||
|
@ -23,6 +24,12 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
|||
public string outputString = "STATUS,WRITE,READ,CODE,MT,MF,SK,CMDCNT,RESCNT,EXECCNT,EXECLEN\r\n";
|
||||
public bool writeDebug = false;
|
||||
|
||||
public List<string> dLog = new List<string>
|
||||
{
|
||||
"STATUS,WRITE,READ,CODE,MT,MF,SK,CMDCNT,RESCNT,EXECCNT,EXECLEN"
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Status read
|
||||
* Data write
|
||||
|
@ -56,9 +63,10 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
|||
sb.Append(ExecCounter).Append(",");
|
||||
sb.Append(ExecLength);
|
||||
|
||||
sb.Append("\r\n");
|
||||
//sb.Append("\r\n");
|
||||
|
||||
outputString += sb.ToString();
|
||||
//outputString += sb.ToString();
|
||||
dLog.Add(sb.ToString());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -203,9 +203,12 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
|||
{
|
||||
// only write UPD log every second
|
||||
if (FrameCount % 10 == 0)
|
||||
System.IO.File.WriteAllText(UPDDiskDevice.outputfile, UPDDiskDevice.outputString);
|
||||
}
|
||||
|
||||
{
|
||||
System.IO.File.AppendAllLines(UPDDiskDevice.outputfile, UPDDiskDevice.dLog);
|
||||
UPDDiskDevice.dLog = new System.Collections.Generic.List<string>();
|
||||
//System.IO.File.WriteAllText(UPDDiskDevice.outputfile, UPDDiskDevice.outputString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue