diff options
Diffstat (limited to 'src/devices/bus/isa/sblaster.cpp')
-rw-r--r-- | src/devices/bus/isa/sblaster.cpp | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/src/devices/bus/isa/sblaster.cpp b/src/devices/bus/isa/sblaster.cpp index 3242483a1b7..c073dd6fe07 100644 --- a/src/devices/bus/isa/sblaster.cpp +++ b/src/devices/bus/isa/sblaster.cpp @@ -15,7 +15,7 @@ #include "machine/pic8259.h" #include "sound/spkrdev.h" -#include "sound/ymf262.h" +#include "sound/ymopl.h" #include "speaker.h" @@ -69,7 +69,7 @@ static const int m_cmd_fifo_length[256] = -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* Ax */ 4, -1, 4, -1, 4, -1, 4, -1, 4, -1, -1, -1, -1, -1, 4, -1, /* Bx */ 4, -1, 4, -1, 4, -1, 4, -1, 4, -1, -1, -1, -1, -1, 4, -1, /* Cx */ - 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, /* Dx */ + 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, /* Dx */ 2, 1, 2, 1, 2, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, /* Ex */ -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1 /* Fx */ }; @@ -569,13 +569,16 @@ void sb_device::process_fifo(uint8_t cmd) case 0x42: // set input sample rate m_dsp.adc_freq = m_dsp.fifo[2] + (m_dsp.fifo[1] << 8); break; + case 0xd4: // continue 8-bit dma + drq_w(1); + break; case 0xd5: // pause 16-bit dma m_timer->adjust(attotime::never, 0); drq16_w(0); // drop DRQ m_dsp.dma_throttled = false; m_dsp.dma_timer_started = false; break; - case 0xd6: // resume 16-bit dma + case 0xd6: // continue 16-bit dma logerror("SB: 16-bit dma resume\n"); break; case 0xd9: // stop 16-bit autoinit @@ -1341,7 +1344,7 @@ void isa16_sblaster16_device::device_start() void sb_device::device_start() { - m_timer = timer_alloc(0, nullptr); + m_timer = timer_alloc(FUNC(sb_device::timer_tick), this); save_item(NAME(m_dack_out)); save_item(NAME(m_onebyte_midi)); @@ -1559,11 +1562,8 @@ void sb_device::dack_w(int line, uint8_t data) } } -void sb_device::device_timer(emu_timer &timer, device_timer_id tid, int param, void *ptr) +TIMER_CALLBACK_MEMBER(sb_device::timer_tick) { - if (tid) - return; - // printf("DMA timer expire\n"); uint16_t lsample, rsample; switch (m_dsp.flags) { @@ -1821,3 +1821,21 @@ void sb_device::xmit_char(uint8_t data) m_tx_waiting++; } } + +void isa16_sblaster16_device::remap(int space_id, offs_t start, offs_t end) +{ + if (space_id == AS_IO) + { + ymf262_device &ymf262 = *subdevice<ymf262_device>("ymf262"); + m_isa->install_device(0x0200, 0x0207, read8smo_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8smo_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0226, 0x0227, read8sm_delegate(*this, FUNC(sb_device::dsp_reset_r)), write8sm_delegate(*this, FUNC(sb_device::dsp_reset_w))); + m_isa->install_device(0x022a, 0x022b, read8sm_delegate(*this, FUNC(sb_device::dsp_data_r)), write8sm_delegate(*this, FUNC(sb_device::dsp_data_w))); + m_isa->install_device(0x022c, 0x022d, read8sm_delegate(*this, FUNC(sb_device::dsp_wbuf_status_r)), write8sm_delegate(*this, FUNC(sb_device::dsp_cmd_w))); + m_isa->install_device(0x022e, 0x022f, read8sm_delegate(*this, FUNC(sb_device::dsp_rbuf_status_r)), write8sm_delegate(*this, FUNC(sb_device::dsp_rbuf_status_w))); + m_isa->install_device(0x0224, 0x0225, read8sm_delegate(*this, FUNC(sb16_device::mixer_r)), write8sm_delegate(*this, FUNC(sb16_device::mixer_w))); + m_isa->install_device(0x0330, 0x0331, read8sm_delegate(*this, FUNC(sb16_device::mpu401_r)), write8sm_delegate(*this, FUNC(sb16_device::mpu401_w))); + m_isa->install_device(0x0388, 0x038b, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); + m_isa->install_device(0x0220, 0x0223, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); + m_isa->install_device(0x0228, 0x0229, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); + } +} |