if (drive->track < 39 && drive->halftrack == 0) {
drive->image_ptr += SECTORS_PER_TRACK[drive->track] << 8;
drive->track += 1;
- drive->sector = drive->sector % SECTORS_PER_TRACK[drive->track];
+ drive->sector = drive->sector * SECTORS_PER_TRACK[drive->track] / SECTORS_PER_TRACK[drive->track - 1];
}
}
if (drive->track > 0 && drive->halftrack == 0) {
drive->image_ptr -= SECTORS_PER_TRACK[drive->track - 1] << 8;
drive->track -= 1;
- drive->sector = drive->sector % SECTORS_PER_TRACK[drive->track];
+ drive->sector = drive->sector * SECTORS_PER_TRACK[drive->track] / SECTORS_PER_TRACK[drive->track + 1];
}
}
#include <stdbool.h>
#include <stdint.h>
-#define DRIVE_LOOKAHEAD 16
+#define DRIVE_LOOKAHEAD 8
extern const uint8_t SECTORS_PER_TRACK[40];
extern const uint8_t BITRATE_PER_TRACK[40];