The drives now once again poll the old way when FDC is in non-DMA mode, should fix floppies on PCjr.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
* Implementation of the NEC uPD-765 and compatible floppy disk
|
||||
* controller.
|
||||
*
|
||||
* Version: @(#)fdc.c 1.0.19 2019/09/26
|
||||
* Version: @(#)fdc.c 1.0.20 2019/10/09
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
@@ -248,6 +248,13 @@ fdc_is_mfm(fdc_t *fdc)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
fdc_is_dma(fdc_t *fdc)
|
||||
{
|
||||
return ((fdc->flags & FDC_FLAG_PCJR) || !fdc->dma) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
fdc_request_next_sector_id(fdc_t *fdc)
|
||||
{
|
||||
|
@@ -9,15 +9,15 @@
|
||||
* Implementation of the NEC uPD-765 and compatible floppy disk
|
||||
* controller.
|
||||
*
|
||||
* Version: @(#)fdc.h 1.0.6 2019/03/23
|
||||
* Version: @(#)fdc.h 1.0.7 2019/10/09
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2018 Fred N. van Kempen.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
* Copyright 2018,2019 Fred N. van Kempen.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -148,6 +148,7 @@ extern int fdc_get_drive(fdc_t *fdc);
|
||||
extern int fdc_get_perp(fdc_t *fdc);
|
||||
extern int fdc_get_format_n(fdc_t *fdc);
|
||||
extern int fdc_is_mfm(fdc_t *fdc);
|
||||
extern int fdc_is_dma(fdc_t *fdc);
|
||||
extern double fdc_get_hut(fdc_t *fdc);
|
||||
extern double fdc_get_hlt(fdc_t *fdc);
|
||||
extern void fdc_request_next_sector_id(fdc_t *fdc);
|
||||
|
@@ -595,6 +595,7 @@ static void
|
||||
fdd_poll(void *priv)
|
||||
{
|
||||
int drive, i;
|
||||
uint64_t shift;
|
||||
DRIVE *drv = (DRIVE *) priv;
|
||||
|
||||
drive = drv->id;
|
||||
@@ -602,9 +603,11 @@ fdd_poll(void *priv)
|
||||
if (drive >= FDD_NUM)
|
||||
fatal("Attempting to poll floppy drive %i that is not supposed to be there\n", drive);
|
||||
|
||||
timer_advance_u64(&fdd_poll_time[drive], fdd_byteperiod(drive) << 5ULL);
|
||||
shift = fdc_is_dma(fdd_fdc) ? 5ULL : 0ULL;
|
||||
timer_advance_u64(&fdd_poll_time[drive], fdd_byteperiod(drive) << shift);
|
||||
|
||||
for (i = 0; i < 32; i++) {
|
||||
shift = 1ULL << shift;
|
||||
for (i = 0; i < shift; i++) {
|
||||
if (drv->poll)
|
||||
drv->poll(drive);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user