diff options
-rw-r--r-- | scripts/src/machine.lua | 12 | ||||
-rw-r--r-- | scripts/src/sound.lua | 12 | ||||
-rw-r--r-- | src/devices/machine/tc9223.cpp | 75 | ||||
-rw-r--r-- | src/devices/machine/tc9223.h | 33 | ||||
-rw-r--r-- | src/devices/sound/nn71003f.cpp | 85 | ||||
-rw-r--r-- | src/devices/sound/nn71003f.h | 41 | ||||
-rw-r--r-- | src/devices/video/zr36110.cpp | 208 | ||||
-rw-r--r-- | src/devices/video/zr36110.h | 49 | ||||
-rw-r--r-- | src/mame/nichibutsu/hrdvd.cpp | 80 |
9 files changed, 558 insertions, 37 deletions
diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua index 1d63d08dca7..1aa9da2fd2c 100644 --- a/scripts/src/machine.lua +++ b/scripts/src/machine.lua @@ -5214,3 +5214,15 @@ if (MACHINES["PCCARD_SRAM"]~=null) then MAME_DIR .. "src/devices/machine/pccard_sram.h", } end + +--------------------------------------------------- +-- +--@src/devices/machine/tc9223.h,MACHINES["TC9223"] = true +--------------------------------------------------- + +if (MACHINES["TC9223"]~=null) then + files { + MAME_DIR .. "src/devices/machine/tc9223.cpp", + MAME_DIR .. "src/devices/machine/tc9223.h", + } +end diff --git a/scripts/src/sound.lua b/scripts/src/sound.lua index c1bf4f51af8..59ebe104b2e 100644 --- a/scripts/src/sound.lua +++ b/scripts/src/sound.lua @@ -1620,3 +1620,15 @@ if (SOUNDS["LYNX"]~=null) then MAME_DIR .. "src/devices/sound/lynx.h", } end + +--------------------------------------------------- +-- +--@src/devices/sound/nn71003f.h,SOUNDS["NN71003F"] = true +--------------------------------------------------- + +if (SOUNDS["NN71003F"]~=null) then + files { + MAME_DIR .. "src/devices/sound/nn71003f.cpp", + MAME_DIR .. "src/devices/sound/nn71003f.h", + } +end diff --git a/src/devices/machine/tc9223.cpp b/src/devices/machine/tc9223.cpp new file mode 100644 index 00000000000..77e6ba1ffa5 --- /dev/null +++ b/src/devices/machine/tc9223.cpp @@ -0,0 +1,75 @@ +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert + +// TC9223P/TC9223F PLL-based frequency synthesizer + +// Minimal implementation, logs the commands + +#include "emu.h" +#include "tc9223.h" + +DEFINE_DEVICE_TYPE(TC9223, tc9223_device, "tc9223", "TC9223P/F frequency synthesizer") + +tc9223_device::tc9223_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, TC9223, tag, owner, clock) +{ +} + +void tc9223_device::device_start() +{ + save_item(NAME(m_shift)); + save_item(NAME(m_stb)); + save_item(NAME(m_clk)); + save_item(NAME(m_dat)); +} + +void tc9223_device::device_reset() +{ + m_shift = 0; + m_stb = 0; + m_clk = 0; + m_dat = 0; +} + +void tc9223_device::stb_w(int state) +{ + if(state == m_stb) + return; + m_stb = state; + if(!m_stb) + return; + switch(m_shift >> 14) { + case 0: + logerror("gpio=%s lock=%s\n", + m_shift & 0x1000 ? "1" : "0", + m_shift & 0x2000 ? "unlocked" : "normal"); + break; + case 1: + logerror("a=%d n=%d\n", m_shift & 0x3f, (m_shift >> 6) & 0x7ff); + break; + case 2: + logerror("divider %d\n", m_shift & 0x3fff); + break; + case 3: + logerror("%s %s\n", + m_shift & 0x1000 ? "falling" : "rising", + m_shift & 0x2000 ? "non-inverting" : "inverting"); + break; + } +} + +void tc9223_device::clk_w(int state) +{ + if(state == m_clk) + return; + m_clk = state; + if(!m_clk) + return; + + m_shift = (m_shift >> 1) | (m_dat ? 0x8000 : 0); +} + +void tc9223_device::dat_w(int state) +{ + m_dat = state; +} diff --git a/src/devices/machine/tc9223.h b/src/devices/machine/tc9223.h new file mode 100644 index 00000000000..3556fa3d957 --- /dev/null +++ b/src/devices/machine/tc9223.h @@ -0,0 +1,33 @@ +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert + +// TC9223P/TC9223F PLL-based frequency synthesizer + + +#ifndef DEVICES_MACHINE_TC9223_H +#define DEVICES_MACHINE_TC9223_H + +#pragma once + +class tc9223_device : public device_t +{ +public: + tc9223_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + + void stb_w(int state); + void dat_w(int state); + void clk_w(int state); + +protected: + void device_start(); + void device_reset(); + +private: + u16 m_shift; + int m_stb, m_clk, m_dat; +}; + +DECLARE_DEVICE_TYPE(TC9223, tc9223_device) + +#endif + diff --git a/src/devices/sound/nn71003f.cpp b/src/devices/sound/nn71003f.cpp new file mode 100644 index 00000000000..f9cc6c04b70 --- /dev/null +++ b/src/devices/sound/nn71003f.cpp @@ -0,0 +1,85 @@ +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert + +// Nippon Steel Corp NN71003F mpeg audio decoder + +// No info could be found anywhere. Function has (minimally) been +// found from pin connection tracing on a hrdvd board. + +#include "emu.h" +#include "nn71003f.h" + +DEFINE_DEVICE_TYPE(NN71003F, nn71003f_device, "nn71003f", "NN71003F mpeg audio chip") + +nn71003f_device::nn71003f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, NN71003F, tag, owner, clock), + device_sound_interface(mconfig, *this), + m_irq_cb(*this) +{ +} + +void nn71003f_device::device_start() +{ + m_irq_cb.resolve_safe(); + save_item(NAME(m_cmd_atn)); + save_item(NAME(m_cmd_clk)); + save_item(NAME(m_cmd_dat)); +} + +void nn71003f_device::device_reset() +{ + m_cmd_atn = 0; + m_cmd_clk = 0; + m_cmd_dat = 0; +} + +void nn71003f_device::cmd_atn_w(int state) +{ + if(state == m_cmd_atn) + return; + m_cmd_atn = state; + if(!m_cmd_atn) + m_cmd_cnt = 0; +} + +void nn71003f_device::cmd_clk_w(int state) +{ + if(state == m_cmd_clk) + return; + m_cmd_clk = state; + if(!m_cmd_clk) + return; + m_cmd_byte = (m_cmd_byte << 1) | m_cmd_dat; + m_cmd_cnt ++; + if(m_cmd_cnt & 7) + return; + + logerror("CMD %x: %02x\n", m_cmd_cnt >> 3, m_cmd_byte); +} + +void nn71003f_device::cmd_dat_w(int state) +{ + if(state == m_cmd_dat) + return; + m_cmd_dat = state; +} + +void nn71003f_device::frm_w(int state) +{ + logerror("frm_w %d\n", state); +} + +void nn71003f_device::dat_w(int state) +{ + logerror("dat_w %d\n", state); +} + +void nn71003f_device::clk_w(int state) +{ + logerror("clk_w %d\n", state); +} + +void nn71003f_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) +{ +} + diff --git a/src/devices/sound/nn71003f.h b/src/devices/sound/nn71003f.h new file mode 100644 index 00000000000..128aabb3fcf --- /dev/null +++ b/src/devices/sound/nn71003f.h @@ -0,0 +1,41 @@ +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert + +// Nippon Steel Corp NN71003F mpeg audio decoder + +#ifndef DEVICES_SOUND_NN71003F_H +#define DEVICES_SOUND_NN71003F_H + +#pragma once + +#include "mpeg_audio.h" + +class nn71003f_device : public device_t, public device_sound_interface +{ +public: + nn71003f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + + void frm_w(int state); + void dat_w(int state); + void clk_w(int state); + + void cmd_atn_w(int state); + void cmd_clk_w(int state); + void cmd_dat_w(int state); + + auto irq_cb() { return m_irq_cb.bind(); } + +protected: + virtual void device_start() override; + virtual void device_reset() override; + virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override; + +private: + devcb_write_line m_irq_cb; + u8 m_cmd_byte, m_cmd_cnt; + int m_cmd_atn, m_cmd_clk, m_cmd_dat; +}; + +DECLARE_DEVICE_TYPE(NN71003F, nn71003f_device) + +#endif diff --git a/src/devices/video/zr36110.cpp b/src/devices/video/zr36110.cpp index 37caf1c0244..745ee96a79a 100644 --- a/src/devices/video/zr36110.cpp +++ b/src/devices/video/zr36110.cpp @@ -18,13 +18,16 @@ DEFINE_DEVICE_TYPE(ZR36110, zr36110_device, "zr36110", "Zoran ZR36110 mpeg decod zr36110_device::zr36110_device(const machine_config &mconfig, char const *tag, device_t *owner, u32 clock) : device_t(mconfig, ZR36110, tag, owner, clock), - m_drq_handler(*this) + m_drq_w(*this), + m_sp_frm_w{*this, *this}, + m_sp_dat_w{*this, *this}, + m_sp_clk_w{*this, *this} { } void zr36110_device::device_start() { - m_drq_handler.resolve_safe(); + m_drq_w.resolve_safe(); save_item(NAME(m_mc1_adr)); save_item(NAME(m_mc23_adr)); @@ -57,6 +60,32 @@ void zr36110_device::mc18_w(u8 data) m_mc1_adr = m_mc1_adr + 1; } +void zr36110_device::mc1x_w(u16 data) +{ + if(!(m_bus_control & 0x80)) + mc18_w(data >> 8); + else if(m_bus_control & 0x40) { + mc18_w(data >> 8); + mc18_w(data); + } else { + mc18_w(data); + mc18_w(data >> 8); + } +} + +void zr36110_device::mc1_w(u16 data) +{ + if(!(m_bus_control & 0x80)) + mc18_w(data); + else if(m_bus_control & 0x40) { + mc18_w(data); + mc18_w(data >> 8); + } else { + mc18_w(data >> 8); + mc18_w(data); + } +} + void zr36110_device::mc238_w(u8 data) { m_setup_adr = 0; @@ -67,6 +96,32 @@ void zr36110_device::mc238_w(u8 data) m_state = S_IDLE; } +void zr36110_device::mc23_w(u16 data) +{ + if(!(m_bus_control & 0x80)) + mc238_w(data); + else if(m_bus_control & 0x40) { + mc238_w(data); + mc238_w(data >> 8); + } else { + mc238_w(data >> 8); + mc238_w(data); + } +} + +void zr36110_device::mc23x_w(u16 data) +{ + if(!(m_bus_control & 0x80)) + mc238_w(data >> 8); + else if(m_bus_control & 0x40) { + mc238_w(data >> 8); + mc238_w(data); + } else { + mc238_w(data); + mc238_w(data >> 8); + } +} + double zr36110_device::u6_10_to_f(u16 val) { if(val & 0x8000) @@ -175,14 +230,41 @@ void zr36110_device::setup8_w(u8 data) m_setup_adr = m_setup_adr + 1; } +void zr36110_device::setup_w(u16 data) +{ + if(!(m_bus_control & 0x80)) + setup8_w(data); + else if(m_bus_control & 0x40) { + setup8_w(data); + setup8_w(data >> 8); + } else { + setup8_w(data >> 8); + setup8_w(data); + } +} + +void zr36110_device::setupx_w(u16 data) +{ + if(!(m_bus_control & 0x80)) + setup8_w(data >> 8); + else if(m_bus_control & 0x40) { + setup8_w(data >> 8); + setup8_w(data); + } else { + setup8_w(data); + setup8_w(data >> 8); + } +} + void zr36110_device::cmd8_w(u8 data) { - LOG("cmd_w %02x\n", data); + // LOG("cmd_w %02x\n", data); if(m_cmd_phase) { m_cmd |= data; switch(m_cmd & 0xff) { case 0x00: go(); break; + case 0x81: case 0x82: case 0x83: case 0x84: end_decoding(m_cmd & 3); break; default: logerror("Unknown command %02x.%02x\n", m_cmd >> 8, m_cmd & 0xff); } @@ -191,21 +273,123 @@ void zr36110_device::cmd8_w(u8 data) m_cmd_phase = !m_cmd_phase; } -u8 zr36110_device::stat0_r() +void zr36110_device::cmd_w(u16 data) +{ + if(!(m_bus_control & 0x80)) + cmd8_w(data); + else if(m_bus_control & 0x40) { + cmd8_w(data); + cmd8_w(data >> 8); + } else { + cmd8_w(data >> 8); + cmd8_w(data); + } +} + +void zr36110_device::cmdx_w(u16 data) +{ + if(!(m_bus_control & 0x80)) + cmd8_w(data >> 8); + else if(m_bus_control & 0x40) { + cmd8_w(data >> 8); + cmd8_w(data); + } else { + cmd8_w(data); + cmd8_w(data >> 8); + } +} + +void zr36110_device::dma8_w(u8 data) +{ + logerror("dna %02x\n", data); +} + +void zr36110_device::dma_w(u16 data) +{ + if(!(m_bus_control & 0x80)) + dma8_w(data); + else if(m_bus_control & 0x40) { + dma8_w(data); + dma8_w(data >> 8); + } else { + dma8_w(data >> 8); + dma8_w(data); + } +} + +void zr36110_device::dmax_w(u16 data) +{ + if(!(m_bus_control & 0x80)) + dma8_w(data >> 8); + else if(m_bus_control & 0x40) { + dma8_w(data >> 8); + dma8_w(data); + } else { + dma8_w(data); + dma8_w(data >> 8); + } +} + +u8 zr36110_device::stat08_r() +{ + return 0x20 | m_state; +} + +u8 zr36110_device::stat18_r() +{ + return 0x0c; +} + +u8 zr36110_device::stat28_r() +{ + return 0x01; +} + +u16 zr36110_device::stat0_r() { return 0x20 | m_state; } -u8 zr36110_device::stat1_r() +u16 zr36110_device::stat1_r() { return 0x0c; } -u8 zr36110_device::stat2_r() +u16 zr36110_device::stat2_r() { return 0x01; } +u16 zr36110_device::stat0x_r() +{ + return (0x20 | m_state) << 8; +} + +u16 zr36110_device::stat1x_r() +{ + return 0x0c << 8; +} + +u16 zr36110_device::stat2x_r() +{ + return 0x01 << 8; +} + +u8 zr36110_device::user8_r() +{ + return 0; +} + +u16 zr36110_device::user_r() +{ + return 0; +} + +u16 zr36110_device::userx_r() +{ + return 0; +} + void zr36110_device::go() { if(m_state != S_IDLE) { @@ -215,4 +399,16 @@ void zr36110_device::go() logerror("command GO\n"); m_bus_control = m_setup[0]; m_state = S_NORMAL; + m_drq_w(1); +} + +void zr36110_device::end_decoding(u8 mode) +{ + if(m_state != S_NORMAL) { + logerror("command END DECODING on wrong state, ignoring\n"); + return; + } + logerror("command END DECODING %d\n", mode); + m_state = S_IDLE; + m_drq_w(0); } diff --git a/src/devices/video/zr36110.h b/src/devices/video/zr36110.h index a2864e35e2e..9785da7f656 100644 --- a/src/devices/video/zr36110.h +++ b/src/devices/video/zr36110.h @@ -13,17 +13,48 @@ class zr36110_device : public device_t public: zr36110_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); - auto drq_handler() { return m_drq_handler.bind(); } + auto drq_w() { return m_drq_w.bind(); } + auto sp1_frm_w() { return m_sp_frm_w[0].bind(); } + auto sp1_dat_w() { return m_sp_dat_w[0].bind(); } + auto sp1_clk_w() { return m_sp_clk_w[0].bind(); } + auto sp2_frm_w() { return m_sp_frm_w[1].bind(); } + auto sp2_dat_w() { return m_sp_dat_w[1].bind(); } + auto sp2_clk_w() { return m_sp_clk_w[1].bind(); } - void setup8_w(u8 data); // a = 0 + void setup8_w(u8 data); // a = 0 (also mpeg data in pio mode) void mc18_w (u8 data); // a = 1 void cmd8_w (u8 data); // a = 2 void mc238_w (u8 data); // a = 3 - u8 stat0_r(); - u8 stat1_r(); - u8 stat2_r(); - u8 user_r (); // a = 3 + void setup_w(u16 data); // a = 0 (also mpeg data in pio mode) + void mc1_w (u16 data); // a = 1 + void cmd_w (u16 data); // a = 2 + void mc23_w (u16 data); // a = 3 + + // For when d0-d7 and d8-d15 are deliberately inverted + void setupx_w(u16 data); // a = 0 (also mpeg data in pio mode) + void mc1x_w (u16 data); // a = 1 + void cmdx_w (u16 data); // a = 2 + void mc23x_w (u16 data); // a = 3 + + void dma8_w (u8 data); // mpeg data write with dma + void dma_w (u16 data); + void dmax_w (u16 data); + + u8 stat08_r(); // a = 0 + u8 stat18_r(); // a = 1 + u8 stat28_r(); // a = 2 + u8 user8_r(); // a = 3 + + u16 stat0_r(); // a = 0 + u16 stat1_r(); // a = 1 + u16 stat2_r(); // a = 2 + u16 user_r(); // a = 3 + + u16 stat0x_r(); // a = 0 + u16 stat1x_r(); // a = 1 + u16 stat2x_r(); // a = 2 + u16 userx_r(); // a = 3 protected: virtual void device_start() override; @@ -41,7 +72,10 @@ private: S_END = 0x8 }; - devcb_write_line m_drq_handler; + devcb_write_line m_drq_w; + devcb_write_line m_sp_frm_w[2]; + devcb_write_line m_sp_dat_w[2]; + devcb_write_line m_sp_clk_w[2]; u8 m_setup[0x80]; u32 m_mc1_adr; @@ -56,6 +90,7 @@ private: void setup_show() const; void go(); + void end_decoding(u8 mode); }; DECLARE_DEVICE_TYPE(ZR36110, zr36110_device) diff --git a/src/mame/nichibutsu/hrdvd.cpp b/src/mame/nichibutsu/hrdvd.cpp index 6ba27ce7bc0..dcf9a0cdd1c 100644 --- a/src/mame/nichibutsu/hrdvd.cpp +++ b/src/mame/nichibutsu/hrdvd.cpp @@ -18,9 +18,12 @@ H8/3002 MN7100 8-bit channel data acquisition system Fujitsu MD0208 - Zoran ZR36110PQC + Zoran ZR36110PQC (mpeg ps/video decoder) + Nippon Steel Corp NN71003F (mpeg audio decoder) + uPD6379A dual 16-bits DAC + Toshiba TC9223 PLL IDE and RS232c ports - xtal 27 MHz, 12.288MHz + xtal 27 MHz (dvd board), 12.288MHz (main board) H8 ports directions: 8: fe /5 ---ooooi @@ -38,8 +41,10 @@ #include "cpu/m68000/tmp68301.h" #include "machine/nvram.h" #include "machine/timer.h" +#include "sound/nn71003f.h" #include "video/v9938.h" #include "video/zr36110.h" +#include "machine/tc9223.h" #include "nichisnd.h" class hrdvd_ata_controller_device : public abstract_ata_interface_device @@ -64,8 +69,14 @@ public: m_maincpu(*this, "maincpu"), m_subcpu(*this, "subcpu"), m_ata(*this, "ata"), + m_video(*this, "v9958"), m_mpeg(*this, "mpeg"), + m_mpega(*this, "mpeg_audio"), + m_pll(*this, "pll"), m_nichisnd(*this, "nichisnd"), + m_lspeaker(*this, "lspeaker"), + m_rspeaker(*this, "rspeaker"), + m_screen(*this, "screen"), m_key(*this, "KEY.%u", 0), m_region_maincpu(*this, "maincpu") { } @@ -73,8 +84,14 @@ public: required_device<tmp68301_device> m_maincpu; required_device<h83002_device> m_subcpu; required_device<hrdvd_ata_controller_device> m_ata; + required_device<v9958_device> m_video; required_device<zr36110_device> m_mpeg; + required_device<nn71003f_device> m_mpega; + required_device<tc9223_device> m_pll; required_device<nichisnd_device> m_nichisnd; + required_device<speaker_device> m_lspeaker; + required_device<speaker_device> m_rspeaker; + required_device<screen_device> m_screen; required_ioport_array<5> m_key; required_memory_region m_region_maincpu; @@ -114,22 +131,24 @@ uint16_t hrdvd_state::pb_r() void hrdvd_state::pb_w(uint16_t data) { + u8 delta = data ^ m_pb; m_pb = (m_pb & 0xc0) | (data & 0x3f); - logerror("pb %02x\n", data); + m_mpega->cmd_atn_w(BIT(m_pb, 0)); + m_mpega->cmd_clk_w(BIT(m_pb, 1)); + m_mpega->cmd_dat_w(BIT(m_pb, 2)); + if(delta & 0x38) + logerror("pb %02x\n", data); } void hrdvd_state::pa_w(uint16_t data) { - if((m_pa & 0x80) && !(data & 0x80)) - logerror("bit %c\n", data & 0x40 ? '1' : '0'); - if(m_pa & 0x20) - logerror("bit reset\n"); + u8 delta = data ^ m_pa; m_pa = data; - logerror("pa %02x %c%c%c\n", - data, - data & 0x80 ? 'c' : '-', - data & 0x40 ? 'd' : '-', - data & 0x20 ? '#' : '-'); + m_pll->stb_w(BIT(m_pa, 5)); + m_pll->dat_w(BIT(m_pa, 6)); + m_pll->clk_w(BIT(m_pa, 7)); + if(delta & 0x1f) + logerror("pa %02x\n", data); } uint16_t hrdvd_state::hrdvd_mux_r() @@ -213,10 +232,11 @@ void hrdvd_state::hrdvd_sub_map(address_map &map) { map(0x000000, 0x01ffff).rom(); - map(0x020008, 0x020008).rw(m_mpeg, FUNC(zr36110_device::stat0_r), FUNC(zr36110_device::setup8_w)); - map(0x02000a, 0x02000a).rw(m_mpeg, FUNC(zr36110_device::stat1_r), FUNC(zr36110_device::mc18_w)); - map(0x02000c, 0x02000c).rw(m_mpeg, FUNC(zr36110_device::stat2_r), FUNC(zr36110_device::cmd8_w)); - map(0x02000e, 0x02000e). w(m_mpeg, FUNC(zr36110_device::mc238_w)); + map(0x020008, 0x020009).rw(m_mpeg, FUNC(zr36110_device::stat0x_r), FUNC(zr36110_device::setupx_w)); + map(0x02000a, 0x02000b).rw(m_mpeg, FUNC(zr36110_device::stat1x_r), FUNC(zr36110_device::mc1x_w)); + map(0x02000c, 0x02000d).rw(m_mpeg, FUNC(zr36110_device::stat2x_r), FUNC(zr36110_device::cmdx_w)); + map(0x02000e, 0x02000f).rw(m_mpeg, FUNC(zr36110_device::userx_r), FUNC(zr36110_device::mc23x_w)); + map(0x020010, 0x02001f). w(m_mpeg, FUNC(zr36110_device::dmax_w)); map(0x040018, 0x040019).rw(m_ata, FUNC(hrdvd_ata_controller_device::dma_read), FUNC(hrdvd_ata_controller_device::dma_write)); map(0x040028, 0x04002f).rw(m_ata, FUNC(hrdvd_ata_controller_device::read), FUNC(hrdvd_ata_controller_device::write)); @@ -443,18 +463,30 @@ void hrdvd_state::hrdvd(machine_config &config) // NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - /* video hardware */ - v9958_device &v9958(V9958(config, "v9958", XTAL(21'477'272))); // typical 9958 clock, not verified - v9958.set_screen_ntsc("screen"); - v9958.set_vram_size(0x20000); - v9958.int_cb().set_inputline(m_maincpu, 0); - SCREEN(config, "screen", SCREEN_TYPE_RASTER); + /* video & sound hardware */ + TC9223(config, m_pll); + + V9958(config, m_video, XTAL(21'477'272)); // typical 9958 clock, not verified + m_video->set_screen_ntsc(m_screen); + m_video->set_vram_size(0x20000); + m_video->int_cb().set_inputline(m_maincpu, 0); + + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); ZR36110(config, m_mpeg, 27_MHz_XTAL/2); - m_mpeg->drq_handler().set_inputline(m_maincpu, H8_INPUT_LINE_DREQ0); + m_mpeg->drq_w().set_inputline(m_maincpu, H8_INPUT_LINE_DREQ0); + + NN71003F(config, m_mpega, 0); + m_mpega->add_route(0, m_lspeaker, 1.0); + m_mpega->add_route(1, m_rspeaker, 1.0); + m_mpeg->sp2_frm_w().set(m_mpega, FUNC(nn71003f_device::frm_w)); + m_mpeg->sp2_clk_w().set(m_mpega, FUNC(nn71003f_device::clk_w)); + m_mpeg->sp2_dat_w().set(m_mpega, FUNC(nn71003f_device::dat_w)); - /* sound hardware */ NICHISND(config, m_nichisnd, 0); + + SPEAKER(config, m_lspeaker).front_left(); + SPEAKER(config, m_rspeaker).front_right(); } |