Do not attempt to initialize the on-board Vibra 16C if its PnP rom is not present

This commit is contained in:
OBattler
2023-10-10 00:22:40 +02:00
parent 54fb0f2976
commit d00d39b9e8
2 changed files with 3 additions and 3 deletions

View File

@@ -310,7 +310,7 @@ machine_at_cu430hx_gpio_init(void)
else if (cpu_busspeed > 60000000)
gpio |= 0xffff00ff;
if (sound_card_current[0] == SOUND_INTERNAL)
if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available())
gpio |= 0xffff04ff;
machine_set_gpio_default(gpio);
@@ -332,7 +332,7 @@ machine_at_cu430hx_common_init(const machine_t *model)
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 0, 0, 0); // riser
if (sound_card_current[0] == SOUND_INTERNAL)
if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available())
machine_snd = device_add(machine_get_snd_device(machine));
device_add(&i430hx_device);

View File

@@ -3910,7 +3910,7 @@ const device_t sb_vibra16c_onboard_device = {
.init = sb_vibra16_pnp_init,
.close = sb_close,
.reset = NULL,
{ .available = NULL },
{ .available = sb_vibra16c_available },
.speed_changed = sb_speed_changed,
.force_redraw = NULL,
.config = sb_16_pnp_config