disc - support FLAGS DCP in cuefiles

This commit is contained in:
zeromus 2015-01-11 06:43:59 +00:00
parent f97dff593c
commit 263416a0d0
1 changed files with 13 additions and 4 deletions

View File

@ -282,10 +282,12 @@ namespace BizHawk.Emulation.DiscSystem
toc_track.Number = curr_track; toc_track.Number = curr_track;
toc_track.TrackType = cue_track.TrackType; toc_track.TrackType = cue_track.TrackType;
//choose a Control value based on //choose a Control value based on track type and other flags from cue
//TODO - this might need to be controlled by cue loading prefs
toc_track.Control = cue_track.Control;
if (toc_track.TrackType == ETrackType.Audio) if (toc_track.TrackType == ETrackType.Audio)
toc_track.Control = EControlQ.StereoNoPreEmph; toc_track.Control |= EControlQ.StereoNoPreEmph;
else toc_track.Control = EControlQ.DataUninterrupted; else toc_track.Control |= EControlQ.DataUninterrupted;
if (curr_track == 1) if (curr_track == 1)
{ {
@ -532,6 +534,7 @@ namespace BizHawk.Emulation.DiscSystem
public class CueTrack public class CueTrack
{ {
public EControlQ Control;
public ETrackType TrackType; public ETrackType TrackType;
public int TrackNum; public int TrackNum;
public Timestamp PreGap = new Timestamp(); public Timestamp PreGap = new Timestamp();
@ -682,7 +685,13 @@ namespace BizHawk.Emulation.DiscSystem
//TODO - keep these for later? //TODO - keep these for later?
//known flags: //known flags:
//FLAGS DCP //FLAGS DCP
//that's all. don't know what it means {
var flags = clp.ReadToken();
if (flags == "DCP")
{
currTrack.Control |= EControlQ.CopyPermittedMask;
} else throw new CueBrokenException("Unknown flags: " + flags);
}
break; break;
default: default:
throw new CueBrokenException("unsupported cue command: " + key); throw new CueBrokenException("unsupported cue command: " + key);