1
0
mirror of synced 2025-01-18 22:24:04 +01:00

Ignore weird MGA bit preventing AFP parsing.

This commit is contained in:
Jennifer Taylor 2023-03-19 20:46:28 +00:00
parent 19566e4bbe
commit 097078288d

View File

@ -1127,9 +1127,14 @@ class TXP2File(TrackedCoverage, VerboseOutput):
else:
self.vprint("Bit 0x040000 - modern lz mode off")
if feature_mask & 0xFFF80000:
if feature_mask & 0x80000:
self.vprint("Bit 0x080000 - unknown MGA flag on")
else:
self.vprint("Bit 0x080000 - unknown MGA flag off")
if feature_mask & 0xFFF00000:
# We don't know these bits at all!
raise Exception("Invalid bits set in feature mask!")
raise Exception(f"Invalid bits set in feature mask {hex(feature_mask & 0xFFF80000)}!")
if header_offset != header_length:
raise Exception("Failed to parse bitfield of header correctly!")