Standardize hdc_current into an array

This commit is contained in:
Jasmine Iwanek
2024-07-20 03:08:04 -04:00
parent 539dccdcd1
commit 680f65cf19
13 changed files with 28 additions and 28 deletions

View File

@@ -798,7 +798,7 @@ machine_at_compaq_init(const machine_t *model, int type)
break;
case COMPAQ_PORTABLEIII:
if (hdc_current == HDC_INTERNAL)
if (hdc_current[0] == 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 == HDC_INTERNAL)
if (hdc_current[0] == HDC_INTERNAL)
device_add(&ide_isa_device);
if (gfxcard[0] == VID_INTERNAL)
device_add(&compaq_plasma_device);

View File

@@ -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 == HDC_INTERNAL)
if (hdc_current[0] == HDC_INTERNAL)
(void) device_add(&xta_hd20_device);
return sys;

View File

@@ -353,7 +353,7 @@ ps1_setup(int model)
device_add(&fdc_at_ps1_device);
/* Enable the builtin HDC. */
if (hdc_current == HDC_INTERNAL) {
if (hdc_current[0] == HDC_INTERNAL) {
priv = device_add(&ps1_hdc_device);
ps1_hdc_inform(priv, &ps->ps1_91);

View File

@@ -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 == HDC_INTERNAL) {
if (hdc_current[0] == HDC_INTERNAL) {
priv = device_add(&ps1_hdc_device);
ps1_hdc_inform(priv, &ps2->ps2_91);
}

View File

@@ -94,7 +94,7 @@ machine_v86p_init(const machine_t *model)
if (gfxcard[0] == VID_INTERNAL)
device_add(&f82c425_video_device);
if (hdc_current <= HDC_INTERNAL)
if (hdc_current[0] <= HDC_INTERNAL)
device_add(&st506_xt_victor_v86p_device);
return ret;

View File

@@ -591,7 +591,7 @@ m24_kbd_write(uint16_t port, uint8_t val, void *priv)
* bit 7 - use BIOS HD on mainboard (on) / on controller (off)
* bit 6 - use OCG/CGA display adapter (on) / other display adapter (off)
*/
ret = (hdc_current == HDC_INTERNAL) ? 0x00 : 0x80;
ret = (hdc_current[0] == HDC_INTERNAL) ? 0x00 : 0x80;
ret |= video_is_cga() ? 0x40 : 0x00;
m24_kbd_adddata(ret);
@@ -2219,7 +2219,7 @@ m24_read(uint16_t port, UNUSED(void *priv))
"Reserved for HDU", same as for Switch 3 */
/* Switch 3 - Disable internal BIOS HD */
if (hdc_current != HDC_INTERNAL)
if (hdc_current[0] != HDC_INTERNAL)
ret |= 0x4;
/* Switch 2 - Set fast startup */
@@ -2349,7 +2349,7 @@ machine_xt_m24_init(const machine_t *model)
m24_kbd_init(m24_kbd);
device_add_ex(&m24_kbd_device, m24_kbd);
if (hdc_current == HDC_INTERNAL)
if (hdc_current[0] == HDC_INTERNAL)
device_add(&st506_xt_wd1002a_wx1_nobios_device);
return ret;
@@ -2409,7 +2409,7 @@ machine_xt_m240_init(const machine_t *model)
mm58274_init(nvr, model->nvrmask + 1);
if (hdc_current == HDC_INTERNAL)
if (hdc_current[0] == HDC_INTERNAL)
device_add(&st506_xt_wd1002a_wx1_nobios_device);
return ret;

View File

@@ -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 <= HDC_INTERNAL)
if (hdc_current[0] <= HDC_INTERNAL)
device_add(&st506_xt_toshiba_t1200_device);
return ret;