[Problem] With new DIC 20201101 - read PVD from _mainInfo.txt #251

Closed
opened 2026-01-29 16:12:49 +00:00 by claunia · 8 comments
Owner

Originally created by @Madroms on GitHub (Nov 1, 2020).

Originally assigned to: @mnadareski on GitHub.

With new DIC 20201101, the read of _mainInfo.txt to retrieve PVD is broken.

I only check 1 PS2 CD disc, 1 Saturn disc and 1 DVD VIDEO disc with the new version of DIC. More tests are needed with other discs to validate this piece of code.

On GetPVD function, you may replace most of the code by doing this search:

// Searching for Check Volume Descriptor
while (!(line = sr.ReadLine()).StartsWith("========== Check Volume Descriptor ==========")) ;

// Read the next line so the search goes properly
line = sr.ReadLine();

// Make sure we're in the area
if (!line.StartsWith("========== LBA[000016, 0x00010]: Main Channel =========="))
   while (!(line = sr.ReadLine()).StartsWith("========== LBA[000016, 0x00010]: Main Channel ==========")) ;

// We assume the first non-LBA0/4 sector listed is the proper one
// Fast forward to the PVD
while (!(line = sr.ReadLine()).StartsWith("0310")) ;

// Now that we're at the PVD, read each line in and concatenate
string pvd = "";
for (int i = 0; i < 6; i++)
    pvd += sr.ReadLine() + "\n"; // 320-370

return pvd;
Originally created by @Madroms on GitHub (Nov 1, 2020). Originally assigned to: @mnadareski on GitHub. With new DIC 20201101, the read of _mainInfo.txt to retrieve PVD is broken. I only check 1 PS2 CD disc, 1 Saturn disc and 1 DVD VIDEO disc with the new version of DIC. More tests are needed with other discs to validate this piece of code. On GetPVD function, you may replace most of the code by doing this search: ``` // Searching for Check Volume Descriptor while (!(line = sr.ReadLine()).StartsWith("========== Check Volume Descriptor ==========")) ; // Read the next line so the search goes properly line = sr.ReadLine(); // Make sure we're in the area if (!line.StartsWith("========== LBA[000016, 0x00010]: Main Channel ==========")) while (!(line = sr.ReadLine()).StartsWith("========== LBA[000016, 0x00010]: Main Channel ==========")) ; // We assume the first non-LBA0/4 sector listed is the proper one // Fast forward to the PVD while (!(line = sr.ReadLine()).StartsWith("0310")) ; // Now that we're at the PVD, read each line in and concatenate string pvd = ""; for (int i = 0; i < 6; i++) pvd += sr.ReadLine() + "\n"; // 320-370 return pvd; ```
claunia added the enhancementbug labels 2026-01-29 16:12:49 +00:00
Author
Owner

@Madroms commented on GitHub (Nov 1, 2020):

You can also use the same piece of code for GetSegaHeader (except string pvd... for sure)

@Madroms commented on GitHub (Nov 1, 2020): You can also use the same piece of code for GetSegaHeader (except string pvd... for sure)
Author
Owner

@mnadareski commented on GitHub (Nov 1, 2020):

Please attach a copy of the failing _mainInfo.txt files, when you have a chance. I somewhat knew the new DIC's additions would break something.

@mnadareski commented on GitHub (Nov 1, 2020): Please attach a copy of the failing `_mainInfo.txt` files, when you have a chance. I somewhat knew the new DIC's additions would break something.
Author
Owner
@Madroms commented on GitHub (Nov 2, 2020): Here are 3 of them. [test_PVD_saturn_disc (1)_mainInfo.txt](https://github.com/SabreTools/DICUI/files/5473366/test_PVD_saturn_disc.1._mainInfo.txt) [test_PVD_DVD_VIDEO_disc (1)_mainInfo.txt](https://github.com/SabreTools/DICUI/files/5473368/test_PVD_DVD_VIDEO_disc.1._mainInfo.txt) [SLPM-60239 (1)_mainInfo.txt](https://github.com/SabreTools/DICUI/files/5473370/SLPM-60239.1._mainInfo.txt)
Author
Owner

@mnadareski commented on GitHub (Nov 3, 2020):

Since the newest DIC might have some issues, I'm putting this bug on ice for a bit. I will still try to investigate the best way to address this as time goes on, but it's less likely to be soon or before the next release of DICUI.

@mnadareski commented on GitHub (Nov 3, 2020): Since the newest DIC might have some issues, I'm putting this bug on ice for a bit. I will still try to investigate the best way to address this as time goes on, but it's less likely to be soon or before the next release of DICUI.
Author
Owner

@mnadareski commented on GitHub (Nov 23, 2020):

This is kinda addressed as of a183a1ec91 but I'm leaving this open just in case the last stable DIC does even something weirder.

@mnadareski commented on GitHub (Nov 23, 2020): This is kinda addressed as of https://github.com/SabreTools/MPF/commit/a183a1ec916554611161362410290948735d8a31 but I'm leaving this open just in case the last stable DIC does even something weirder.
Author
Owner

@Madroms commented on GitHub (Nov 25, 2020):

Great!
I think you also need to modify GetSegaHeader

@Madroms commented on GitHub (Nov 25, 2020): Great! I think you also need to modify GetSegaHeader
Author
Owner

@mnadareski commented on GitHub (Mar 10, 2021):

Hey @Madroms can you see if this is still an issue with latest WIP builds?

@mnadareski commented on GitHub (Mar 10, 2021): Hey @Madroms can you see if this is still an issue with latest WIP builds?
Author
Owner

@mnadareski commented on GitHub (Sep 23, 2021):

Closing this as I think this has been fixed and broken multiple times over by this point. It should be in the "fixed" state as of now.

@mnadareski commented on GitHub (Sep 23, 2021): Closing this as I think this has been fixed and broken multiple times over by this point. It should be in the "fixed" state as of now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#251