Deal with some magic numbers re hdc_current
This commit is contained in:
@@ -132,7 +132,7 @@ hdc_reset(void)
|
||||
hdc_current, (machines[machine].flags & MACHINE_HDC) ? 1 : 0);
|
||||
|
||||
/* If we have a valid controller, add its device. */
|
||||
if (hdc_current > 1)
|
||||
if (hdc_current > HDC_INTERNAL)
|
||||
device_add(controllers[hdc_current].device);
|
||||
|
||||
/* Now, add the tertiary and/or quaternary IDE controllers. */
|
||||
|
@@ -114,6 +114,7 @@ typedef struct config_t {
|
||||
|
||||
/* Other peripherals category */
|
||||
int fdc_type; /* Floppy disk controller type */
|
||||
int hdc_current; /* Hard disk controller type */
|
||||
int hdc; /* Hard disk controller */
|
||||
int scsi_card; /* SCSI controller */
|
||||
int ide_ter_enabled; /* Tertiary IDE controller enabled */
|
||||
|
@@ -798,7 +798,7 @@ machine_at_compaq_init(const machine_t *model, int type)
|
||||
break;
|
||||
|
||||
case COMPAQ_PORTABLEIII:
|
||||
if (hdc_current == 1)
|
||||
if (hdc_current == HDC_INTERNAL)
|
||||
device_add(&ide_isa_device);
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&compaq_plasma_device);
|
||||
@@ -806,7 +806,7 @@ machine_at_compaq_init(const machine_t *model, int type)
|
||||
break;
|
||||
|
||||
case COMPAQ_PORTABLEIII386:
|
||||
if (hdc_current == 1)
|
||||
if (hdc_current == HDC_INTERNAL)
|
||||
device_add(&ide_isa_device);
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&compaq_plasma_device);
|
||||
|
@@ -660,7 +660,7 @@ europc_boot(UNUSED(const device_t *info))
|
||||
*
|
||||
* We only do this if we have not configured another one.
|
||||
*/
|
||||
if (hdc_current == 1)
|
||||
if (hdc_current == HDC_INTERNAL)
|
||||
(void) device_add(&xta_hd20_device);
|
||||
|
||||
return sys;
|
||||
|
@@ -353,7 +353,7 @@ ps1_setup(int model)
|
||||
device_add(&fdc_at_ps1_device);
|
||||
|
||||
/* Enable the builtin HDC. */
|
||||
if (hdc_current == 1) {
|
||||
if (hdc_current == HDC_INTERNAL) {
|
||||
priv = device_add(&ps1_hdc_device);
|
||||
|
||||
ps1_hdc_inform(priv, &ps->ps1_91);
|
||||
|
@@ -179,7 +179,7 @@ ps2_isa_setup(int model, int cpu_type)
|
||||
device_add(&fdc_at_ps1_device);
|
||||
|
||||
/* Enable the builtin HDC. */
|
||||
if (hdc_current == 1) {
|
||||
if (hdc_current == HDC_INTERNAL) {
|
||||
priv = device_add(&ps1_hdc_device);
|
||||
ps1_hdc_inform(priv, &ps2->ps2_91);
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ machine_v86p_init(const machine_t *model)
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&f82c425_video_device);
|
||||
|
||||
if (hdc_current <= 1)
|
||||
if (hdc_current <= HDC_INTERNAL)
|
||||
device_add(&st506_xt_victor_v86p_device);
|
||||
|
||||
return ret;
|
||||
|
@@ -969,7 +969,7 @@ machine_xt_t1200_init(const machine_t *model)
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&t1200_video_device);
|
||||
|
||||
if (hdc_current <= 1)
|
||||
if (hdc_current <= HDC_INTERNAL)
|
||||
device_add(&st506_xt_toshiba_t1200_device);
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user