fixed subcode stuff and a stupid bug in CDAudio.cs
This commit is contained in:
parent
019ad69459
commit
cd65961b53
|
@ -497,8 +497,7 @@ throw new Exception("requesting 0 sectors read.............................");
|
||||||
private void CommandReadSubcodeQ()
|
private void CommandReadSubcodeQ()
|
||||||
{
|
{
|
||||||
//TODO VECNA - i changed this for you but maybe i did it wrong
|
//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();
|
DataIn.Clear();
|
||||||
|
|
||||||
|
@ -510,10 +509,7 @@ throw new Exception("requesting 0 sectors read.............................");
|
||||||
}
|
}
|
||||||
|
|
||||||
DataIn.Enqueue(sectorEntry.q_status); // unused?
|
DataIn.Enqueue(sectorEntry.q_status); // unused?
|
||||||
|
DataIn.Enqueue(sectorEntry.q_tno.BCDValue); // track
|
||||||
//DataIn.Enqueue((byte)pce.CDAudio.PlayingTrack); // track //vecna's
|
|
||||||
DataIn.Enqueue(sectorEntry.q_tno.BCDValue); // track //zero's
|
|
||||||
|
|
||||||
DataIn.Enqueue(sectorEntry.q_index.BCDValue); // index
|
DataIn.Enqueue(sectorEntry.q_index.BCDValue); // index
|
||||||
DataIn.Enqueue(sectorEntry.q_min.BCDValue); // M(rel)
|
DataIn.Enqueue(sectorEntry.q_min.BCDValue); // M(rel)
|
||||||
DataIn.Enqueue(sectorEntry.q_sec.BCDValue); // S(rel)
|
DataIn.Enqueue(sectorEntry.q_sec.BCDValue); // S(rel)
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace BizHawk.Emulation.Sound
|
||||||
public int StartLBA, EndLBA;
|
public int StartLBA, EndLBA;
|
||||||
public int PlayingTrack;
|
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 int CachedSector;
|
||||||
private byte[] SectorCache = new byte[2352];
|
private byte[] SectorCache = new byte[2352];
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ namespace BizHawk.Emulation.Sound
|
||||||
if (lba >= trackStart && lba < trackEnd)
|
if (lba >= trackStart && lba < trackEnd)
|
||||||
{
|
{
|
||||||
foundTrack = true;
|
foundTrack = true;
|
||||||
StartLBA = trackStart;
|
StartLBA = lba;
|
||||||
EndLBA = trackEnd;
|
EndLBA = trackEnd;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue