mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
taito gnet preliminary zoom sound works out of the box now
This commit is contained in:
parent
1bd51abc58
commit
a17309de58
@ -25,6 +25,7 @@ and a Zoom Corp. ZFX-2 DSP instead of the TMS57002.
|
||||
|
||||
TODO:
|
||||
- add TMS57002
|
||||
- global volume regs
|
||||
- a lot more
|
||||
|
||||
***************************************************************************/
|
||||
@ -43,7 +44,7 @@ const device_type TAITO_ZOOM = &device_creator<taito_zoom_device>;
|
||||
taito_zoom_device::taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, TAITO_ZOOM, "Taito Zoom Sound System", tag, owner, clock, "taito_zoom", __FILE__),
|
||||
m_soundcpu(*this, ":mn10200"),
|
||||
m_control(0),
|
||||
m_reg_address(0),
|
||||
m_tms_ctrl(0)
|
||||
{
|
||||
}
|
||||
@ -57,7 +58,7 @@ void taito_zoom_device::device_start()
|
||||
m_snd_shared_ram = auto_alloc_array_clear(machine(), UINT8, 0x100);
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_control));
|
||||
save_item(NAME(m_reg_address));
|
||||
save_item(NAME(m_tms_ctrl));
|
||||
save_pointer(NAME(m_snd_shared_ram), 0x100);
|
||||
}
|
||||
@ -68,6 +69,7 @@ void taito_zoom_device::device_start()
|
||||
|
||||
void taito_zoom_device::device_reset()
|
||||
{
|
||||
m_reg_address = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -136,18 +138,26 @@ READ16_MEMBER(taito_zoom_device::sound_irq_r)
|
||||
return 0;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(taito_zoom_device::global_volume_w)
|
||||
WRITE16_MEMBER(taito_zoom_device::reg_data_w)
|
||||
{
|
||||
// TODO
|
||||
// m_control d0 selects left/right speaker volume (zsg2+dsp)
|
||||
switch (m_reg_address)
|
||||
{
|
||||
case 0x04:
|
||||
// zsg2+dsp global volume ch0
|
||||
break;
|
||||
|
||||
case 0x05:
|
||||
// zsg2+dsp global volume ch1
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(taito_zoom_device::reset_control_w)
|
||||
WRITE16_MEMBER(taito_zoom_device::reg_address_w)
|
||||
{
|
||||
// d2: reset sound cpu?
|
||||
m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
m_control = data;
|
||||
m_reg_address = data & 0xff;
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,8 +13,8 @@ public:
|
||||
|
||||
DECLARE_WRITE16_MEMBER(sound_irq_w);
|
||||
DECLARE_READ16_MEMBER(sound_irq_r);
|
||||
DECLARE_WRITE16_MEMBER(global_volume_w);
|
||||
DECLARE_WRITE16_MEMBER(reset_control_w);
|
||||
DECLARE_WRITE16_MEMBER(reg_data_w);
|
||||
DECLARE_WRITE16_MEMBER(reg_address_w);
|
||||
|
||||
DECLARE_READ8_MEMBER(shared_ram_r);
|
||||
DECLARE_WRITE8_MEMBER(shared_ram_w);
|
||||
@ -32,7 +32,7 @@ private:
|
||||
required_device<mn10200_device> m_soundcpu;
|
||||
|
||||
// internal state
|
||||
UINT16 m_control;
|
||||
UINT16 m_reg_address;
|
||||
UINT8 m_tms_ctrl;
|
||||
UINT8* m_snd_shared_ram;
|
||||
};
|
||||
|
@ -410,6 +410,17 @@ WRITE8_MEMBER(taitogn_state::control_w)
|
||||
{
|
||||
// 20 = watchdog
|
||||
m_mb3773->write_line_ck((data & 0x20) >> 5);
|
||||
|
||||
// 10 = soundcpu reset
|
||||
m_mn10200->set_input_line(INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
|
||||
if (~data & m_control & 0x10)
|
||||
{
|
||||
// assume that this also readys the sound flash chips
|
||||
m_pgmflash->write(0, 0xff);
|
||||
m_sndflash0->write(0, 0xff);
|
||||
m_sndflash1->write(0, 0xff);
|
||||
m_sndflash2->write(0, 0xff);
|
||||
}
|
||||
|
||||
// 04 = select bank
|
||||
// According to the rom code, bits 1-0 may be part of the bank
|
||||
@ -488,25 +499,7 @@ WRITE8_MEMBER(taitogn_state::znsecsel_w)
|
||||
|
||||
READ8_MEMBER(taitogn_state::boardconfig_r)
|
||||
{
|
||||
/*
|
||||
------00 mem=4M
|
||||
------01 mem=4M
|
||||
------10 mem=8M
|
||||
------11 mem=16M
|
||||
-----0-- smem=hM
|
||||
-----1-- smem=2M
|
||||
----0--- vmem=1M
|
||||
----1--- vmem=2M
|
||||
000----- rev=-2
|
||||
001----- rev=-1
|
||||
010----- rev=0
|
||||
011----- rev=1
|
||||
100----- rev=2
|
||||
101----- rev=3
|
||||
110----- rev=4
|
||||
111----- rev=5
|
||||
*/
|
||||
|
||||
// see zn.c
|
||||
return 64|32|8;
|
||||
}
|
||||
|
||||
@ -564,7 +557,7 @@ void taitogn_state::driver_start()
|
||||
|
||||
void taitogn_state::machine_reset()
|
||||
{
|
||||
m_control = 0;
|
||||
m_control = 0xf8;
|
||||
|
||||
// halt sound CPU since it has no valid program at start
|
||||
m_mn10200->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
@ -589,8 +582,8 @@ static ADDRESS_MAP_START( taitogn_map, AS_PROGRAM, 32, taitogn_state )
|
||||
AM_RANGE(0x1fb40000, 0x1fb40003) AM_READWRITE8(control_r, control_w, 0x000000ff)
|
||||
AM_RANGE(0x1fb60000, 0x1fb60003) AM_WRITE16(control2_w, 0x0000ffff)
|
||||
AM_RANGE(0x1fb70000, 0x1fb70003) AM_READWRITE16(gn_1fb70000_r, gn_1fb70000_w, 0x0000ffff)
|
||||
AM_RANGE(0x1fb80000, 0x1fb80003) AM_DEVWRITE16("taito_zoom", taito_zoom_device, global_volume_w, 0x0000ffff)
|
||||
//AM_RANGE(0x1fb80000, 0x1fb80003) AM_DEVWRITE16("taito_zoom", taito_zoom_device, reset_control_w, 0xffff0000)
|
||||
AM_RANGE(0x1fb80000, 0x1fb80003) AM_DEVWRITE16("taito_zoom", taito_zoom_device, reg_data_w, 0x0000ffff)
|
||||
AM_RANGE(0x1fb80000, 0x1fb80003) AM_DEVWRITE16("taito_zoom", taito_zoom_device, reg_address_w, 0xffff0000)
|
||||
AM_RANGE(0x1fba0000, 0x1fba0003) AM_DEVWRITE16("taito_zoom", taito_zoom_device, sound_irq_w, 0x0000ffff)
|
||||
AM_RANGE(0x1fbc0000, 0x1fbc0003) AM_DEVREAD16("taito_zoom", taito_zoom_device, sound_irq_r, 0x0000ffff)
|
||||
AM_RANGE(0x1fbe0000, 0x1fbe01ff) AM_DEVREADWRITE8("taito_zoom", taito_zoom_device, shared_ram_r, shared_ram_w, 0x00ff00ff) // M66220FP for comms with the MN10200
|
||||
|
@ -1186,8 +1186,8 @@ static ADDRESS_MAP_START(coh1000tb_map, AS_PROGRAM, 32, zn_state)
|
||||
AM_RANGE(0x1f000000, 0x1f7fffff) AM_ROMBANK("bankedroms")
|
||||
AM_RANGE(0x1fb00000, 0x1fb003ff) AM_READWRITE8(fx1b_fram_r, fx1b_fram_w, 0x00ff00ff)
|
||||
AM_RANGE(0x1fb40000, 0x1fb40003) AM_WRITE8(bank_coh1000t_w, 0x000000ff)
|
||||
AM_RANGE(0x1fb80000, 0x1fb80003) AM_DEVWRITE16("taito_zoom", taito_zoom_device, global_volume_w, 0x0000ffff)
|
||||
AM_RANGE(0x1fb80000, 0x1fb80003) AM_DEVWRITE16("taito_zoom", taito_zoom_device, reset_control_w, 0xffff0000)
|
||||
AM_RANGE(0x1fb80000, 0x1fb80003) AM_DEVWRITE16("taito_zoom", taito_zoom_device, reg_data_w, 0x0000ffff)
|
||||
AM_RANGE(0x1fb80000, 0x1fb80003) AM_DEVWRITE16("taito_zoom", taito_zoom_device, reg_address_w, 0xffff0000)
|
||||
AM_RANGE(0x1fba0000, 0x1fba0003) AM_DEVWRITE16("taito_zoom", taito_zoom_device, sound_irq_w, 0x0000ffff)
|
||||
AM_RANGE(0x1fbc0000, 0x1fbc0003) AM_DEVREAD16("taito_zoom", taito_zoom_device, sound_irq_r, 0x0000ffff)
|
||||
AM_RANGE(0x1fbe0000, 0x1fbe01ff) AM_DEVREADWRITE8("taito_zoom", taito_zoom_device, shared_ram_r, shared_ram_w, 0x00ff00ff) // M66220FP for comm with the MN10200
|
||||
|
Loading…
Reference in New Issue
Block a user