From 7dd6db66eeef8a93ac3a059035c4c7fd29ea610a Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 23 Dec 2019 13:07:23 -0800 Subject: [PATCH] GD-ROM LD area header extraction --- DICUI.Library/Utilities/DumpEnvironment.cs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/DICUI.Library/Utilities/DumpEnvironment.cs b/DICUI.Library/Utilities/DumpEnvironment.cs index 3e467735..346a7423 100644 --- a/DICUI.Library/Utilities/DumpEnvironment.cs +++ b/DICUI.Library/Utilities/DumpEnvironment.cs @@ -650,10 +650,6 @@ namespace DICUI.Utilities info.CommonDiscInfo.RingWriteOffset = cdWriteOffset; info.TracksAndWriteOffsets.OtherWriteOffsets = cdWriteOffset; - // GD-ROM-specfic options - if (Type == MediaType.GDROM) - info.Extras.Header = GetSegaHeader(combinedBase + "_mainInfo.txt") ?? ""; - break; case MediaType.DVD: @@ -860,6 +856,9 @@ namespace DICUI.Utilities break; case KnownSystem.NamcoSegaNintendoTriforce: + if (Type == MediaType.CDROM) + info.Extras.Header = GetSegaHeader(combinedBase + "_mainInfo.txt") ?? ""; + info.CommonDiscInfo.EXEDateBuildDate = (this.AddPlaceholders ? Template.RequiredValue : ""); break; @@ -887,18 +886,30 @@ namespace DICUI.Utilities break; case KnownSystem.SegaChihiro: + if (Type == MediaType.CDROM) + info.Extras.Header = GetSegaHeader(combinedBase + "_mainInfo.txt") ?? ""; + info.CommonDiscInfo.EXEDateBuildDate = (this.AddPlaceholders ? Template.RequiredValue : ""); break; case KnownSystem.SegaDreamcast: + if (Type == MediaType.CDROM) + info.Extras.Header = GetSegaHeader(combinedBase + "_mainInfo.txt") ?? ""; + info.CommonDiscInfo.EXEDateBuildDate = (this.AddPlaceholders ? Template.RequiredValue : ""); break; case KnownSystem.SegaNaomi: + if (Type == MediaType.CDROM) + info.Extras.Header = GetSegaHeader(combinedBase + "_mainInfo.txt") ?? ""; + info.CommonDiscInfo.EXEDateBuildDate = (this.AddPlaceholders ? Template.RequiredValue : ""); break; case KnownSystem.SegaNaomi2: + if (Type == MediaType.CDROM) + info.Extras.Header = GetSegaHeader(combinedBase + "_mainInfo.txt") ?? ""; + info.CommonDiscInfo.EXEDateBuildDate = (this.AddPlaceholders ? Template.RequiredValue : ""); break; @@ -1856,7 +1867,7 @@ namespace DICUI.Utilities } /// - /// Get the header from a Sega Saturn or Sega CD / Mega CD disc, if possible + /// Get the header from a Sega CD / Mega CD, Saturn, or Dreamcast Low-Density region, if possible /// /// _mainInfo.txt file location /// Header as a byte array if possible, null on error