Give the Intel TC430HX and Sony Vaio PCV-90 their onboard YMF701 audio

This commit is contained in:
win2kgamer
2025-09-06 18:24:29 -05:00
parent 5225b37448
commit 433c45b3e6
3 changed files with 15 additions and 5 deletions

View File

@@ -316,6 +316,9 @@ machine_at_tc430hx_gpio_init(void)
else if (cpu_busspeed > 60000000)
gpio |= 0xffff00ff;
if (sound_card_current[0] == SOUND_INTERNAL)
gpio |= 0xffff04ff;
machine_set_gpio_default(gpio);
}
@@ -350,6 +353,9 @@ machine_at_tc430hx_init(const machine_t *model)
if (gfxcard[0] == VID_INTERNAL)
device_add(machine_get_vid_device(machine));
if (sound_card_current[0] == SOUND_INTERNAL)
machine_snd = device_add(machine_get_snd_device(machine));
device_add(&i430hx_device);
device_add(&piix3_device);
device_add_params(&pc87306_device, (void *) PCX730X_AMI);
@@ -452,6 +458,9 @@ machine_at_pcv90_init(const machine_t *model)
device_add_params(&pc87306_device, (void *) PCX730X_AMI);
device_add(&intel_flash_bxt_ami_device);
if (sound_card_current[0] == SOUND_INTERNAL)
machine_snd = device_add(machine_get_snd_device(machine));
return ret;
}

View File

@@ -13854,7 +13854,7 @@ const machine_t machines[] = {
.max_multi = 3.5
},
.bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB,
.flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */
.flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_SOUND | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */
.ram = {
.min = 8192,
.max = 524288,
@@ -13873,7 +13873,7 @@ const machine_t machines[] = {
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_virge_375_pci_device,
.snd_device = NULL,
.snd_device = &ymf701_device,
.net_device = NULL
},
/* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix
@@ -13991,7 +13991,7 @@ const machine_t machines[] = {
.max_multi = 3.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_SOUND | MACHINE_GAMEPORT, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */
.ram = {
.min = 8192,
.max = 524288,
@@ -14010,7 +14010,7 @@ const machine_t machines[] = {
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = NULL,
.snd_device = &ymf701_device,
.net_device = NULL
},
/* [TEST] The board doesn't seem to have a KBC at all, which probably means it's an on-chip one on the PC87306 SIO.

View File

@@ -286,7 +286,8 @@ ymf701_reg_write(uint16_t addr, uint8_t val, void *priv)
sb_dsp_setirq(&ymf701->sb->dsp, ymf701->cur_irq);
sb_dsp_setdma8(&ymf701->sb->dsp, ymf701->cur_dma);
ymf701_add_opl(ymf701);
io_sethandler(ymf701->cur_addr + 4, 0x0002, sb_ct1345_mixer_read, NULL, NULL, sb_ct1345_mixer_write, NULL, NULL, ymf701->sb);
if (ymf701->cur_addr != 0x00)
io_sethandler(ymf701->cur_addr + 4, 0x0002, sb_ct1345_mixer_read, NULL, NULL, sb_ct1345_mixer_write, NULL, NULL, ymf701->sb);
break;
case 0x03: /* MPU/OPL/Gameport Config */
ymf701->regs[0x03] = val;