PCE-CD: hook up client drive LED api

This commit is contained in:
beirich 2012-11-26 02:15:21 +00:00
parent 849228fbb4
commit 2441acd38b
2 changed files with 8 additions and 3 deletions

View File

@ -74,12 +74,13 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
{
systemid = "PCECD";
CoreOutputComm = new CoreOutputComm();
CoreOutputComm.CpuTraceAvailable = true;
CoreOutputComm.UsesDriveLed = true;
Type = NecSystemType.TurboCD;
this.disc = disc;
Init(game, rom);
// the default RomStatusDetails don't do anything with Disc
CoreOutputComm.RomStatusDetails = string.Format(
"{0}\r\nDisk partial hash:{1}", game.Name, disc.GetHash());
CoreOutputComm.RomStatusDetails = string.Format("{0}\r\nDisk partial hash:{1}", game.Name, disc.GetHash());
}
void Init(GameInfo game, byte[] rom)
@ -243,6 +244,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
public void FrameAdvance(bool render, bool rendersound)
{
lagged = true;
CoreOutputComm.DriveLED = false;
Controller.UpdateControls(Frame++);
PSG.BeginFrame(Cpu.TotalExecutedCycles);

View File

@ -162,9 +162,12 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
ResetDevice();
return;
}
if (DataReadInProgress && pce.Cpu.TotalExecutedCycles > DataReadWaitTimer)
{
if (SectorsLeftToRead > 0)
pce.CoreOutputComm.DriveLED = true;
if (DataIn.Count == 0)
{
// read in a sector and shove it in the queue