From 13584ceb62f6169d277027513671dc3549f2459f Mon Sep 17 00:00:00 2001 From: Asnivor Date: Fri, 18 Oct 2024 11:04:20 +0100 Subject: [PATCH] [ZXHawk] Remove ParseDisk() track limit This fixes 3D Construction Kit and potentially other dsk games with more than 42 tracks on disc. The +3 disc drive may only be able to read 41-ish tracks of standard sized data, but it appears many images have more tracks than this. 3D construction kit for example has 45 tracks in what passes for the TOC, but the last 5 of these are empty. --- .../Media/Disk/CPCFormat/CPCExtendedFloppyDisk.cs | 11 ----------- .../Media/Disk/CPCFormat/CPCFloppyDisk.cs | 11 ----------- 2 files changed, 22 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCExtendedFloppyDisk.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCExtendedFloppyDisk.cs index 5173b2a4d1..582900802d 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCExtendedFloppyDisk.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCExtendedFloppyDisk.cs @@ -55,17 +55,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum throw new System.NotImplementedException(sbm.ToString()); } - if (DiskHeader.NumberOfTracks > 42) - { - StringBuilder sbm = new StringBuilder(); - sbm.AppendLine(); - sbm.AppendLine(); - sbm.AppendLine("The detected disk is an " + DiskHeader.NumberOfTracks + " track disk image."); - sbm.AppendLine("This is currently incompatible with the emulated +3 disk drive (42 tracks)."); - sbm.AppendLine("Likely the disk image is an 80 track betadisk or opus image, the drives and controllers for which are not currently emulated in ZXHawk"); - throw new System.NotImplementedException(sbm.ToString()); - } - for (int i = 0; i < DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides; i++) { DiskHeader.TrackSizes[i] = data[pos++] * 256; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCFloppyDisk.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCFloppyDisk.cs index 43dfbed127..9f3eaae53a 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCFloppyDisk.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/CPCFormat/CPCFloppyDisk.cs @@ -55,17 +55,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum throw new NotImplementedException(sbm.ToString()); } - if (DiskHeader.NumberOfTracks > 42) - { - StringBuilder sbm = new StringBuilder(); - sbm.AppendLine(); - sbm.AppendLine(); - sbm.AppendLine("The detected disk is an " + DiskHeader.NumberOfTracks + " track disk image."); - sbm.AppendLine("This is currently incompatible with the emulated +3 disk drive (42 tracks)."); - sbm.AppendLine("Likely the disk image is an 80 track betadisk or opus image, the drives and controllers for which are not currently emulated in ZXHawk"); - throw new NotImplementedException(sbm.ToString()); - } - // standard CPC format all track sizes are the same in the image for (int i = 0; i < DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides; i++) {