On 808x, timers are no longer run on every cycle decrease from other devices, properly fixes the stack corruption that was crashing MasterWrite, consequently, the previous fix has been removed;
Committed the machine files I forgot to commit before.
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.20 2019/10/09
|
||||
* Version: @(#)fdc.c 1.0.21 2019/10/20
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
@@ -248,13 +248,6 @@ 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,7 +9,7 @@
|
||||
* Implementation of the NEC uPD-765 and compatible floppy disk
|
||||
* controller.
|
||||
*
|
||||
* Version: @(#)fdc.h 1.0.7 2019/10/09
|
||||
* Version: @(#)fdc.h 1.0.8 2019/10/20
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
@@ -148,7 +148,6 @@ 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);
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
*
|
||||
* Implementation of the floppy drive emulation.
|
||||
*
|
||||
* Version: @(#)fdd.c 1.0.14 2019/02/11
|
||||
* Version: @(#)fdd.c 1.0.15 2019/10/20
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
*
|
||||
* Copyright 2018 Fred N. van Kempen.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2018,2019 Fred N. van Kempen.
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
*
|
||||
* 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
|
||||
@@ -594,8 +594,7 @@ fdd_set_motor_enable(int drive, int motor_enable)
|
||||
static void
|
||||
fdd_poll(void *priv)
|
||||
{
|
||||
int drive, i;
|
||||
uint64_t shift;
|
||||
int drive;
|
||||
DRIVE *drv = (DRIVE *) priv;
|
||||
|
||||
drive = drv->id;
|
||||
@@ -603,19 +602,15 @@ fdd_poll(void *priv)
|
||||
if (drive >= FDD_NUM)
|
||||
fatal("Attempting to poll floppy drive %i that is not supposed to be there\n", drive);
|
||||
|
||||
shift = fdc_is_dma(fdd_fdc) ? 5ULL : 0ULL;
|
||||
timer_advance_u64(&fdd_poll_time[drive], fdd_byteperiod(drive) << shift);
|
||||
timer_advance_u64(&fdd_poll_time[drive], fdd_byteperiod(drive));
|
||||
|
||||
shift = 1ULL << shift;
|
||||
for (i = 0; i < shift; i++) {
|
||||
if (drv->poll)
|
||||
drv->poll(drive);
|
||||
if (drv->poll)
|
||||
drv->poll(drive);
|
||||
|
||||
if (fdd_notfound) {
|
||||
fdd_notfound--;
|
||||
if (!fdd_notfound)
|
||||
fdc_noidam(fdd_fdc);
|
||||
}
|
||||
if (fdd_notfound) {
|
||||
fdd_notfound--;
|
||||
if (!fdd_notfound)
|
||||
fdc_noidam(fdd_fdc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user