Add tertiary and quaternary FDC options + improvements to monster FDC

This commit is contained in:
Jasmine Iwanek
2023-02-03 00:37:20 -05:00
parent 186b63b845
commit 2857655f6e
3 changed files with 113 additions and 7 deletions

View File

@@ -2280,6 +2280,12 @@ fdc_reset(void *priv)
} else if (fdc->flags & FDC_FLAG_SEC) {
fdc->dma = 1;
fdc->specify[1] = 0;
} else if (fdc->flags & FDC_FLAG_TER) {
fdc->dma = 1;
fdc->specify[1] = 0;
} else if (fdc->flags & FDC_FLAG_QUA) {
fdc->dma = 1;
fdc->specify[1] = 0;
} else {
fdc->dma = 1;
fdc->specify[1] = 0;
@@ -2297,6 +2303,10 @@ fdc_reset(void *priv)
fdc_remove(fdc);
if (fdc->flags & FDC_FLAG_SEC) {
fdc_set_base(fdc, FDC_SECONDARY_ADDR);
} else if (fdc->flags & FDC_FLAG_TER) {
fdc_set_base(fdc, FDC_TERTIARY_ADDR);
} else if (fdc->flags & FDC_FLAG_QUA) {
fdc_set_base(fdc, FDC_QUATERNARY_ADDR);
} else {
fdc_set_base(fdc, (fdc->flags & FDC_FLAG_PCJR) ? FDC_PRIMARY_PCJR_ADDR : FDC_PRIMARY_ADDR);
}
@@ -2337,6 +2347,10 @@ fdc_init(const device_t *info)
timer_add(&fdc->watchdog_timer, fdc_watchdog_poll, fdc, 0);
else if (fdc->flags & FDC_FLAG_SEC)
fdc->dma_ch = FDC_SECONDARY_DMA;
else if (fdc->flags & FDC_FLAG_TER)
fdc->dma_ch = FDC_TERTIARY_DMA;
else if (fdc->flags & FDC_FLAG_QUA)
fdc->dma_ch = FDC_QUATERNARY_DMA;
else
fdc->dma_ch = FDC_PRIMARY_DMA;
@@ -2390,6 +2404,34 @@ const device_t fdc_xt_sec_device = {
.config = NULL
};
const device_t fdc_xt_ter_device = {
.name = "PC/XT Floppy Drive Controller (Tertiary)",
.internal_name = "fdc_xt_ter",
.flags = FDC_FLAG_TER,
.local = 0,
.init = fdc_init,
.close = fdc_close,
.reset = fdc_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
const device_t fdc_xt_qua_device = {
.name = "PC/XT Floppy Drive Controller (Quaternary)",
.internal_name = "fdc_xt_qua",
.flags = FDC_FLAG_QUA,
.local = 0,
.init = fdc_init,
.close = fdc_close,
.reset = fdc_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
const device_t fdc_xt_t1x00_device = {
.name = "PC/XT Floppy Drive Controller (Toshiba)",
.internal_name = "fdc_xt_t1x00",
@@ -2474,6 +2516,34 @@ const device_t fdc_at_sec_device = {
.config = NULL
};
const device_t fdc_at_ter_device = {
.name = "PC/AT Floppy Drive Controller (Tertiary)",
.internal_name = "fdc_at_ter",
.flags = 0,
.local = FDC_FLAG_AT | FDC_FLAG_TER,
.init = fdc_init,
.close = fdc_close,
.reset = fdc_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
const device_t fdc_at_qua_device = {
.name = "PC/AT Floppy Drive Controller (Quaternary)",
.internal_name = "fdc_at_qua",
.flags = 0,
.local = FDC_FLAG_AT | FDC_FLAG_QUA,
.init = fdc_init,
.close = fdc_close,
.reset = fdc_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
const device_t fdc_at_actlow_device = {
.name = "PC/AT Floppy Drive Controller (Active low)",
.internal_name = "fdc_at_actlow",