(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

@@ -784,24 +784,21 @@ load_other_peripherals(void)
else else
scsi_card_current = 0; scsi_card_current = 0;
if (machines[machine].flags & MACHINE_FDC_FIXED) { p = config_get_string(cat, "fdc", NULL);
config_delete_var(cat, "fdc"); if (p == NULL) {
p = (char *)malloc((strlen("internal")+1)*sizeof(char));
strcpy(p, "internal");
free_p = 1;
}
if (!strcmp(p, "internal"))
fdc_type = FDC_INTERNAL; fdc_type = FDC_INTERNAL;
} else { else
p = config_get_string(cat, "fdc", NULL);
if (p == NULL) {
if (machines[machine].flags & MACHINE_FDC) {
p = (char *)malloc((strlen("internal")+1)*sizeof(char));
strcpy(p, "internal");
} else {
p = (char *)malloc((strlen("none")+1)*sizeof(char));
strcpy(p, "none");
}
free_p = 1;
}
fdc_type = fdc_ext_get_from_internal_name(p); fdc_type = fdc_ext_get_from_internal_name(p);
if (free_p)
free(p); if (free_p) {
free(p);
p = NULL;
} }
p = config_get_string(cat, "hdc", NULL); p = config_get_string(cat, "hdc", NULL);

View File

@@ -128,6 +128,7 @@ extern CPU cpus_8086[];
extern CPU cpus_286[]; extern CPU cpus_286[];
extern CPU cpus_i386SX[]; extern CPU cpus_i386SX[];
extern CPU cpus_i386DX[]; extern CPU cpus_i386DX[];
extern CPU cpus_i386DX_Compaq[];
extern CPU cpus_Am386SX[]; extern CPU cpus_Am386SX[];
extern CPU cpus_Am386DX[]; extern CPU cpus_Am386DX[];
extern CPU cpus_486SLC[]; extern CPU cpus_486SLC[];

View File

@@ -186,6 +186,16 @@ CPU cpus_i386DX[] = {
{"", -1, 0, 0, 0, 0, 0, 0, 0,0,0,0, 0} {"", -1, 0, 0, 0, 0, 0, 0, 0,0,0,0, 0}
}; };
CPU cpus_i386DX_Compaq[] = {
/*i386DX/RapidCAD*/
{"i386DX/16", CPU_386DX, fpus_80286, 16000000, 1, 0x0308, 0, 0, 0, 3,3,3,3, 2},
{"i386DX/20", CPU_386DX, fpus_80286, 20000000, 1, 0x0308, 0, 0, 0, 4,4,3,3, 3},
{"i386DX/25", CPU_386DX, fpus_80286, 25000000, 1, 0x0308, 0, 0, 0, 4,4,3,3, 3},
{"i386DX/33", CPU_386DX, fpus_80286, 33333333, 1, 0x0308, 0, 0, 0, 6,6,3,3, 4},
{"i386DX/40", CPU_386DX, fpus_80286, 40000000, 1, 0x0308, 0, 0, 0, 7,7,3,3, 5},
{"", -1, 0, 0, 0, 0, 0, 0, 0,0,0,0, 0}
};
CPU cpus_Am386SX[] = { CPU cpus_Am386SX[] = {
/*Am386SX*/ /*Am386SX*/
{"Am386SX/16", CPU_386SX, fpus_80386, 16000000, 1, 0x2308, 0, 0, 0, 3,3,3,3, 2}, {"Am386SX/16", CPU_386SX, fpus_80386, 16000000, 1, 0x2308, 0, 0, 0, 3,3,3,3, 2},

View File

@@ -115,21 +115,15 @@ fdc_log(const char *fmt, ...)
typedef struct { typedef struct {
const char *name;
const char *internal_name; const char *internal_name;
const device_t *device; const device_t *device;
} fdc_ext_t; } 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 = { static const device_t fdc_internal_device = {
"Internal Floppy Drive Controller", "Internal Floppy Drive Controller",
0, FDC_INTERNAL, 0, 0,
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
NULL NULL
@@ -137,29 +131,25 @@ static const device_t fdc_internal_device = {
static fdc_ext_t fdc_devices[] = { static fdc_ext_t fdc_devices[] = {
{ "none", &fdc_none_device }, { "Internal controller", "internal", &fdc_internal_device },
{ "internal", &fdc_internal_device }, { "DTK PII-151B", "dtk_pii151b", &fdc_pii151b_device },
{ "dtk_pii151b", &fdc_pii151b_device }, { "DTK PII-158B", "dtk_pii158b", &fdc_pii158b_device },
{ "dtk_pii158b", &fdc_pii158b_device }, { "", NULL, NULL }
{ NULL, NULL }
}; };
/* Reset the HDC, whichever one that is. */ /* Reset the FDC, whichever one that is. */
void void
fdc_ext_reset(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 we have a valid controller, add its device. */
if (fdc_type > 1) if (fdc_type > 0)
device_add(fdc_devices[fdc_type].device); device_add(fdc_devices[fdc_type].device);
} }
char * char *
fdc_ext_get_name(int fdc_ext) 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; 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; return c;
c++; c++;
} }
@@ -2253,7 +2243,6 @@ fdc_init(const device_t *info)
memset(fdc, 0, sizeof(fdc_t)); memset(fdc, 0, sizeof(fdc_t));
fdc->flags = info->local; fdc->flags = info->local;
fdc_reset(fdc);
fdc->irq = 6; fdc->irq = 6;

View File

@@ -71,8 +71,8 @@
#include <86box/fdc.h> #include <86box/fdc.h>
#include <86box/fdc_ext.h> #include <86box/fdc_ext.h>
#define ROM_PII_151B L"floppy/dtk/pii-151b.rom" #define ROM_PII_151B L"roms/floppy/dtk/pii-151b.rom"
#define ROM_PII_158B L"floppy/dtk/pii-158b.rom" #define ROM_PII_158B L"roms/floppy/dtk/pii-158b.rom"
typedef struct { typedef struct {
const char *name; const char *name;
@@ -82,7 +82,7 @@ typedef struct {
bios_size; bios_size;
rom_t bios_rom; rom_t bios_rom;
fdc_t *fdc; fdc_t *fdc;
} pii_t; } pii_t;
@@ -145,7 +145,7 @@ pii_init(const device_t *info)
} }
/* Attach the DP8473 chip. */ /* 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", //pclog("FDC: %s (I/O=%04X, flags=%08x)\n",
// info->name, dev->fdc->base_address, dev->fdc->flags); // 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 "", "", -1
} }

View File

@@ -25,8 +25,7 @@
extern int fdc_type; extern int fdc_type;
/* Controller types. */ /* Controller types. */
#define FDC_NONE 0 #define FDC_INTERNAL 0
#define FDC_INTERNAL 1
extern const device_t fdc_pii151b_device; extern const device_t fdc_pii151b_device;
extern const device_t fdc_pii158b_device; extern const device_t fdc_pii158b_device;

View File

@@ -41,7 +41,6 @@
#define MACHINE_SOUND 0x010000 /* sys has int sound */ #define MACHINE_SOUND 0x010000 /* sys has int sound */
#define MACHINE_NONMI 0x020000 /* sys does not have NMI's */ #define MACHINE_NONMI 0x020000 /* sys does not have NMI's */
#define MACHINE_FDC 0x040000 /* sys has int FDC */ #define MACHINE_FDC 0x040000 /* sys has int FDC */
#define MACHINE_FDC_FIXED 0x080000 /* sys has ONLY int FDC */
#else #else
#define MACHINE_PC 0x000000 /* PC architecture */ #define MACHINE_PC 0x000000 /* PC architecture */
#define MACHINE_AT 0x000001 /* PC/AT architecture */ #define MACHINE_AT 0x000001 /* PC/AT architecture */
@@ -60,7 +59,6 @@
#define MACHINE_SOUND 0x010000 /* sys has int sound */ #define MACHINE_SOUND 0x010000 /* sys has int sound */
#define MACHINE_NONMI 0x020000 /* sys does not have NMI's */ #define MACHINE_NONMI 0x020000 /* sys does not have NMI's */
#define MACHINE_FDC 0x040000 /* sys has int FDC */ #define MACHINE_FDC 0x040000 /* sys has int FDC */
#define MACHINE_FDC_FIXED 0x080000 /* sys has ONLY int FDC */
#endif #endif
#define IS_ARCH(m, a) (machines[(m)].flags & (a)) ? 1 : 0; #define IS_ARCH(m, a) (machines[(m)].flags & (a)) ? 1 : 0;
@@ -282,6 +280,7 @@ extern int machine_at_cmdpc_init(const machine_t *);
extern int machine_at_portableii_init(const machine_t *); extern int machine_at_portableii_init(const machine_t *);
extern int machine_at_portableiii_init(const machine_t *); extern int machine_at_portableiii_init(const machine_t *);
extern int machine_at_portableiii386_init(const machine_t *); extern int machine_at_portableiii386_init(const machine_t *);
extern int machine_at_deskpro386_init(const machine_t *);
#ifdef EMU_DEVICE_H #ifdef EMU_DEVICE_H
extern const device_t *at_cpqiii_get_device(void); extern const device_t *at_cpqiii_get_device(void);
#endif #endif

View File

@@ -423,7 +423,7 @@ typedef struct {
PendingInterrupt, Lock, PendingInterrupt, Lock,
target_data_len, pad0; target_data_len, pad0;
uint32_t Base, rom_addr, /* address of BIOS ROM */ uint32_t Base, fdc_address, rom_addr, /* address of BIOS ROM */
CmdParamLeft, Outgoing, CmdParamLeft, Outgoing,
transfer_size; transfer_size;
@@ -486,6 +486,8 @@ typedef struct {
pc_timer_t timer, ResetCB; pc_timer_t timer, ResetCB;
Req_t Req; Req_t Req;
fdc_t *fdc;
} x54x_t; } x54x_t;

View File

@@ -49,6 +49,7 @@
#include <86box/device.h> #include <86box/device.h>
#include <86box/fdd.h> #include <86box/fdd.h>
#include <86box/fdc.h> #include <86box/fdc.h>
#include <86box/fdc_ext.h>
#include <86box/nvr.h> #include <86box/nvr.h>
#include <86box/gameport.h> #include <86box/gameport.h>
#include <86box/keyboard.h> #include <86box/keyboard.h>
@@ -102,7 +103,8 @@ machine_at_ibm_common_init(const machine_t *model)
mem_remap_top(384); mem_remap_top(384);
device_add(&fdc_at_device); if (fdc_type == FDC_INTERNAL)
device_add(&fdc_at_device);
} }

