fixed subcode stuff and a stupid bug in CDAudio.cs

This commit is contained in:
beirich 2011-08-15 04:22:54 +00:00
parent 019ad69459
commit cd65961b53
2 changed files with 4 additions and 8 deletions

View File

@ -497,8 +497,7 @@ throw new Exception("requesting 0 sectors read.............................");
private void CommandReadSubcodeQ()
{
//TODO VECNA - i changed this for you but maybe i did it wrong
var sectorEntry = disc.ReadSectorEntry(CurrentReadingSector);
var sectorEntry = disc.ReadSectorEntry(pce.CDAudio.CurrentSector);
DataIn.Clear();
@ -510,10 +509,7 @@ throw new Exception("requesting 0 sectors read.............................");
}
DataIn.Enqueue(sectorEntry.q_status); // unused?
//DataIn.Enqueue((byte)pce.CDAudio.PlayingTrack); // track //vecna's
DataIn.Enqueue(sectorEntry.q_tno.BCDValue); // track //zero's
DataIn.Enqueue(sectorEntry.q_tno.BCDValue); // track
DataIn.Enqueue(sectorEntry.q_index.BCDValue); // index
DataIn.Enqueue(sectorEntry.q_min.BCDValue); // M(rel)
DataIn.Enqueue(sectorEntry.q_sec.BCDValue); // S(rel)

View File

@ -36,7 +36,7 @@ namespace BizHawk.Emulation.Sound
public int StartLBA, EndLBA;
public int PlayingTrack;
private int CurrentSector, SectorOffset; // Offset is in SAMPLES, not bytes. Sector is 588 samples long.
public int CurrentSector, SectorOffset; // Offset is in SAMPLES, not bytes. Sector is 588 samples long.
private int CachedSector;
private byte[] SectorCache = new byte[2352];
@ -74,7 +74,7 @@ namespace BizHawk.Emulation.Sound
if (lba >= trackStart && lba < trackEnd)
{
foundTrack = true;
StartLBA = trackStart;
StartLBA = lba;
EndLBA = trackEnd;
break;
}