Moved floppy writeback call to fdc_poll_readwrite_finish(), in order to have the track written less often (no need to write it on every sector).
This commit is contained in:
@@ -1468,6 +1468,9 @@ fdc_poll_common_finish(fdc_t *fdc, int compare, int st5)
|
||||
static void
|
||||
fdc_poll_readwrite_finish(fdc_t *fdc, int compare)
|
||||
{
|
||||
if ((fdc->interrupt == 5) || (fdc->interrupt == 9))
|
||||
fdd_do_writeback(real_drive(fdc, fdc->drive));
|
||||
|
||||
fdc->inread = 0;
|
||||
fdc->interrupt = -2;
|
||||
|
||||
|
@@ -719,3 +719,10 @@ fdd_init(void)
|
||||
fdd_load(2, floppyfns[2]);
|
||||
fdd_load(3, floppyfns[3]);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
fdd_do_writeback(int drive)
|
||||
{
|
||||
d86f_handler[drive].writeback(drive);
|
||||
}
|
||||
|
@@ -1712,7 +1712,6 @@ d86f_write_sector_data(int drive, int side, int mfm, uint16_t am)
|
||||
dev->data_find.sync_marks = dev->data_find.bits_obtained = dev->data_find.bytes_obtained = 0;
|
||||
dev->error_condition = 0;
|
||||
dev->state = STATE_IDLE;
|
||||
d86f_handler[drive].writeback(drive);
|
||||
fdc_sector_finishread(d86f_fdc);
|
||||
return;
|
||||
}
|
||||
|
@@ -112,6 +112,7 @@ extern void fdd_readaddress(int drive, int side, int density);
|
||||
extern void fdd_format(int drive, int side, int density, uint8_t fill);
|
||||
extern int fdd_hole(int drive);
|
||||
extern void fdd_stop(int drive);
|
||||
extern void fdd_do_writeback(int drive);
|
||||
|
||||
extern int motorspin;
|
||||
extern uint64_t motoron[FDD_NUM];
|
||||
|
Reference in New Issue
Block a user