View File

@@ -33,6 +33,7 @@
#include <86box/device.h> #include <86box/device.h>
#include <86box/fdd.h> #include <86box/fdd.h>
#include <86box/fdc.h> #include <86box/fdc.h>
#include <86box/fdc_ext.h>
#include <86box/hdc.h> #include <86box/hdc.h>
#include <86box/hdc_ide.h> #include <86box/hdc_ide.h>
#include <86box/machine.h> #include <86box/machine.h>
@@ -45,7 +46,8 @@ enum
{ {
COMPAQ_PORTABLEII = 0, COMPAQ_PORTABLEII = 0,
COMPAQ_PORTABLEIII, COMPAQ_PORTABLEIII,
COMPAQ_PORTABLEIII386 COMPAQ_PORTABLEIII386,
COMPAQ_DESKPRO386
}; };
#define CGA_RGB 0 #define CGA_RGB 0
@@ -809,9 +811,11 @@ machine_at_compaq_init(const machine_t *model, int type)
{ {
machine_at_init(model); machine_at_init(model);
mem_remap_top(384); if (type != COMPAQ_DESKPRO386)
mem_remap_top(384);
device_add(&fdc_at_device); if (fdc_type == FDC_INTERNAL)
device_add(&fdc_at_device);
mem_mapping_add(&ram_mapping, 0xfa0000, 0x60000, mem_mapping_add(&ram_mapping, 0xfa0000, 0x60000,
read_ram, read_ramw, read_raml, read_ram, read_ramw, read_raml,
@@ -833,6 +837,11 @@ machine_at_compaq_init(const machine_t *model, int type)
if (gfxcard == VID_INTERNAL) if (gfxcard == VID_INTERNAL)
device_add(&compaq_plasma_device); device_add(&compaq_plasma_device);
break; break;
case COMPAQ_DESKPRO386:
if (hdc_current == 1)
device_add(&ide_isa_device);
break;
} }
} }
@@ -889,3 +898,20 @@ machine_at_portableiii386_init(const machine_t *model)
return ret; return ret;
} }
int
machine_at_deskpro386_init(const machine_t *model)
{
int ret;
ret = bios_load_interleavedr(L"roms/machines/deskpro386/109592-005.U11.bin",
L"roms/machines/deskpro386/109591-005.U13.bin",
0x000f8000, 65536, 0);
if (bios_only || !ret)
return ret;
machine_at_compaq_init(model, COMPAQ_DESKPRO386);
return ret;
}

