summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author ValleyBell <valleybell@gmx.de>2022-06-21 23:19:31 +0200
committer GitHub <noreply@github.com>2022-06-21 17:19:31 -0400
commitd950be1132b9fbe7a3b126cdeb76d674f67aae00 (patch)
tree22f2da438c9cad58c442fa18cbc9ec1f57b1fa9b /src/mame
parent61b9ae3a5b4386a1525c79208be7304fad9f05ee (diff)
fix Sega Pico PCM playback (#9965)
- fix uPD775x type - enforce "slave" mode (required for manual data stream) - hook up "PCM FIFO empty" interrupt
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/drivers/segapico.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mame/drivers/segapico.cpp b/src/mame/drivers/segapico.cpp
index a6efcfdb7d4..f95a4d75c66 100644
--- a/src/mame/drivers/segapico.cpp
+++ b/src/mame/drivers/segapico.cpp
@@ -319,18 +319,9 @@ void pico_base_state::pico_68k_io_write(offs_t offset, uint16_t data, uint16_t m
// value 8000 resets the FIFO? (always used with low reset line)
// value 0800 maps to the uPD7759's reset line (0 = reset, 1 = normal)
// value 4000 maps to the uPD7759's start line (0->1 = start)
+ m_sega_315_5641_pcm->fifo_reset_w(BIT(data, 15));
m_sega_315_5641_pcm->reset_w(BIT(data, 11));
m_sega_315_5641_pcm->start_w(BIT(data, 14));
- if (BIT(data, 14))
- {
- // Somewhere between "Reset Off" and the first sample data,
- // we need to send a few commands to make the sample stream work.
- // Doing that when rising the "start" line seems to work fine.
- m_sega_315_5641_pcm->port_w(0xFF); // "Last Sample" value (must be >= 0x10)
- m_sega_315_5641_pcm->port_w(0x00); // Dummy 1
- m_sega_315_5641_pcm->port_w(0x00); // Addr MSB
- m_sega_315_5641_pcm->port_w(0x00); // Addr LSB
- }
}
@@ -409,7 +400,7 @@ void pico_state::pico(machine_config &config)
SOFTWARE_LIST(config, "cart_list").set_original("pico");
SEGA_315_5641_PCM(config, m_sega_315_5641_pcm, upd7759_device::STANDARD_CLOCK*2);
- //m_sega_315_5641_pcm->drq().set(FUNC(pico_state::sound_cause_irq)); FIXME: this never worked - the MAME 315_5641 doesn't support slave mode
+ m_sega_315_5641_pcm->fifo_cb().set(FUNC(pico_state::sound_cause_irq));
m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "lspeaker", 0.16);
m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "rspeaker", 0.16);
}
@@ -429,7 +420,7 @@ void pico_state::picopal(machine_config &config)
SOFTWARE_LIST(config, "cart_list").set_original("pico");
SEGA_315_5641_PCM(config, m_sega_315_5641_pcm, upd7759_device::STANDARD_CLOCK*2);
- //m_sega_315_5641_pcm->drq().set(FUNC(pico_state::sound_cause_irq)); FIXME: this never worked - the MAME 315_5641 doesn't support slave mode
+ m_sega_315_5641_pcm->fifo_cb().set(FUNC(pico_state::sound_cause_irq));
m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "lspeaker", 0.16);
m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "rspeaker", 0.16);
}
@@ -627,7 +618,7 @@ void copera_state::copera(machine_config &config)
SOFTWARE_LIST(config, "cart_list").set_original("copera");
SEGA_315_5641_PCM(config, m_sega_315_5641_pcm, upd7759_device::STANDARD_CLOCK);
- //m_sega_315_5641_pcm->drq().set(FUNC(copera_state::sound_cause_irq)); FIXME: this never worked - the MAME 315_5641 doesn't support slave mode
+ m_sega_315_5641_pcm->fifo_cb().set(FUNC(copera_state::sound_cause_irq));
m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "lspeaker", 0.16);
m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "rspeaker", 0.16);
}