# HG changeset patch # User Michael Pavone # Date 1671836826 28800 # Node ID 5c28534e6e09aec62ccb8e92c2cdf4959ea4124c # Parent c7781cc950e9d927f98598479a420b51246d0be2 Fix regression in Thunderhawk diff -r c7781cc950e9 -r 5c28534e6e09 lc8951.c --- a/lc8951.c Fri Dec 23 09:37:25 2022 -0800 +++ b/lc8951.c Fri Dec 23 15:07:06 2022 -0800 @@ -315,7 +315,11 @@ uint8_t sync_detected = 0, sync_ignored = 0; if (byte == 0) { - if (context->sync_counter == 11 && ((sector_offset & 3) == 3)) { + // HACK!: The (sector_offset < 0x10) check is not correct, but without it Thunderhawk gets stuck + // It has a sector that contains the sync pattern in the main data area + // From the LC8951 datasheet, I would expect tohis to trigger a short block, but either + // it's sync detection is fancier than I thought or I have a bug that is confusing the BIOS + if (context->sync_counter == 11 && ((sector_offset & 3) == 3) && (sector_offset < 0x10)) { if (context->ctrl1 & BIT_SYDEN) { sync_detected = 1; } else {