View File

@@ -35,6 +35,7 @@
#include <86box/nvr.h> #include <86box/nvr.h>
#include <86box/fdd.h> #include <86box/fdd.h>
#include <86box/fdc.h> #include <86box/fdc.h>
#include <86box/fdc_ext.h>
#include <86box/gameport.h> #include <86box/gameport.h>
#include <86box/keyboard.h> #include <86box/keyboard.h>
#include <86box/sound.h> #include <86box/sound.h>
@@ -1495,7 +1496,8 @@ machine_tandy1k_init(const machine_t *model, int type)
device_add(&keyboard_tandy_device); device_add(&keyboard_tandy_device);
keyboard_set_table(scancode_tandy); keyboard_set_table(scancode_tandy);
device_add(&fdc_xt_device); if (fdc_type == FDC_INTERNAL)
device_add(&fdc_xt_device);
switch(type) { switch(type) {
case TYPE_TANDY: case TYPE_TANDY:
@@ -1524,6 +1526,7 @@ machine_tandy1k_init(const machine_t *model, int type)
device_add_ex(&vid_device_sl, dev); device_add_ex(&vid_device_sl, dev);
device_add(&pssj_device); device_add(&pssj_device);
device_add(&eep_1000sl2_device); device_add(&eep_1000sl2_device);
break;
} }
if (joystick_type != JOYSTICK_TYPE_NONE) if (joystick_type != JOYSTICK_TYPE_NONE)

