(Re-)added the Deskpro 386, but only in the development/incomplete section of the code definitions.

Selected XT and AT clones can use either their built-in FDC controller or an external one (the IBM AT and Compaq AT machines don't support booting from a 1.44M floppy so this makes the external floppy useful).
Added the FDC to the Adaptec AHA-154xCF ("2" variant) and defaulted to None to keep compatibility with existing FDC's.
This commit is contained in:
TC1995
2020-06-17 00:32:48 +02:00
parent c1f1331c04
commit f62fc73862
20 changed files with 235 additions and 77 deletions

View File

@@ -115,21 +115,15 @@ fdc_log(const char *fmt, ...)
typedef struct {
const char *name;
const char *internal_name;
const device_t *device;
} fdc_ext_t;
static const device_t fdc_none_device = {
"None",
0, FDC_NONE,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL
};
static const device_t fdc_internal_device = {
"Internal Floppy Drive Controller",
0, FDC_INTERNAL,
0, 0,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL
@@ -137,29 +131,25 @@ static const device_t fdc_internal_device = {
static fdc_ext_t fdc_devices[] = {
{ "none", &fdc_none_device },
{ "internal", &fdc_internal_device },
{ "dtk_pii151b", &fdc_pii151b_device },
{ "dtk_pii158b", &fdc_pii158b_device },
{ NULL, NULL }
{ "Internal controller", "internal", &fdc_internal_device },
{ "DTK PII-151B", "dtk_pii151b", &fdc_pii151b_device },
{ "DTK PII-158B", "dtk_pii158b", &fdc_pii158b_device },
{ "", NULL, NULL }
};
/* Reset the HDC, whichever one that is. */
/* Reset the FDC, whichever one that is. */
void
fdc_ext_reset(void)
{
fdc_log("FDC: reset(current=%d, internal=%d)\n",
fdc_type, (machines[machine].flags & MACHINE_FDC) ? 1 : 0);
/* If we have a valid controller, add its device. */
if (fdc_type > 1)
if (fdc_type > 0)
device_add(fdc_devices[fdc_type].device);
}
char *
fdc_ext_get_name(int fdc_ext)
{
return((char *)fdc_devices[fdc_ext].device->name);
return((char *)fdc_devices[fdc_ext].name);
}
@@ -174,9 +164,9 @@ fdc_ext_get_id(char *s)
{
int c = 0;
while (strlen((char *) fdc_devices[c].internal_name))
while (strlen((char *) fdc_devices[c].name))
{
if (!strcmp((char *) fdc_devices[c].internal_name, s))
if (!strcmp((char *) fdc_devices[c].name, s))
return c;
c++;
}
@@ -2253,7 +2243,6 @@ fdc_init(const device_t *info)
memset(fdc, 0, sizeof(fdc_t));
fdc->flags = info->local;
fdc_reset(fdc);
fdc->irq = 6;

View File

@@ -71,8 +71,8 @@
#include <86box/fdc.h>
#include <86box/fdc_ext.h>
#define ROM_PII_151B L"floppy/dtk/pii-151b.rom"
#define ROM_PII_158B L"floppy/dtk/pii-158b.rom"
#define ROM_PII_151B L"roms/floppy/dtk/pii-151b.rom"
#define ROM_PII_158B L"roms/floppy/dtk/pii-158b.rom"
typedef struct {
const char *name;
@@ -81,8 +81,8 @@ typedef struct {
uint32_t bios_addr,
bios_size;
rom_t bios_rom;
fdc_t *fdc;
fdc_t *fdc;
} pii_t;
@@ -145,7 +145,7 @@ pii_init(const device_t *info)
}
/* Attach the DP8473 chip. */
dev->fdc = device_add(&fdc_dp8473_device);
dev->fdc = device_add(&fdc_at_device);
//pclog("FDC: %s (I/O=%04X, flags=%08x)\n",
// info->name, dev->fdc->base_address, dev->fdc->flags);
@@ -184,20 +184,6 @@ static const device_config_t pii_config[] = {
}
}
},
{
"speed", "Drive Speed", CONFIG_SELECTION, "", 0,
{
{
"Single", 0
},
{
"Dual", 1
},
{
""
}
}
},
{
"", "", -1
}