More fixes to mixer register FFh, turns out the lower 3 bits are not a DMA channel, fixes detection of Sound Blaster 16 non-PNP.
This commit is contained in:
@@ -158,7 +158,6 @@ static uint8_t sb_16_pnp_rom[] = {
|
|||||||
// clang-format on
|
// clang-format on
|
||||||
};
|
};
|
||||||
|
|
||||||
// #define ENABLE_SB_LOG 1
|
|
||||||
#ifdef ENABLE_SB_LOG
|
#ifdef ENABLE_SB_LOG
|
||||||
int sb_do_log = ENABLE_SB_LOG;
|
int sb_do_log = ENABLE_SB_LOG;
|
||||||
|
|
||||||
@@ -820,6 +819,9 @@ sb_ct1745_mixer_write(uint16_t addr, uint8_t val, void *priv)
|
|||||||
sb->dsp.sb_irqm8 = 0;
|
sb->dsp.sb_irqm8 = 0;
|
||||||
sb->dsp.sb_irqm16 = 0;
|
sb->dsp.sb_irqm16 = 0;
|
||||||
sb->dsp.sb_irqm401 = 0;
|
sb->dsp.sb_irqm401 = 0;
|
||||||
|
|
||||||
|
// mixer->regs[0xfd] = 0x10;
|
||||||
|
// mixer->regs[0xfe] = 0x06;
|
||||||
} else
|
} else
|
||||||
mixer->regs[mixer->index] = val;
|
mixer->regs[mixer->index] = val;
|
||||||
|
|
||||||
@@ -938,11 +940,16 @@ sb_ct1745_mixer_write(uint16_t addr, uint8_t val, void *priv)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xff:
|
case 0xff:
|
||||||
if (sb->dsp.sb_type >= SBAWE32) {
|
if (sb->dsp.sb_type >= SB16) {
|
||||||
if (val != ISAPNP_DMA_DISABLED)
|
/*
|
||||||
sb_dsp_setdma16_8(&sb->dsp, val & 0x07);
|
Bit 5: High DMA channel enabled (0 = yes, 1 = no);
|
||||||
|
Bit 2: ????;
|
||||||
|
Bit 1: ???? (16-bit to 8-bit translation?);
|
||||||
|
Bit 0: ????
|
||||||
|
Seen values: 20, 05, 04, 03
|
||||||
|
*/
|
||||||
sb_dsp_setdma16_enabled(&sb->dsp, !(val & 0x20));
|
sb_dsp_setdma16_enabled(&sb->dsp, !(val & 0x20));
|
||||||
sb_dsp_setdma16_translate(&sb->dsp, val != ISAPNP_DMA_DISABLED);
|
sb_dsp_setdma16_translate(&sb->dsp, val & 0x02);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1159,7 +1166,7 @@ sb_ct1745_mixer_read(uint16_t addr, void *priv)
|
|||||||
- Register FF = FF: Volume playback normal.
|
- Register FF = FF: Volume playback normal.
|
||||||
- Register FF = Not FF: Volume playback low unless
|
- Register FF = Not FF: Volume playback low unless
|
||||||
bit 6 of 82h is set. */
|
bit 6 of 82h is set. */
|
||||||
if (sb->dsp.sb_type >= SBAWE32)
|
if (sb->dsp.sb_type >= SB16)
|
||||||
ret = mixer->regs[mixer->index];
|
ret = mixer->regs[mixer->index];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -502,6 +502,7 @@ sb_16_write_dma(void *priv, uint16_t val)
|
|||||||
void
|
void
|
||||||
sb_dsp_setirq(sb_dsp_t *dsp, int irq)
|
sb_dsp_setirq(sb_dsp_t *dsp, int irq)
|
||||||
{
|
{
|
||||||
|
sb_dsp_log("IRQ now: %i\n", irq);
|
||||||
dsp->sb_irqnum = irq;
|
dsp->sb_irqnum = irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user