Sound Blaster 16 and AWE32 MPU-401 base address and 16-bit DMA channel are now configurable;

AHA-154x SCSI controller base address, IRQ, and 16-bit DMA channel are now configurable.
This commit is contained in:
OBattler
2016-11-13 18:21:15 +01:00
parent 65b93b4347
commit 7cb901e5e6
9 changed files with 419 additions and 14 deletions

View File

@@ -253,11 +253,11 @@ void sb_8_write_dma(sb_dsp_t *dsp, uint8_t val)
}
uint16_t sb_16_read_dma(sb_dsp_t *dsp)
{
return dma_channel_read(5);
return dma_channel_read(dsp->sb_16_dmanum);
}
void sb_16_write_dma(sb_dsp_t *dsp, uint16_t val)
{
dma_channel_write(5, val);
dma_channel_write(dsp->sb_16_dmanum, val);
}
void sb_dsp_setirq(sb_dsp_t *dsp, int irq)
@@ -270,6 +270,11 @@ void sb_dsp_setdma8(sb_dsp_t *dsp, int dma)
dsp->sb_8_dmanum = dma;
}
void sb_dsp_setdma16(sb_dsp_t *dsp, int dma)
{
dsp->sb_16_dmanum = dma;
}
void sb_exec_command(sb_dsp_t *dsp)
{
int temp,c;
@@ -611,6 +616,7 @@ void sb_dsp_init(sb_dsp_t *dsp, int type)
dsp->sb_irqnum = 5;
dsp->sb_8_dmanum = 1;
dsp->sb_16_dmanum = 5;
sb_doreset(dsp);