IBM PS/1 Model 2121 FDC fix.
This commit is contained in:
@@ -780,7 +780,7 @@ fdc_write(uint16_t addr, uint8_t val, void *priv)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 4:
|
case 4:
|
||||||
if (!(fdc->flags & FDC_FLAG_PS1)) {
|
if (!(fdc->flags & FDC_FLAG_NO_DSR_RESET)) {
|
||||||
if (!(val & 0x80)) {
|
if (!(val & 0x80)) {
|
||||||
timer_set_delay_u64(&fdc->timer, 8 * TIMER_USEC);
|
timer_set_delay_u64(&fdc->timer, 8 * TIMER_USEC);
|
||||||
fdc->interrupt = -6;
|
fdc->interrupt = -6;
|
||||||
@@ -2608,6 +2608,20 @@ const device_t fdc_at_ps1_device = {
|
|||||||
.config = NULL
|
.config = NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const device_t fdc_at_ps1_2121_device = {
|
||||||
|
.name = "PC/AT Floppy Drive Controller (PS/1, PS/2 ISA)",
|
||||||
|
.internal_name = "fdc_at_ps1",
|
||||||
|
.flags = 0,
|
||||||
|
.local = FDC_FLAG_NO_DSR_RESET | FDC_FLAG_DISKCHG_ACTLOW | FDC_FLAG_AT | FDC_FLAG_PS1,
|
||||||
|
.init = fdc_init,
|
||||||
|
.close = fdc_close,
|
||||||
|
.reset = fdc_reset,
|
||||||
|
{ .available = NULL },
|
||||||
|
.speed_changed = NULL,
|
||||||
|
.force_redraw = NULL,
|
||||||
|
.config = NULL
|
||||||
|
};
|
||||||
|
|
||||||
const device_t fdc_at_smc_device = {
|
const device_t fdc_at_smc_device = {
|
||||||
.name = "PC/AT Floppy Drive Controller (SM(s)C FDC37Cxxx)",
|
.name = "PC/AT Floppy Drive Controller (SM(s)C FDC37Cxxx)",
|
||||||
.internal_name = "fdc_at_smc",
|
.internal_name = "fdc_at_smc",
|
||||||
|
@@ -55,6 +55,8 @@ extern int fdc_type;
|
|||||||
#define FDC_FLAG_SEC 0x1000 /* Is Secondary */
|
#define FDC_FLAG_SEC 0x1000 /* Is Secondary */
|
||||||
#define FDC_FLAG_TER 0x2000 /* Is Tertiary */
|
#define FDC_FLAG_TER 0x2000 /* Is Tertiary */
|
||||||
#define FDC_FLAG_QUA 0x3000 /* Is Quaternary */
|
#define FDC_FLAG_QUA 0x3000 /* Is Quaternary */
|
||||||
|
#define FDC_FLAG_CHANNEL 0x3000 /* Channel mask */
|
||||||
|
#define FDC_FLAG_NO_DSR_RESET 0x4000 /* Has no DSR reset */
|
||||||
|
|
||||||
typedef struct fdc_t {
|
typedef struct fdc_t {
|
||||||
uint8_t dor;
|
uint8_t dor;
|
||||||
@@ -251,6 +253,7 @@ extern const device_t fdc_at_ter_device;
|
|||||||
extern const device_t fdc_at_qua_device;
|
extern const device_t fdc_at_qua_device;
|
||||||
extern const device_t fdc_at_actlow_device;
|
extern const device_t fdc_at_actlow_device;
|
||||||
extern const device_t fdc_at_ps1_device;
|
extern const device_t fdc_at_ps1_device;
|
||||||
|
extern const device_t fdc_at_ps1_2121_device;
|
||||||
extern const device_t fdc_at_smc_device;
|
extern const device_t fdc_at_smc_device;
|
||||||
extern const device_t fdc_at_ali_device;
|
extern const device_t fdc_at_ali_device;
|
||||||
extern const device_t fdc_at_winbond_device;
|
extern const device_t fdc_at_winbond_device;
|
||||||
|
@@ -378,7 +378,7 @@ ps1_setup(int model)
|
|||||||
if (gfxcard[0] == VID_INTERNAL)
|
if (gfxcard[0] == VID_INTERNAL)
|
||||||
device_add(&ibm_ps1_2121_device);
|
device_add(&ibm_ps1_2121_device);
|
||||||
|
|
||||||
device_add(&fdc_at_ps1_device);
|
device_add(&fdc_at_ps1_2121_device);
|
||||||
|
|
||||||
device_add(&ide_isa_device);
|
device_add(&ide_isa_device);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user