mirror of
https://github.com/86Box/86Box.git
synced 2026-03-04 03:38:22 -07:00
Fix the WIN_SPECIFY command on both IDE and AT MFM to not ignore the parameters when executed on an already initialized drive, fixes the IDE issues on the Philips P3345, also implemented the C&T P82C604 super I/O chip used by the Philips P3345 to control the serial and parallel ports, and gave the machine the IDE flag and on-board IDE again, fixes #6859.
This commit is contained in:
@@ -2609,13 +2609,11 @@ ide_callback(void *priv)
|
||||
if (ide->type == IDE_ATAPI)
|
||||
err = ABRT_ERR;
|
||||
else {
|
||||
/* Only accept after RESET or DIAG. */
|
||||
if (!ide->params_specified) {
|
||||
ide->cfg_spt = (ide->tf->secount == 0) ? 256 : ide->tf->secount;
|
||||
ide->cfg_hpc = ide->tf->head + 1;
|
||||
ide->cfg_spt = (ide->tf->secount == 0) ? 256 : ide->tf->secount;
|
||||
ide->cfg_hpc = ide->tf->head + 1;
|
||||
|
||||
ide->params_specified = 1;
|
||||
|
||||
ide->params_specified = 1;
|
||||
}
|
||||
ide->command = 0x00;
|
||||
ide->tf->atastat = DRDY_STAT | DSC_STAT;
|
||||
ide->tf->error = 1;
|
||||
|
||||
@@ -690,18 +690,13 @@ write_error:
|
||||
*
|
||||
* We SHOULD check that here!! --FvK
|
||||
*/
|
||||
if (drive->cfg_spt == 0) {
|
||||
/* Only accept after RESET or DIAG. */
|
||||
drive->cfg_spt = mfm->secount;
|
||||
drive->cfg_hpc = mfm->head + 1;
|
||||
st506_at_log("WD1003(%d) parameters: tracks=%d, spt=%i, hpc=%i\n",
|
||||
mfm->drvsel, drive->tracks,
|
||||
drive->cfg_spt, drive->cfg_hpc);
|
||||
} else {
|
||||
st506_at_log("WD1003(%d) parameters: tracks=%d,spt=%i,hpc=%i (IGNORED)\n",
|
||||
mfm->drvsel, drive->tracks,
|
||||
drive->cfg_spt, drive->cfg_hpc);
|
||||
}
|
||||
drive->cfg_spt = mfm->secount;
|
||||
drive->cfg_hpc = mfm->head + 1;
|
||||
|
||||
st506_at_log("WD1003(%d) parameters: tracks=%d, spt=%i, hpc=%i\n",
|
||||
mfm->drvsel, drive->tracks,
|
||||
drive->cfg_spt, drive->cfg_hpc);
|
||||
|
||||
mfm->command = 0x00;
|
||||
mfm->status = STAT_READY | STAT_DSC;
|
||||
mfm->error = 1;
|
||||
|
||||
@@ -27,6 +27,8 @@ extern const device_t f82c606_device;
|
||||
extern const device_t f82c710_device;
|
||||
extern const device_t f82c710_pc5086_device;
|
||||
|
||||
extern const device_t p82c604_device;
|
||||
|
||||
/* Commodore */
|
||||
extern const device_t cbm_io_device;
|
||||
|
||||
|
||||
@@ -505,11 +505,12 @@ machine_at_p3345_init(const machine_t *model)
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
machine_at_common_ide_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&neat_device);
|
||||
device_add(&p82c604_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
@@ -6184,7 +6184,7 @@ const machine_t machines[] = {
|
||||
.max_multi = 0
|
||||
},
|
||||
.bus_flags = MACHINE_AT,
|
||||
.flags = 0,
|
||||
.flags = MACHINE_IDE,
|
||||
.ram = {
|
||||
.min = 2048,
|
||||
.max = 8192,
|
||||
|
||||
@@ -31,6 +31,7 @@ add_library(sio OBJECT
|
||||
sio_fdc37c93x.c
|
||||
sio_fdc37m60x.c
|
||||
sio_it86x1f.c
|
||||
sio_p82c604.c
|
||||
sio_pc87310.c
|
||||
sio_pc873xx.c
|
||||
sio_pc87306.c
|
||||
|
||||
Reference in New Issue
Block a user