Add a correct PnP ROM for the CT4380 SB AWE64

Add a correct PnP ROM for the CT4380 "regular" Sound Blaster AWE64 and
add quarternary IDE to it to match the new ROM
This commit is contained in:
Alexander Babikov
2024-03-01 19:34:59 +05:00
parent 9a67f05a8f
commit 938fa5bde5

View File

@@ -48,7 +48,7 @@
#define PNP_ROM_SB_32_PNP "roms/sound/creative/CT3600 PnP.BIN"
#define PNP_ROM_SB_AWE32_PNP "roms/sound/creative/CT3980 PnP.BIN"
#define PNP_ROM_SB_AWE64_VALUE "roms/sound/creative/CT4520 PnP.BIN"
#define PNP_ROM_SB_AWE64 PNP_ROM_SB_AWE64_VALUE
#define PNP_ROM_SB_AWE64 "roms/sound/creative/CTL009DA.BIN"
#define PNP_ROM_SB_AWE64_GOLD "roms/sound/creative/CT4540 PnP.BIN"
/* 0 to 7 -> -14dB to 0dB i 2dB steps. 8 to 15 -> 0 to +14dB in 2dB steps.
@@ -1782,6 +1782,27 @@ sb_awe32_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *pr
}
}
static void
sb_awe64_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv)
{
sb_t *sb = (sb_t *) priv;
switch (ld) {
case 0: /* Audio */
case 2: /* WaveTable */
sb_16_pnp_config_changed(ld, config, sb);
break;
case 1: /* Game */
case 3: /* IDE */
sb_16_pnp_config_changed(ld ^ 2, config, sb);
break;
default:
break;
}
}
static void
sb_awe64_gold_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv)
{
@@ -2661,7 +2682,7 @@ sb_awe32_pnp_init(const device_t *info)
sb->gameport = gameport_add(&gameport_pnp_device);
if ((info->local != 2) && (info->local != 3) && (info->local != 4))
if ((info->local != 2) && (info->local != 4))
device_add(&ide_qua_pnp_device);
const char *pnp_rom_file = NULL;
@@ -2709,8 +2730,11 @@ sb_awe32_pnp_init(const device_t *info)
isapnp_add_card(pnp_rom, sizeof(sb->pnp_rom), sb_awe32_pnp_config_changed, NULL, NULL, NULL, sb);
break;
case 2:
case 3:
isapnp_add_card(pnp_rom, sizeof(sb->pnp_rom), sb_awe64_pnp_config_changed, NULL, NULL, NULL, sb);
break;
case 2:
case 4:
isapnp_add_card(pnp_rom, sizeof(sb->pnp_rom), sb_awe64_gold_pnp_config_changed, NULL, NULL, NULL, sb);
break;
@@ -2725,7 +2749,7 @@ sb_awe32_pnp_init(const device_t *info)
sb_dsp_setdma16(&sb->dsp, ISAPNP_DMA_DISABLED);
mpu401_change_addr(sb->mpu, 0);
if ((info->local != 2) && (info->local != 3) && (info->local != 4))
if ((info->local != 2) && (info->local != 4))
ide_remove_handlers(3);
emu8k_change_addr(&sb->emu8k, 0);