Skip to content

Commit b671c87

Browse files
Small improvement to early TAGES detection to eliminate small handful of false positives. Also threw in a note about alpharom
1 parent ff8976a commit b671c87

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

BinaryObjectScanner/FileType/ISO9660.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ public static bool NoteworthyApplicationUse(PrimaryVolumeDescriptor pvd)
107107
// character. If these are found to be causing issues they can be added.
108108
}
109109

110+
offset = 1;
111+
potentialAppUseString = applicationUse.ReadNullTerminatedAnsiString(ref offset);
112+
if (potentialAppUseString == "FS")
113+
return false;
114+
110115
offset = 141;
111116
potentialAppUseString = applicationUse.ReadNullTerminatedAnsiString(ref offset);
112117
if (potentialAppUseString == "CD-XA001")

BinaryObjectScanner/Protection/AlphaROM.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public class AlphaROM : IDiskImageCheck<ISO9660>, IExecutableCheck<PortableExecu
7070
// Alpharom disc check #2: disc has publisher identifier filled with varying amount of data (26-50 bytes
7171
// have been observed) followed by spaces. There's a decent chance this is just a Japanese text string, but
7272
// UTF, Shift-JIS, and EUC-JP all fail to display anything but garbage.
73+
// TODO: This fails on some discs like Redump ID 127450, where publisher identifier is all 0x00.
7374

7475
var publisherIdentifier = pvd.PublisherIdentifier;
7576
int firstSpace = Array.FindIndex(publisherIdentifier, b => b == 0x20);

BinaryObjectScanner/Protection/Tages.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ public class TAGES : IDiskImageCheck<ISO9660>, IExecutableCheck<PortableExecutab
4343
// Early tages has a 4-byte value at the beginning of the AU data and nothing else.
4444
// Redump ID 8776, 21321, 35932
4545
offset = 0;
46-
uint earlyTagesBytes = applicationUse.ReadUInt32LittleEndian(ref offset);
46+
var earlyTagesBytes = applicationUse.ReadBytes(ref offset, 4);
4747
var zeroBytes = applicationUse.ReadBytes(ref offset, 508);
48-
if (Array.TrueForAll(zeroBytes, b => b == 0x00) && earlyTagesBytes != 0)
48+
49+
// Check on earlyTagesBytes needed because Redump ID 56899 begins with "FUN" and is then all 0x00.
50+
// 0x70 value is probably just by chance of where early TAGES checks, but it seems to be consistent.
51+
if (Array.TrueForAll(zeroBytes, b => b == 0x00) && !Array.TrueForAll(earlyTagesBytes, b => b == 0x00) && earlyTagesBytes[3] == 0x70)
4952
return "TAGES (Early)";
5053

5154
// The original releases of Moto Racer 3 (31578, 34669) are so early they have seemingly nothing identifiable.

0 commit comments

Comments
 (0)