View File

@@ -10,6 +10,7 @@
#include <86box/device.h> #include <86box/device.h>
#include <86box/fdd.h> #include <86box/fdd.h>
#include <86box/fdc.h> #include <86box/fdc.h>
#include <86box/fdc_ext.h>
#include <86box/gameport.h> #include <86box/gameport.h>
#include <86box/ibm_5161.h> #include <86box/ibm_5161.h>
#include <86box/keyboard.h> #include <86box/keyboard.h>
@@ -24,7 +25,9 @@ machine_xt_common_init(const machine_t *model)
pit_ctr_set_out_func(&pit->counters[1], pit_refresh_timer_xt); pit_ctr_set_out_func(&pit->counters[1], pit_refresh_timer_xt);
device_add(&fdc_xt_device); if (fdc_type == FDC_INTERNAL)
device_add(&fdc_xt_device);
nmi_init(); nmi_init();
if (joystick_type != JOYSTICK_TYPE_NONE) if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_device); device_add(&gameport_device);

View File

@@ -31,6 +31,7 @@
#include <86box/device.h> #include <86box/device.h>
#include <86box/fdd.h> #include <86box/fdd.h>
#include <86box/fdc.h> #include <86box/fdc.h>
#include <86box/fdc_ext.h>
#include <86box/gameport.h> #include <86box/gameport.h>
#include <86box/keyboard.h> #include <86box/keyboard.h>
#include <86box/lpt.h> #include <86box/lpt.h>
@@ -53,7 +54,8 @@ machine_xt_compaq_init(const machine_t *model)
pit_ctr_set_out_func(&pit->counters[1], pit_refresh_timer_xt); pit_ctr_set_out_func(&pit->counters[1], pit_refresh_timer_xt);
device_add(&keyboard_xt_compaq_device); device_add(&keyboard_xt_compaq_device);
device_add(&fdc_xt_device); if (fdc_type == FDC_INTERNAL)
device_add(&fdc_xt_device);
nmi_init(); nmi_init();
if (joystick_type != JOYSTICK_TYPE_NONE) if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_device); device_add(&gameport_device);

View File

@@ -36,6 +36,7 @@
#include <86box/device.h> #include <86box/device.h>
#include <86box/fdd.h> #include <86box/fdd.h>
#include <86box/fdc.h> #include <86box/fdc.h>
#include <86box/fdc_ext.h>
#include <86box/gameport.h> #include <86box/gameport.h>
#include <86box/keyboard.h> #include <86box/keyboard.h>
#include <86box/lpt.h> #include <86box/lpt.h>
@@ -117,7 +118,9 @@ machine_xt_zenith_init(const machine_t *model)
machine_common_init(model); machine_common_init(model);
device_add(&fdc_xt_device); if (fdc_type == FDC_INTERNAL)
device_add(&fdc_xt_device);
lpt1_remove(); /* only one parallel port */ lpt1_remove(); /* only one parallel port */
lpt2_remove(); lpt2_remove();
lpt1_init(0x278); lpt1_init(0x278);

