From 63e9f77b11d1259a6a55e1287973fe01349b195b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Banaan=20Ananas?= Date: Sat, 22 Dec 2012 18:02:30 +0000 Subject: [PATCH] add/verify msm5205_playmode_w --- src/mame/drivers/kurukuru.c | 15 +++++++++++---- src/mame/drivers/sothello.c | 11 ++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/mame/drivers/kurukuru.c b/src/mame/drivers/kurukuru.c index 7ac2f16de9a..a1bbb5482ad 100644 --- a/src/mame/drivers/kurukuru.c +++ b/src/mame/drivers/kurukuru.c @@ -8,6 +8,7 @@ This hardware seems to be a derivative of MSX2 'on steroids'. + It has many similarites with sothello.c and tonton.c ******************************************************************************* @@ -357,9 +358,15 @@ WRITE8_MEMBER(kurukuru_state::kurukuru_adpcm_data_w) WRITE8_MEMBER(kurukuru_state::kurukuru_adpcm_reset_w) { - // d0: reset adpcm chip - // other bits: ? - msm5205_reset_w(machine().device("adpcm"), data & 1); + device_t *device = machine().device("adpcm"); +/* + bit 0 = RESET + bit 1 = 4B/3B + bit 2 = S2 + bit 3 = S1 +*/ + msm5205_playmode_w(device, BITSWAP8((data>>1), 7,6,5,4,3,0,1,2)); + msm5205_reset_w(device, data & 1); update_sound_irq(m_sound_irq_cause); } @@ -512,7 +519,7 @@ static const ay8910_interface ym2149_intf = static const msm5205_interface msm5205_config = { kurukuru_msm5205_vck, - MSM5205_S48_4B /* 8 kHz? */ + MSM5205_S48_4B /* changed on the fly */ }; diff --git a/src/mame/drivers/sothello.c b/src/mame/drivers/sothello.c index 16eeab0e124..c3a20f38e73 100644 --- a/src/mame/drivers/sothello.c +++ b/src/mame/drivers/sothello.c @@ -49,10 +49,12 @@ public: : driver_device(mconfig, type, tag), m_v9938(*this, "v9938") { } + required_device m_v9938; + int m_subcpu_status; int m_soundcpu_busy; int m_msm_data; - required_device m_v9938; + DECLARE_WRITE8_MEMBER(bank_w); DECLARE_READ8_MEMBER(subcpu_halt_set); DECLARE_READ8_MEMBER(subcpu_halt_clear); @@ -65,6 +67,7 @@ public: DECLARE_WRITE8_MEMBER(subcpu_status_w); DECLARE_READ8_MEMBER(subcpu_status_r); DECLARE_WRITE8_MEMBER(msm_cfg_w); + virtual void machine_reset(); TIMER_CALLBACK_MEMBER(subcpu_suspend); TIMER_CALLBACK_MEMBER(subcpu_resume); @@ -167,7 +170,7 @@ WRITE8_MEMBER(sothello_state::msm_cfg_w) bit 2 = S2 1 bit 3 = S1 2 */ - msm5205_playmode_w(device, BITSWAP8((data>>1), 7,6,5,4,3,0,1,2)); /* or maybe 7,6,5,4,3,0,2,1 ??? */ + msm5205_playmode_w(device, BITSWAP8((data>>1), 7,6,5,4,3,0,1,2)); msm5205_reset_w(device,data&1); } @@ -365,7 +368,6 @@ static const ym2203_interface ym2203_config = static MACHINE_CONFIG_START( sothello, sothello_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu",Z80, MAINCPU_CLOCK) MCFG_CPU_PROGRAM_MAP(maincpu_mem_map) MCFG_CPU_IO_MAP(maincpu_io_map) @@ -380,7 +382,7 @@ static MACHINE_CONFIG_START( sothello, sothello_state ) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - + /* video hardware */ MCFG_V9938_ADD("v9938", "screen", VDP_MEM) MCFG_V99X8_INTERRUPT_CALLBACK_STATIC(sothello_vdp_interrupt) @@ -408,7 +410,6 @@ static MACHINE_CONFIG_START( sothello, sothello_state ) MCFG_SOUND_ADD("msm",MSM5205, MSM_CLOCK) MCFG_SOUND_CONFIG(msm_interface) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MACHINE_CONFIG_END /***************************************************************************