From: Maxwell Beck Date: Sun, 29 Dec 2024 01:08:41 +0000 (-0600) Subject: Clean up drive code X-Git-Url: https://rastertail.net/scm/?a=commitdiff_plain;h=dbe367d5a302300e598187eaf4c369eb06f5ec48;p=pico1541.git Clean up drive code --- diff --git a/src/drive.c b/src/drive.c index 4aa0a08..cc85635 100644 --- a/src/drive.c +++ b/src/drive.c @@ -85,31 +85,6 @@ bool drive_cycle(drive_t *drive, uint8_t cycles, bool advance) { uint16_t prev = drive->unlatched[drive->lookahead_idx]; if (timer_next < drive->timer) { if (drive->gcr_bits == 0) { - /* - if (drive->spinning && drive->image != NULL) { - if (!drive->sync_flag && (drive->byte == 0 || drive->byte == 2)) { - drive->gcr_word = 0x3ff; - drive->sync_flag = true; - } else { - uint8_t b = drive->image[drive->image_ptr + (drive->sector << 8) + drive->byte]; - drive->gcr_word = (GCR_CONV[(b & 0xf0) >> 4] << 5) | GCR_CONV[b & 0x0f]; - drive->sync_flag = false; - - uint8_t byte_next = drive->byte + 1; - uint8_t sector_next = drive->sector; - if (byte_next == 0) { - sector_next += 1; - } - if (sector_next >= SECTORS_PER_TRACK[drive->track]) { - sector_next = 0; - } - drive->byte = byte_next; - drive->sector = sector_next; - } - } - - drive->gcr_bits = 10; - */ if (drive->image != NULL && drive->spinning) { if (drive->gap_remain > 0) { drive->gap_remain--;