1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-06-25 12:29:34 +00:00

Remove debugging, use ENC_ETRACK for sector pos max

Also, there's no need for a while statement; we can just reset to zero.
This commit is contained in:
Peter Evans 2018-02-14 22:09:21 -06:00
parent 7224698cd7
commit fe70cd1f71

View File

@ -223,8 +223,6 @@ apple2_dd_phaser(apple2dd *drive)
}
#endif
//printf("phase:%02x last:%02x step:%d\n", phase, last, step);
apple2_dd_step(drive, step);
#if 0
@ -275,7 +273,6 @@ apple2_dd_read(apple2dd *drive)
}
vm_8bit byte = vm_segment_get(drive->data, apple2_dd_position(drive));
//printf("byte = %02x, pos = %05x\n", byte, apple2_dd_position(drive));
apple2_dd_shift(drive, 1);
return byte;
@ -345,9 +342,9 @@ apple2_dd_shift(apple2dd *drive, int pos)
drive->sector_pos += pos;
while (drive->sector_pos > MAX_SECTOR_POS) {
if (drive->sector_pos >= ENC_ETRACK) {
// We need to reset the sector pos to zero, because...
drive->sector_pos -= (MAX_SECTOR_POS + 1);
drive->sector_pos = 0;
}
}
@ -361,7 +358,6 @@ apple2_dd_shift(apple2dd *drive, int pos)
void
apple2_dd_step(apple2dd *drive, int steps)
{
//printf("step %d, new track_pos %d\n", steps, drive->track_pos + steps);
drive->track_pos += steps;
if (drive->track_pos > MAX_DRIVE_STEPS) {