View File

@@ -88,7 +88,7 @@ const machine_t machines[] = {
/* 8088 Machines */ /* 8088 Machines */
{ "[8088] IBM PC (1981)", "ibmpc", MACHINE_TYPE_8088, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 16, 64, 16, 0, machine_pc_init, NULL }, { "[8088] IBM PC (1981)", "ibmpc", MACHINE_TYPE_8088, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 16, 64, 16, 0, machine_pc_init, NULL },
{ "[8088] IBM PC (1982)", "ibmpc82", MACHINE_TYPE_8088, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 256, 256, 256, 0, machine_pc82_init, NULL }, { "[8088] IBM PC (1982)", "ibmpc82", MACHINE_TYPE_8088, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 256, 256, 256, 0, machine_pc82_init, NULL },
{ "[8088] IBM PCjr", "ibmpcjr", MACHINE_TYPE_8088, {{"Intel", cpus_pcjr}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_VIDEO | MACHINE_VIDEO_FIXED, 128, 640, 128, 0, machine_pcjr_init, pcjr_get_device }, { "[8088] IBM PCjr", "ibmpcjr", MACHINE_TYPE_8088, {{"Intel", cpus_pcjr}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_VIDEO | MACHINE_VIDEO_FIXED, 128, 640, 128, 0, machine_pcjr_init, pcjr_get_device },
{ "[8088] IBM XT (1982)", "ibmxt", MACHINE_TYPE_8088, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 64, 256, 64, 0, machine_xt_init, NULL }, { "[8088] IBM XT (1982)", "ibmxt", MACHINE_TYPE_8088, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 64, 256, 64, 0, machine_xt_init, NULL },
{ "[8088] IBM XT (1986)", "ibmxt86", MACHINE_TYPE_8088, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 256, 640, 64, 0, machine_xt86_init, NULL }, { "[8088] IBM XT (1986)", "ibmxt86", MACHINE_TYPE_8088, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 256, 640, 64, 0, machine_xt86_init, NULL },
{ "[8088] AMI XT clone", "amixt", MACHINE_TYPE_8088, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 64, 640, 64, 0, machine_xt_amixt_init, NULL }, { "[8088] AMI XT clone", "amixt", MACHINE_TYPE_8088, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 64, 640, 64, 0, machine_xt_amixt_init, NULL },
@@ -178,6 +178,7 @@ const machine_t machines[] = {
/* 386DX machines */ /* 386DX machines */
{ "[ACC 2168] AMI 386DX clone", "acc386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512, 16384, 128, 127, machine_at_acc386_init, NULL }, { "[ACC 2168] AMI 386DX clone", "acc386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512, 16384, 128, 127, machine_at_acc386_init, NULL },
{ "[SiS Rabbit] ASUS 386DX ISA", "asus386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512, 16384, 128, 127, machine_at_asus386_init, NULL }, { "[SiS Rabbit] ASUS 386DX ISA", "asus386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512, 16384, 128, 127, machine_at_asus386_init, NULL },
{ "[ISA] Compaq Deskpro 386", "deskpro386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX_Compaq}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 14, 1, 127, machine_at_deskpro386_init, NULL },
{ "[ISA] Compaq Portable III (386)", "portableiii386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC | MACHINE_VIDEO, 1, 14, 1, 127, machine_at_portableiii386_init, at_cpqiii_get_device }, { "[ISA] Compaq Portable III (386)", "portableiii386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC | MACHINE_VIDEO, 1, 14, 1, 127, machine_at_portableiii386_init, at_cpqiii_get_device },
{ "[ISA] Micronics 386 clone", "micronics386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512, 8192, 128, 127, machine_at_micronics386_init, NULL }, { "[ISA] Micronics 386 clone", "micronics386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512, 8192, 128, 127, machine_at_micronics386_init, NULL },
{ "[C&T 386] ECS 386/32", "ecs386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT, 1, 16, 1, 127, machine_at_ecs386_init, NULL }, { "[C&T 386] ECS 386/32", "ecs386", MACHINE_TYPE_386DX, {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT, 1, 16, 1, 127, machine_at_ecs386_init, NULL },

View File

@@ -36,6 +36,8 @@
#include <86box/dma.h> #include <86box/dma.h>
#include <86box/pic.h> #include <86box/pic.h>
#include <86box/plat.h> #include <86box/plat.h>
#include <86box/fdd.h>
#include <86box/fdc.h>
#include <86box/scsi.h> #include <86box/scsi.h>
#include <86box/scsi_aha154x.h> #include <86box/scsi_aha154x.h>
#include <86box/scsi_x54x.h> #include <86box/scsi_x54x.h>
@@ -187,6 +189,13 @@ aha154x_eeprom(x54x_t *dev, uint8_t cmd,uint8_t arg,uint8_t len,uint8_t off,uint
r = 0; r = 0;
aha_eeprom_save(dev); aha_eeprom_save(dev);
if (dev->type == AHA_154xCF) {
if (dev->fdc_address > 0) {
fdc_remove(dev->fdc);
fdc_set_base(dev->fdc, dev->fdc_address);
}
}
} }
if (cmd == 0x23) { if (cmd == 0x23) {
@@ -702,6 +711,8 @@ aha_initnvr(x54x_t *dev)
/* Initialize the on-board EEPROM. */ /* Initialize the on-board EEPROM. */
dev->nvr[0] = dev->HostID; /* SCSI ID 7 */ dev->nvr[0] = dev->HostID; /* SCSI ID 7 */
dev->nvr[0] |= (0x10 | 0x20 | 0x40); dev->nvr[0] |= (0x10 | 0x20 | 0x40);
if (dev->fdc_address == 0x370)
dev->nvr[0] |= EE0_ALTFLOP;
dev->nvr[1] = dev->Irq-9; /* IRQ15 */ dev->nvr[1] = dev->Irq-9; /* IRQ15 */
dev->nvr[1] |= (dev->DmaChannel<<4); /* DMA6 */ dev->nvr[1] |= (dev->DmaChannel<<4); /* DMA6 */
dev->nvr[2] = (EE2_HABIOS | /* BIOS enabled */ dev->nvr[2] = (EE2_HABIOS | /* BIOS enabled */
@@ -757,6 +768,10 @@ aha_init(const device_t *info)
dev->Irq = device_get_config_int("irq"); dev->Irq = device_get_config_int("irq");
dev->DmaChannel = device_get_config_int("dma"); dev->DmaChannel = device_get_config_int("dma");
dev->rom_addr = device_get_config_hex20("bios_addr"); dev->rom_addr = device_get_config_hex20("bios_addr");
if (!(dev->bus & DEVICE_MCA))
dev->fdc_address = device_get_config_hex16("fdc_addr");
else
dev->fdc_address = 0;
dev->HostID = 7; /* default HA ID */ dev->HostID = 7; /* default HA ID */
dev->setup_info_len = sizeof(aha_setup_t); dev->setup_info_len = sizeof(aha_setup_t);
dev->max_id = 7; dev->max_id = 7;
@@ -834,6 +849,8 @@ aha_init(const device_t *info)
dev->ven_get_irq = aha_get_irq; /* function to return IRQ from EEPROM */ dev->ven_get_irq = aha_get_irq; /* function to return IRQ from EEPROM */
dev->ven_get_dma = aha_get_dma; /* function to return DMA channel from EEPROM */ dev->ven_get_dma = aha_get_dma; /* function to return DMA channel from EEPROM */
dev->ha_bps = 10000000.0; /* fast SCSI */ dev->ha_bps = 10000000.0; /* fast SCSI */
if (dev->fdc_address > 0)
dev->fdc = device_add(&fdc_at_device);
break; break;
case AHA_154xCP: case AHA_154xCP:
@@ -1022,7 +1039,6 @@ static const device_config_t aha_154xb_config[] = {
} }
}; };
static const device_config_t aha_154x_config[] = { static const device_config_t aha_154x_config[] = {
{ {
"base", "Address", CONFIG_HEX16, "", 0x334, "base", "Address", CONFIG_HEX16, "", 0x334,
@@ -1122,6 +1138,122 @@ static const device_config_t aha_154x_config[] = {
}; };
static const device_config_t aha_154xcf_config[] = {
{
"base", "Address", CONFIG_HEX16, "", 0x334,
{
{
"None", 0
},
{
"0x330", 0x330
},
{
"0x334", 0x334
},
{
"0x230", 0x230
},
{
"0x234", 0x234
},
{
"0x130", 0x130
},
{
"0x134", 0x134
},
{
""
}
},
},
{
"irq", "IRQ", CONFIG_SELECTION, "", 9,
{
{
"IRQ 9", 9
},
{
"IRQ 10", 10
},
{
"IRQ 11", 11
},
{
"IRQ 12", 12
},
{
"IRQ 14", 14
},
{
"IRQ 15", 15
},
{
""
}
},
},
{
"dma", "DMA channel", CONFIG_SELECTION, "", 6,
{
{
"DMA 5", 5
},
{
"DMA 6", 6
},
{
"DMA 7", 7
},
{
""
}
},
},
{
"bios_addr", "BIOS Address", CONFIG_HEX20, "", 0,
{
{
"Disabled", 0
},
{
"C800H", 0xc8000
},
{
"D000H", 0xd0000
},
{
"D800H", 0xd8000
},
{
""
}
},
},
{
"fdc_addr", "FDC address", CONFIG_HEX16, "", 0,
{
{
"None", 0
},
{
"0x3f0", 0x3f0
},
{
"0x370", 0x370
},
{
""
}
},
},
{
"", "", -1
}
};
const device_t aha154xa_device = { const device_t aha154xa_device = {
"Adaptec AHA-154xA", "Adaptec AHA-154xA",
DEVICE_ISA | DEVICE_AT, DEVICE_ISA | DEVICE_AT,
@@ -1155,7 +1287,7 @@ const device_t aha154xcf_device = {
AHA_154xCF, AHA_154xCF,
aha_init, x54x_close, NULL, aha_init, x54x_close, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
aha_154x_config aha_154xcf_config
}; };
const device_t aha1640_device = { const device_t aha1640_device = {

View File

@@ -37,6 +37,8 @@
#include <86box/device.h> #include <86box/device.h>
#include <86box/nvr.h> #include <86box/nvr.h>
#include <86box/dma.h> #include <86box/dma.h>
#include <86box/fdd.h>
#include <86box/fdc.h>
#include <86box/pic.h> #include <86box/pic.h>
#include <86box/pci.h> #include <86box/pci.h>
#include <86box/plat.h> #include <86box/plat.h>

View File

@@ -38,6 +38,8 @@
#include <86box/mem.h> #include <86box/mem.h>
#include <86box/rom.h> #include <86box/rom.h>
#include <86box/device.h> #include <86box/device.h>
#include <86box/fdd.h>
#include <86box/fdc.h>
#include <86box/nvr.h> #include <86box/nvr.h>
#include <86box/plat.h> #include <86box/plat.h>
#include <86box/scsi.h> #include <86box/scsi.h>

View File

@@ -553,10 +553,10 @@ BEGIN
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Configure",IDC_CONFIGURE_ISAMEM_4,217,171,38,12 PUSHBUTTON "Configure",IDC_CONFIGURE_ISAMEM_4,217,171,38,12
LTEXT "External FD Controller:",IDT_1768,7,190,48,10 LTEXT "FDC Controller:",IDT_1768,7,190,48,10
COMBOBOX IDC_COMBO_FDC_EXT,64,189,155,120,CBS_DROPDOWNLIST | COMBOBOX IDC_COMBO_FDC_EXT,64,189,155,120,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Configure",IDC_CONFIGURE_FDC_EXT,217,185,38,12 PUSHBUTTON "Configure",IDC_CONFIGURE_FDC_EXT,217,189,38,12
END END
DLG_CFG_HARD_DISKS DIALOG DISCARDABLE 97, 0, 267, 154 DLG_CFG_HARD_DISKS DIALOG DISCARDABLE 97, 0, 267, 154

View File

@@ -1628,7 +1628,6 @@ recalc_fdc_list(HWND hdlg)
} }
if (!found_card) if (!found_card)
SendMessage(h, CB_SETCURSEL, 0, 0); SendMessage(h, CB_SETCURSEL, 0, 0);
EnableWindow(h, (machines[temp_machine].flags & MACHINE_FDC_FIXED) ? FALSE : TRUE);
} }