diff --git a/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs b/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs index 93732b8a97..c8f8c24921 100644 --- a/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs +++ b/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs @@ -16,6 +16,7 @@ namespace BizHawk.Emulation.DiscSystem /// public unsafe class MednaDisc : IDisposable { + /// is (could not load mednadisc.dll), or unmanaged call failed public MednaDisc(string pathToDisc) { if (!IsLibraryAvailable) diff --git a/BizHawk.Emulation.DiscSystem/DiscDecoding.cs b/BizHawk.Emulation.DiscSystem/DiscDecoding.cs index 490203eba7..b983a4a0be 100644 --- a/BizHawk.Emulation.DiscSystem/DiscDecoding.cs +++ b/BizHawk.Emulation.DiscSystem/DiscDecoding.cs @@ -85,6 +85,7 @@ namespace BizHawk.Emulation.DiscSystem }; } + /// FFmpeg exited with non-zero exit code or produced no output public byte[] DecodeAudio(string path) { string tempfile = Path.GetTempFileName(); @@ -158,6 +159,7 @@ namespace BizHawk.Emulation.DiscSystem return null; } + /// could not find source audio for public byte[] AcquireWaveData(string audioPath) { string path = FindAudio(audioPath); diff --git a/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_WaveFile.cs b/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_WaveFile.cs index 62507809d1..fbd96f4c84 100644 --- a/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_WaveFile.cs +++ b/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_WaveFile.cs @@ -84,6 +84,7 @@ namespace BizHawk.Emulation.DiscSystem Load(stream); } + /// not a valid RIFF WAVE file with exactly one data chunk containing two 16-bit PCM channels at 44.1 kHz public void Load(Stream stream) { try diff --git a/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/RiffMaster.cs b/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/RiffMaster.cs index 197f3ab283..8bb8753b7e 100644 --- a/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/RiffMaster.cs +++ b/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/RiffMaster.cs @@ -234,6 +234,8 @@ namespace BizHawk.Emulation.DiscSystem { public Dictionary dictionary = new Dictionary(); public RiffContainer_INFO() { type = "INFO"; } + + /// . contains a chunk that does not inherit public RiffContainer_INFO(RiffContainer rc) { subchunks = rc.subchunks; @@ -327,9 +329,8 @@ namespace BizHawk.Emulation.DiscSystem riff.WriteStream(s); } - /// - /// takes posession of the supplied stream - /// + /// takes posession of the supplied stream + /// does not contain a riff chunk public void LoadStream(Stream s) { Dispose(); diff --git a/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs b/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs index b50d2976da..f0f72b705d 100644 --- a/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs +++ b/BizHawk.Emulation.DiscSystem/DiscFormats/CCD_format.cs @@ -167,6 +167,8 @@ namespace BizHawk.Emulation.DiscSystem TryGetValue(key, out def); return def; } + + /// not found in public int FetchOrFail(string key) { int ret; @@ -234,9 +236,7 @@ namespace BizHawk.Emulation.DiscSystem return version; } - /// - /// Parses a CCD file contained in the provided stream - /// + /// parsed is 1, parsed session number is not 1, or malformed entry public CCDFile ParseFrom(Stream stream) { CCDFile ccdf = new CCDFile(); @@ -322,7 +322,7 @@ namespace BizHawk.Emulation.DiscSystem public List RawTOCEntries; public CCDFile ParsedCCDFile; public bool Valid; - public Exception FailureException; + public CCDParseException FailureException; public string ImgPath; public string SubPath; public string CcdPath; @@ -471,10 +471,7 @@ namespace BizHawk.Emulation.DiscSystem } } - - /// - /// Loads a CCD at the specified path to a Disc object - /// + /// file not found, nonexistent IMG file, nonexistent SUB file, IMG or SUB file not multiple of 2352 B, or IMG and SUB files differ in length public Disc LoadCCDToDisc(string ccdPath, DiscMountPolicy IN_DiscMountPolicy) { var loadResults = LoadCCDPath(ccdPath); diff --git a/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs b/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs index 8c051f8c17..f3045a207c 100644 --- a/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs +++ b/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs @@ -289,6 +289,7 @@ namespace BizHawk.Emulation.DiscSystem public int BlobIndex; } + /// header is malformed or identifies file as MDS 2.x, or any track has a DVD mode public AFile Parse(Stream stream) { EndianBitConverter bc = EndianBitConverter.CreateForLittleEndian(); @@ -580,7 +581,7 @@ namespace BizHawk.Emulation.DiscSystem public List RawTOCEntries; public AFile ParsedMDSFile; public bool Valid; - public Exception FailureException; + public MDSParseException FailureException; public string MdsPath; } @@ -609,6 +610,7 @@ namespace BizHawk.Emulation.DiscSystem return ret; } + /// path reference no longer points to file Dictionary MountBlobs(AFile mdsf, Disc disc) { Dictionary BlobIndex = new Dictionary(); @@ -690,10 +692,7 @@ namespace BizHawk.Emulation.DiscSystem return new RawTOCEntry { QData = q }; } - - /// - /// Loads a MDS at the specified path to a Disc object - /// + /// no file found at or BLOB error public Disc LoadMDSToDisc(string mdsPath, DiscMountPolicy IN_DiscMountPolicy) { var loadResults = LoadMDSPath(mdsPath); diff --git a/BizHawk.Emulation.DiscSystem/DiscHasher.cs b/BizHawk.Emulation.DiscSystem/DiscHasher.cs index 830061f6dd..f23a607f26 100644 --- a/BizHawk.Emulation.DiscSystem/DiscHasher.cs +++ b/BizHawk.Emulation.DiscSystem/DiscHasher.cs @@ -123,6 +123,11 @@ namespace BizHawk.Emulation.DiscSystem } uint current = 0xFFFFFFFF; + + /// + /// is negative, or + /// end index ( + ) is beyond the end of + /// public unsafe void Add(byte[] data, int offset, int size) { if (offset + size > data.Length) diff --git a/BizHawk.Emulation.DiscSystem/DiscMountJob.cs b/BizHawk.Emulation.DiscSystem/DiscMountJob.cs index a2be4dfa49..bd9890478f 100644 --- a/BizHawk.Emulation.DiscSystem/DiscMountJob.cs +++ b/BizHawk.Emulation.DiscSystem/DiscMountJob.cs @@ -47,6 +47,7 @@ namespace BizHawk.Emulation.DiscSystem /// public bool OUT_SlowLoadAborted; + /// is public void Run() { switch (IN_DiscInterface) diff --git a/BizHawk.Emulation.DiscSystem/DiscSectorReader.cs b/BizHawk.Emulation.DiscSystem/DiscSectorReader.cs index 71dd18298e..7c7a30fc52 100644 --- a/BizHawk.Emulation.DiscSystem/DiscSectorReader.cs +++ b/BizHawk.Emulation.DiscSystem/DiscSectorReader.cs @@ -196,6 +196,7 @@ namespace BizHawk.Emulation.DiscSystem /// If any console is trying to do that, we'll have to add a policy for it, or handle it in the console. /// (We can add a method to this API that checks the type of a sector to make that easier) /// + /// public int ReadLBA_2048(int lba, byte[] buffer, int offset) { if (Policy.UserData2048Mode == DiscSectorReaderPolicy.EUserData2048Mode.AssumeMode1) diff --git a/BizHawk.Emulation.DiscSystem/DiscStream.cs b/BizHawk.Emulation.DiscSystem/DiscStream.cs index fcc2106491..d05e493f6d 100644 --- a/BizHawk.Emulation.DiscSystem/DiscStream.cs +++ b/BizHawk.Emulation.DiscSystem/DiscStream.cs @@ -63,6 +63,7 @@ namespace BizHawk.Emulation.DiscSystem int cachedSector; DiscSectorReader dsr; + /// is not or public DiscStream(Disc disc, EDiscStreamView view, int from_lba) { SectorSize = 2048; diff --git a/BizHawk.Emulation.DiscSystem/Internal/Jobs/LoadSBIJob.cs b/BizHawk.Emulation.DiscSystem/Internal/Jobs/LoadSBIJob.cs index 8f379e9940..de674e490d 100644 --- a/BizHawk.Emulation.DiscSystem/Internal/Jobs/LoadSBIJob.cs +++ b/BizHawk.Emulation.DiscSystem/Internal/Jobs/LoadSBIJob.cs @@ -22,6 +22,7 @@ namespace BizHawk.Emulation.DiscSystem.SBI /// public SubQPatchData OUT_Data; + /// file at does not contain valid header or contains misformatted record public void Run() { using (var fs = File.OpenRead(IN_Path)) diff --git a/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_A0A1A2_Job.cs b/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_A0A1A2_Job.cs index e7827cd64a..2be0a6f6c1 100644 --- a/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_A0A1A2_Job.cs +++ b/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_A0A1A2_Job.cs @@ -34,9 +34,8 @@ namespace BizHawk.Emulation.DiscSystem /// public SessionFormat IN_Session1Format; - /// - /// Appends the new entries to the provided list - /// + /// appends the new entries to the provided list + /// is or a non-member public void Run(List entries) { //NOTE: entries are inserted at the beginning due to observations of CCD indicating they might need to be that way diff --git a/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscStructure_From_DiscTOC_Job.cs b/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscStructure_From_DiscTOC_Job.cs index 14accab6d3..0ecc8db87a 100644 --- a/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscStructure_From_DiscTOC_Job.cs +++ b/BizHawk.Emulation.DiscSystem/Internal/Jobs/Synthesize_DiscStructure_From_DiscTOC_Job.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.DiscSystem public DiscTOC TOCRaw; public DiscStructure Result; + /// first track of is not 1 public void Run() { var dsr = new DiscSectorReader(IN_Disc);