k054321: Implement as a device [O. Galibert, Phil Bennett]

This commit is contained in:
Olivier Galibert 2017-04-25 19:53:39 +02:00
parent e8bae53e6e
commit 2b066459bd
19 changed files with 260 additions and 284 deletions

View File

@ -3147,3 +3147,14 @@ if (MACHINES["INPUT_MERGER"]~=null) then
MAME_DIR .. "src/devices/machine/input_merger.h",
}
end
---------------------------------------------------
--
--@src/devices/machine/k054321.h,MACHINES["K054321"] = true
---------------------------------------------------
if (MACHINES["K054321"]~=null) then
files {
MAME_DIR .. "src/devices/machine/k054321.cpp",
MAME_DIR .. "src/devices/machine/k054321.h",
}
end

View File

@ -602,6 +602,7 @@ MACHINES["GENPC"] = true
MACHINES["GEN_LATCH"] = true
MACHINES["WATCHDOG"] = true
MACHINES["INPUT_MERGER"] = true
MACHINES["k054321"] = true
--------------------------------------------------
-- specify available bus cores

View File

@ -604,6 +604,7 @@ MACHINES["SONY_DRIVE"] = true
MACHINES["SCNXX562"] = true
MACHINES["FGA002"] = true
MACHINES["INPUT_MERGER"] = true
-- MACHINES["k054321"] = true
--------------------------------------------------
-- specify available bus cores

View File

@ -0,0 +1,138 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
/***************************************************************************/
/* */
/* 054321 / 054544 / 054986A */
/* */
/* Konami sound control chip */
/* */
/***************************************************************************/
/*
The 054321 is a sound communication latch/volume manager chip, that
is integrated into the 054544 and 05489A hybrid chips. The hybrid
chips also include the DACs, capacitors, etc needed for the audio
output.
The 054321 manages three latches (maybe four) to allow communication
between the main cpu and the soud cpu, and provides two independant
busses to ensure decoupling. It also manages one global volume and
a per-channel mute for two channels.
Volume setting is a little strange, with one address to reset it to
zero and another to increment it by one. Accepted volume range
seems to be 1-60, with 40 for "normal".
The chip seems to be an intermediate step between the 053260
(full-on sound chip with dual busses and internal latches for
communication) and the 056800 (MIRAC, similar to the 054321 but
4-channel).
*/
#include "emu.h"
#include "k054321.h"
#include <math.h>
const device_type K054321 = device_creator<k054321_device>;
DEVICE_ADDRESS_MAP_START(main_map, 8, k054321_device)
AM_RANGE(0x0, 0x0) AM_WRITE(active_w)
AM_RANGE(0x2, 0x2) AM_WRITE(volume_reset_w)
AM_RANGE(0x3, 0x3) AM_WRITE(volume_up_w)
AM_RANGE(0x4, 0x4) AM_WRITE(dummy_w)
AM_RANGE(0x6, 0x6) AM_WRITE(main1_w)
AM_RANGE(0x7, 0x7) AM_WRITE(main2_w)
AM_RANGE(0x8, 0x8) AM_READ(busy_r)
AM_RANGE(0xa, 0xa) AM_READ(sound1_r)
ADDRESS_MAP_END
DEVICE_ADDRESS_MAP_START(sound_map, 8, k054321_device)
AM_RANGE(0x0, 0x0) AM_WRITE(sound1_w)
AM_RANGE(0x2, 0x2) AM_READ(main1_r)
AM_RANGE(0x3, 0x3) AM_READ(main2_r)
ADDRESS_MAP_END
k054321_device::k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, K054321, "K053421 Maincpu-Soundcpu interface", tag, owner, clock, "k054321", __FILE__),
m_left(*this, finder_base::DUMMY_TAG),
m_right(*this, finder_base::DUMMY_TAG)
{
}
void k054321_device::set_gain_devices(const char *_left, const char *_right)
{
m_left.set_tag(_left);
m_right.set_tag(_right);
}
void k054321_device::device_start()
{
}
READ8_MEMBER( k054321_device::main1_r)
{
return m_main1;
}
WRITE8_MEMBER(k054321_device::main1_w)
{
m_main1 = data;
}
READ8_MEMBER( k054321_device::main2_r)
{
return m_main2;
}
WRITE8_MEMBER(k054321_device::main2_w)
{
m_main2 = data;
}
READ8_MEMBER( k054321_device::sound1_r)
{
return m_sound1;
}
WRITE8_MEMBER(k054321_device::sound1_w)
{
m_sound1 = data;
}
WRITE8_MEMBER(k054321_device::volume_reset_w)
{
m_volume = 0;
propagate_volume();
}
WRITE8_MEMBER(k054321_device::volume_up_w)
{
m_volume ++;
propagate_volume();
}
READ8_MEMBER(k054321_device::busy_r)
{
return 0; // bit0 = 1 means busy
}
WRITE8_MEMBER(k054321_device::active_w)
{
m_active = data;
propagate_volume();
}
WRITE8_MEMBER(k054321_device::dummy_w)
{
if(data != 0x4a)
logerror("unexpected dummy_w %02x\n", data);
}
void k054321_device::propagate_volume()
{
double vol = pow(2, (m_volume - 40)/10.0);
m_left->set_input_gain(0, m_active & 2 ? vol : 0.0);
m_right->set_input_gain(0, m_active & 1 ? vol : 0.0);
}

View File

@ -0,0 +1,54 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
#pragma once
#ifndef MAME_K054321_H
#define MAME_K054321_H
#define MCFG_K054321_ADD(_tag, _left, _right) \
MCFG_DEVICE_ADD(_tag, K054321, 0) \
downcast<k054321_device *>(device)->set_gain_devices(_left, _right);
class k054321_device : public device_t
{
public:
k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void set_gain_devices(const char *_left, const char *_right);
DECLARE_ADDRESS_MAP(main_map, 8);
DECLARE_ADDRESS_MAP(sound_map, 8);
DECLARE_READ8_MEMBER( main1_r);
DECLARE_WRITE8_MEMBER(main1_w);
DECLARE_READ8_MEMBER( main2_r);
DECLARE_WRITE8_MEMBER(main2_w);
DECLARE_READ8_MEMBER( sound1_r);
DECLARE_WRITE8_MEMBER(sound1_w);
DECLARE_WRITE8_MEMBER(volume_reset_w);
DECLARE_WRITE8_MEMBER(volume_up_w);
DECLARE_WRITE8_MEMBER(active_w);
DECLARE_READ8_MEMBER(busy_r);
DECLARE_WRITE8_MEMBER(dummy_w);
protected:
void device_start() override;
private:
required_device<device_sound_interface> m_left, m_right;
u8 m_main1, m_main2;
u8 m_sound1;
u8 m_volume;
u8 m_active;
void propagate_volume();
};
extern const device_type K054321;
#endif

View File

@ -192,25 +192,11 @@ INTERRUPT_GEN_MEMBER(gijoe_state::gijoe_interrupt)
device.execute().set_input_line(5, HOLD_LINE);
}
WRITE16_MEMBER(gijoe_state::sound_cmd_w)
{
if (ACCESSING_BITS_0_7)
{
data &= 0xff;
m_soundlatch->write(space, 0, data);
}
}
WRITE16_MEMBER(gijoe_state::sound_irq_w)
{
m_audiocpu->set_input_line(0, HOLD_LINE);
}
READ16_MEMBER(gijoe_state::sound_status_r)
{
return m_soundlatch2->read(space, 0);
}
static ADDRESS_MAP_START( gijoe_map, AS_PROGRAM, 16, gijoe_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x100000, 0x100fff) AM_RAM AM_SHARE("spriteram") // Sprites
@ -224,9 +210,7 @@ static ADDRESS_MAP_START( gijoe_map, AS_PROGRAM, 16, gijoe_state )
AM_RANGE(0x190000, 0x190fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0x1a0000, 0x1a001f) AM_DEVWRITE("k053251", k053251_device, lsb_w)
AM_RANGE(0x1b0000, 0x1b003f) AM_DEVWRITE("k056832", k056832_device, word_w)
AM_RANGE(0x1c000c, 0x1c000d) AM_WRITE(sound_cmd_w)
AM_RANGE(0x1c0014, 0x1c0015) AM_READ(sound_status_r)
AM_RANGE(0x1c0000, 0x1c001f) AM_RAM
AM_RANGE(0x1c0000, 0x1c001f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x1d0000, 0x1d0001) AM_WRITE(sound_irq_w)
AM_RANGE(0x1e0000, 0x1e0001) AM_READ_PORT("P1_P2")
AM_RANGE(0x1e0002, 0x1e0003) AM_READ_PORT("P3_P4")
@ -245,9 +229,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, gijoe_state )
AM_RANGE(0xf000, 0xf7ff) AM_RAM
AM_RANGE(0xf800, 0xfa2f) AM_DEVREADWRITE("k054539", k054539_device, read, write)
AM_RANGE(0xfc00, 0xfc00) AM_DEVWRITE("soundlatch2", generic_latch_8_device, write)
AM_RANGE(0xfc02, 0xfc02) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0x0000, 0xffff) AM_ROM
AM_RANGE(0xfc00, 0xfc03) AM_DEVICE("k054321", k054321_device, sound_map)
AM_RANGE(0x0000, 0xefff) AM_ROM
ADDRESS_MAP_END
static INPUT_PORTS_START( gijoe )
@ -347,8 +330,7 @@ static MACHINE_CONFIG_START( gijoe, gijoe_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_K054321_ADD("k054321", ":lspeaker", ":rspeaker")
MCFG_DEVICE_ADD("k054539", K054539, XTAL_18_432MHz)
MCFG_K054539_TIMER_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))

View File

@ -297,11 +297,6 @@ WRITE8_MEMBER(lethal_state::sound_irq_w)
m_soundcpu->set_input_line(0, HOLD_LINE);
}
READ8_MEMBER(lethal_state::sound_status_r)
{
return 0xf;
}
WRITE8_MEMBER(lethal_state::le_bankswitch_w)
{
membank("bank1")->set_entry(data);
@ -346,7 +341,7 @@ static ADDRESS_MAP_START( le_main, AS_PROGRAM, 8, lethal_state )
AM_RANGE(0x4000, 0x403f) AM_DEVWRITE("k056832", k056832_device, write)
AM_RANGE(0x4040, 0x404f) AM_DEVWRITE("k056832", k056832_device, b_w)
AM_RANGE(0x4080, 0x4080) AM_READNOP // watchdog
AM_RANGE(0x4090, 0x4090) AM_READNOP
AM_RANGE(0x4090, 0x4090) AM_WRITE(sound_irq_w)
AM_RANGE(0x40a0, 0x40a0) AM_READNOP
AM_RANGE(0x40c4, 0x40c4) AM_WRITE(control2_w)
AM_RANGE(0x40c8, 0x40d0) AM_WRITE(lethalen_palette_control) // PCU1-PCU3 on the schematics
@ -364,9 +359,7 @@ static ADDRESS_MAP_START( bank4000_map, AS_PROGRAM, 8, lethal_state )
// VRD = 0 or 1, CBNK = 0
AM_RANGE(0x0840, 0x084f) AM_MIRROR(0x8000) AM_DEVREADWRITE("k053244", k05324x_device, k053244_r, k053244_w)
AM_RANGE(0x0880, 0x089f) AM_MIRROR(0x8000) AM_DEVREADWRITE("k054000", k054000_device, read, write)
AM_RANGE(0x08c6, 0x08c6) AM_MIRROR(0x8000) AM_DEVWRITE("soundlatch", generic_latch_8_device, write) //cmd_w
AM_RANGE(0x08c7, 0x08c7) AM_MIRROR(0x8000) AM_WRITE(sound_irq_w)
AM_RANGE(0x08ca, 0x08ca) AM_MIRROR(0x8000) AM_READ(sound_status_r)
AM_RANGE(0x08c0, 0x08cf) AM_DEVICE("k054321", k054321_device, main_map)
AM_RANGE(0x1000, 0x17ff) AM_MIRROR(0x8000) AM_DEVREADWRITE("k053244", k05324x_device, k053245_r, k053245_w)
// VRD = 0, CBNK = 0
@ -386,9 +379,7 @@ static ADDRESS_MAP_START( le_sound, AS_PROGRAM, 8, lethal_state )
AM_RANGE(0x0000, 0xefff) AM_ROM
AM_RANGE(0xf000, 0xf7ff) AM_RAM
AM_RANGE(0xf800, 0xfa2f) AM_DEVREADWRITE("k054539", k054539_device, read, write)
AM_RANGE(0xfc00, 0xfc00) AM_DEVWRITE("soundlatch2", generic_latch_8_device, write)
AM_RANGE(0xfc02, 0xfc02) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xfc03, 0xfc03) AM_READNOP
AM_RANGE(0xfc00, 0xfc03) AM_DEVICE("k054321", k054321_device, sound_map)
ADDRESS_MAP_END
static INPUT_PORTS_START( lethalen )
@ -538,8 +529,7 @@ static MACHINE_CONFIG_START( lethalen, lethal_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_K054321_ADD("k054321", ":lspeaker", ":rspeaker")
MCFG_DEVICE_ADD("k054539", K054539, XTAL_18_432MHz)
MCFG_K054539_TIMER_HANDLER(INPUTLINE("soundcpu", INPUT_LINE_NMI))

View File

@ -221,31 +221,11 @@ INTERRUPT_GEN_MEMBER(moo_state::moobl_interrupt)
device.execute().set_input_line(5, HOLD_LINE);
}
WRITE16_MEMBER(moo_state::sound_cmd1_w)
{
if ((data & 0x00ff0000) == 0)
{
data &= 0xff;
m_soundlatch->write(space, 0, data);
}
}
WRITE16_MEMBER(moo_state::sound_cmd2_w)
{
if ((data & 0x00ff0000) == 0)
m_soundlatch2->write(space, 0, data & 0xff);
}
WRITE16_MEMBER(moo_state::sound_irq_w)
{
m_soundcpu->set_input_line(0, HOLD_LINE);
}
READ16_MEMBER(moo_state::sound_status_r)
{
return m_soundlatch3->read(space, 0);
}
WRITE8_MEMBER(moo_state::sound_bankswitch_w)
{
membank("bank1")->set_base(memregion("soundcpu")->base() + 0x10000 + (data&0xf)*0x4000);
@ -330,10 +310,7 @@ static ADDRESS_MAP_START( moo_map, AS_PROGRAM, 16, moo_state )
AM_RANGE(0x0ce000, 0x0ce01f) AM_WRITE(moo_prot_w)
AM_RANGE(0x0d0000, 0x0d001f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff) /* CCU regs (ignored) */
AM_RANGE(0x0d4000, 0x0d4001) AM_WRITE(sound_irq_w)
AM_RANGE(0x0d600c, 0x0d600d) AM_WRITE(sound_cmd1_w)
AM_RANGE(0x0d600e, 0x0d600f) AM_WRITE(sound_cmd2_w)
AM_RANGE(0x0d6014, 0x0d6015) AM_READ(sound_status_r)
AM_RANGE(0x0d6000, 0x0d601f) AM_RAM /* sound regs fall through */
AM_RANGE(0x0d6000, 0x0d601f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x0d8000, 0x0d8007) AM_DEVWRITE("k056832", k056832_device, b_word_w) /* VSCCS regs */
AM_RANGE(0x0da000, 0x0da001) AM_READ_PORT("P1_P3")
AM_RANGE(0x0da002, 0x0da003) AM_READ_PORT("P2_P4")
@ -396,10 +373,7 @@ static ADDRESS_MAP_START( bucky_map, AS_PROGRAM, 16, moo_state )
AM_RANGE(0x0d0000, 0x0d001f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff) /* CCU regs (ignored) */
AM_RANGE(0x0d2000, 0x0d20ff) AM_DEVREADWRITE("k054000", k054000_device, lsb_r, lsb_w)
AM_RANGE(0x0d4000, 0x0d4001) AM_WRITE(sound_irq_w)
AM_RANGE(0x0d600c, 0x0d600d) AM_WRITE(sound_cmd1_w)
AM_RANGE(0x0d600e, 0x0d600f) AM_WRITE(sound_cmd2_w)
AM_RANGE(0x0d6014, 0x0d6015) AM_READ(sound_status_r)
AM_RANGE(0x0d6000, 0x0d601f) AM_RAM /* sound regs fall through */
AM_RANGE(0x0d6000, 0x0d601f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x0d8000, 0x0d8007) AM_DEVWRITE("k056832", k056832_device, b_word_w) /* VSCCS regs */
AM_RANGE(0x0da000, 0x0da001) AM_READ_PORT("P1_P3")
AM_RANGE(0x0da002, 0x0da003) AM_READ_PORT("P2_P4")
@ -427,9 +401,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, moo_state )
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe22f) AM_DEVREADWRITE("k054539", k054539_device, read, write)
AM_RANGE(0xec00, 0xec01) AM_DEVREADWRITE("ymsnd", ym2151_device,read,write)
AM_RANGE(0xf000, 0xf000) AM_DEVWRITE("soundlatch3", generic_latch_8_device, write)
AM_RANGE(0xf002, 0xf002) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xf003, 0xf003) AM_DEVREAD("soundlatch2", generic_latch_8_device, read)
AM_RANGE(0xf000, 0xf003) AM_DEVICE("k054321", k054321_device, sound_map)
AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_bankswitch_w)
ADDRESS_MAP_END
@ -569,9 +541,7 @@ static MACHINE_CONFIG_START( moo, moo_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_GENERIC_LATCH_8_ADD("soundlatch3")
MCFG_K054321_ADD("k054321", ":lspeaker", ":rspeaker")
MCFG_YM2151_ADD("ymsnd", XTAL_32MHz/8) // 4MHz verified
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)

View File

@ -244,51 +244,11 @@ INTERRUPT_GEN_MEMBER(mystwarr_state::ddd_interrupt)
/**********************************************************************************/
WRITE16_MEMBER(mystwarr_state::sound_cmd1_w)
{
m_soundlatch->write(space, 0, data&0xff);
}
WRITE16_MEMBER(mystwarr_state::sound_cmd1_msb_w)
{
m_soundlatch->write(space, 0, data>>8);
}
WRITE16_MEMBER(mystwarr_state::sound_cmd2_w)
{
m_soundlatch2->write(space, 0, data&0xff);
return;
}
WRITE16_MEMBER(mystwarr_state::sound_cmd2_msb_w)
{
m_soundlatch2->write(space, 0, data>>8);
return;
}
WRITE16_MEMBER(mystwarr_state::sound_irq_w)
{
m_soundcpu->set_input_line(0, HOLD_LINE);
}
READ16_MEMBER(mystwarr_state::sound_status_r)
{
int latch = m_soundlatch3->read(space,0);
if ((latch & 0xf) == 0xe) latch |= 1;
return latch;
}
READ16_MEMBER(mystwarr_state::sound_status_msb_r)
{
int latch = m_soundlatch3->read(space,0);
if ((latch & 0xf) == 0xe) latch |= 1;
return latch<<8;
}
WRITE16_MEMBER(mystwarr_state::irq_ack_w)
{
m_k056832->b_word_w(space, offset, data, mem_mask);
@ -343,15 +303,12 @@ static ADDRESS_MAP_START( mystwarr_map, AS_PROGRAM, 16, mystwarr_state )
AM_RANGE(0x48a000, 0x48a01f) AM_DEVWRITE("k054338", k054338_device, word_w)
AM_RANGE(0x48c000, 0x48c03f) AM_DEVWRITE("k056832", k056832_device,word_w)
AM_RANGE(0x490000, 0x490001) AM_WRITE(mweeprom_w)
AM_RANGE(0x492000, 0x492001) AM_WRITENOP // watchdog
AM_RANGE(0x492000, 0x492001) AM_NOP // watchdog
AM_RANGE(0x494000, 0x494001) AM_READ_PORT("P1_P2")
AM_RANGE(0x494002, 0x494003) AM_READ_PORT("P3_P4")
AM_RANGE(0x496000, 0x496001) AM_READ_PORT("IN0")
AM_RANGE(0x496002, 0x496003) AM_READ(eeprom_r)
AM_RANGE(0x49800c, 0x49800d) AM_WRITE(sound_cmd1_w)
AM_RANGE(0x49800e, 0x49800f) AM_WRITE(sound_cmd2_w)
AM_RANGE(0x498014, 0x498015) AM_READ(sound_status_r)
AM_RANGE(0x498000, 0x49801f) AM_RAM
AM_RANGE(0x498000, 0x49801f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x49a000, 0x49a001) AM_WRITE(sound_irq_w)
AM_RANGE(0x49c000, 0x49c01f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff)
AM_RANGE(0x49e000, 0x49e007) AM_WRITE(irq_ack_w) // VSCCS (custom)
@ -376,10 +333,7 @@ static ADDRESS_MAP_START( metamrph_map, AS_PROGRAM, 16, mystwarr_state )
AM_RANGE(0x258000, 0x2580ff) AM_DEVWRITE("k055555", k055555_device, K055555_word_w)
AM_RANGE(0x260000, 0x26001f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff)
AM_RANGE(0x264000, 0x264001) AM_WRITE(sound_irq_w)
AM_RANGE(0x26800c, 0x26800d) AM_WRITE(sound_cmd1_w)
AM_RANGE(0x26800e, 0x26800f) AM_WRITE(sound_cmd2_w)
AM_RANGE(0x268014, 0x268015) AM_READ(sound_status_r)
AM_RANGE(0x268000, 0x26801f) AM_RAM
AM_RANGE(0x268000, 0x26801f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x26c000, 0x26c007) AM_DEVWRITE("k056832", k056832_device,b_word_w)
AM_RANGE(0x270000, 0x27003f) AM_DEVWRITE("k056832", k056832_device,word_w)
AM_RANGE(0x274000, 0x274001) AM_READ_PORT("P1_P3")
@ -411,10 +365,7 @@ static ADDRESS_MAP_START( viostorm_map, AS_PROGRAM, 16, mystwarr_state )
AM_RANGE(0x25c000, 0x25c03f) AM_READWRITE(K055550_word_r,K055550_word_w)
AM_RANGE(0x260000, 0x26001f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff)
AM_RANGE(0x264000, 0x264001) AM_WRITE(sound_irq_w)
AM_RANGE(0x26800c, 0x26800d) AM_WRITE(sound_cmd1_w)
AM_RANGE(0x26800e, 0x26800f) AM_WRITE(sound_cmd2_w)
AM_RANGE(0x268014, 0x268015) AM_READ(sound_status_r)
AM_RANGE(0x268000, 0x26801f) AM_RAM
AM_RANGE(0x268000, 0x26801f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x26c000, 0x26c007) AM_DEVWRITE("k056832", k056832_device,b_word_w)
AM_RANGE(0x270000, 0x27003f) AM_DEVWRITE("k056832", k056832_device,word_w)
AM_RANGE(0x274000, 0x274001) AM_READ_PORT("P1_P3")
@ -498,10 +449,7 @@ static ADDRESS_MAP_START( martchmp_map, AS_PROGRAM, 16, mystwarr_state )
AM_RANGE(0x414002, 0x414003) AM_READ_PORT("P3_P4")
AM_RANGE(0x416000, 0x416001) AM_READ_PORT("IN0")
AM_RANGE(0x416002, 0x416003) AM_READ(eeprom_r) // eeprom read
AM_RANGE(0x418014, 0x418015) AM_READ(sound_status_r) // z80 status
AM_RANGE(0x41800c, 0x41800d) AM_WRITE(sound_cmd1_w)
AM_RANGE(0x41800e, 0x41800f) AM_WRITE(sound_cmd2_w)
AM_RANGE(0x418000, 0x41801f) AM_RAM // sound regs fall through
AM_RANGE(0x418000, 0x41801f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x41a000, 0x41a001) AM_WRITE(sound_irq_w)
AM_RANGE(0x41c000, 0x41c01f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff) // CCU
AM_RANGE(0x41e000, 0x41e007) AM_DEVWRITE("k056832", k056832_device,b_word_w) // VSCCS
@ -530,10 +478,7 @@ static ADDRESS_MAP_START( dadandrn_map, AS_PROGRAM, 16, mystwarr_state )
AM_RANGE(0x484000, 0x484003) AM_WRITE(ddd_053936_clip_w)
AM_RANGE(0x486000, 0x48601f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff)
AM_RANGE(0x488000, 0x4880ff) AM_DEVWRITE("k055555", k055555_device, K055555_word_w)
AM_RANGE(0x48a00c, 0x48a00d) AM_WRITE(sound_cmd1_msb_w)
AM_RANGE(0x48a00e, 0x48a00f) AM_WRITE(sound_cmd2_msb_w)
AM_RANGE(0x48a014, 0x48a015) AM_READ(sound_status_msb_r)
AM_RANGE(0x48a000, 0x48a01f) AM_RAM // sound regs fall-through
AM_RANGE(0x48a000, 0x48a01f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x48c000, 0x48c01f) AM_DEVWRITE("k054338", k054338_device, word_w)
AM_RANGE(0x48e000, 0x48e001) AM_READ_PORT("IN0_P1") // bit 3 (0x8) is test switch
AM_RANGE(0x48e020, 0x48e021) AM_READ(dddeeprom_r)
@ -569,10 +514,7 @@ static ADDRESS_MAP_START( gaiapols_map, AS_PROGRAM, 16, mystwarr_state )
AM_RANGE(0x484000, 0x484003) AM_WRITE(ddd_053936_clip_w)
AM_RANGE(0x486000, 0x48601f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff)
AM_RANGE(0x488000, 0x4880ff) AM_DEVWRITE("k055555", k055555_device, K055555_word_w)
AM_RANGE(0x48a00c, 0x48a00d) AM_WRITE(sound_cmd1_msb_w)
AM_RANGE(0x48a00e, 0x48a00f) AM_WRITE(sound_cmd2_msb_w)
AM_RANGE(0x48a014, 0x48a015) AM_READ(sound_status_msb_r)
AM_RANGE(0x48a000, 0x48a01f) AM_RAM // sound regs fall-through
AM_RANGE(0x48a000, 0x48a01f) AM_DEVICE8("k054321", k054321_device, main_map, 0xff00)
AM_RANGE(0x48c000, 0x48c01f) AM_DEVWRITE("k054338", k054338_device, word_w)
AM_RANGE(0x48e000, 0x48e001) AM_READ_PORT("IN0_P1") // bit 3 (0x8) is test switch
AM_RANGE(0x48e020, 0x48e021) AM_READ(dddeeprom_r)
@ -615,9 +557,7 @@ static ADDRESS_MAP_START( mystwarr_sound_map, AS_PROGRAM, 8, mystwarr_state )
AM_RANGE(0xe230, 0xe3ff) AM_RAM
AM_RANGE(0xe400, 0xe62f) AM_DEVREADWRITE("k054539_2", k054539_device, read, write)
AM_RANGE(0xe630, 0xe7ff) AM_RAM
AM_RANGE(0xf000, 0xf000) AM_DEVWRITE("soundlatch3", generic_latch_8_device, write)
AM_RANGE(0xf002, 0xf002) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xf003, 0xf003) AM_DEVREAD("soundlatch2", generic_latch_8_device, read)
AM_RANGE(0xf000, 0xf003) AM_DEVICE("k054321", k054321_device, sound_map)
AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_ctrl_w)
AM_RANGE(0xfff0, 0xfff3) AM_WRITENOP // unknown write
ADDRESS_MAP_END
@ -1014,9 +954,7 @@ static MACHINE_CONFIG_START( mystwarr, mystwarr_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_GENERIC_LATCH_8_ADD("soundlatch3")
MCFG_K054321_ADD("k054321", ":lspeaker", ":rspeaker")
MCFG_DEVICE_ADD("k054539_1", K054539, XTAL_18_432MHz)
MCFG_K054539_REGION_OVERRRIDE("shared")

View File

@ -132,32 +132,12 @@ WRITE16_MEMBER(rungun_state::rng_sysregs_w)
}
}
WRITE16_MEMBER(rungun_state::sound_cmd1_w)
{
if (ACCESSING_BITS_8_15)
m_soundlatch->write(space, 0, data >> 8);
}
WRITE16_MEMBER(rungun_state::sound_cmd2_w)
{
if (ACCESSING_BITS_8_15)
m_soundlatch2->write(space, 0, data >> 8);
}
WRITE16_MEMBER(rungun_state::sound_irq_w)
{
if (ACCESSING_BITS_8_15)
m_soundcpu->set_input_line(0, HOLD_LINE);
}
READ16_MEMBER(rungun_state::sound_status_msb_r)
{
if (ACCESSING_BITS_8_15)
return(m_sound_status << 8);
return 0;
}
INTERRUPT_GEN_MEMBER(rungun_state::rng_interrupt)
{
// send to sprite device current state (i.e. bread & butter sprite DMA)
@ -204,12 +184,7 @@ static ADDRESS_MAP_START( rungun_map, AS_PROGRAM, 16, rungun_state )
AM_RANGE(0x480000, 0x48001f) AM_READWRITE(rng_sysregs_r, rng_sysregs_w) AM_SHARE("sysreg")
AM_RANGE(0x4c0000, 0x4c001f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff) // CCU (for scanline and vblank polling)
AM_RANGE(0x540000, 0x540001) AM_WRITE(sound_irq_w)
// 0x580006 written at POST.
AM_RANGE(0x58000c, 0x58000d) AM_WRITE(sound_cmd1_w)
AM_RANGE(0x58000e, 0x58000f) AM_WRITE(sound_cmd2_w)
// 0x580010 status for $580006 writes at POST
AM_RANGE(0x580014, 0x580015) AM_READ(sound_status_msb_r)
AM_RANGE(0x580000, 0x58001f) AM_RAM // sound regs read/write fall-through
AM_RANGE(0x580000, 0x58001f) AM_DEVICE8("k054321", k054321_device, main_map, 0xff00)
AM_RANGE(0x5c0000, 0x5c000f) AM_DEVREAD("k055673", k055673_device, k055673_rom_word_r) // 246A ROM readback window
AM_RANGE(0x5c0010, 0x5c001f) AM_DEVWRITE("k055673", k055673_device, k055673_reg_word_w)
AM_RANGE(0x600000, 0x601fff) AM_RAMBANK("spriteram_bank") // OBJ RAM
@ -269,9 +244,7 @@ static ADDRESS_MAP_START( rungun_sound_map, AS_PROGRAM, 8, rungun_state )
AM_RANGE(0xe230, 0xe3ff) AM_RAM
AM_RANGE(0xe400, 0xe62f) AM_DEVREADWRITE("k054539_2", k054539_device, read, write)
AM_RANGE(0xe630, 0xe7ff) AM_RAM
AM_RANGE(0xf000, 0xf000) AM_WRITE(sound_status_w)
AM_RANGE(0xf002, 0xf002) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xf003, 0xf003) AM_DEVREAD("soundlatch2", generic_latch_8_device, read)
AM_RANGE(0xf000, 0xf003) AM_DEVICE("k054321", k054321_device, sound_map)
AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_ctrl_w)
AM_RANGE(0xfff0, 0xfff3) AM_WRITENOP
ADDRESS_MAP_END
@ -464,8 +437,7 @@ static MACHINE_CONFIG_START( rng, rungun_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_K054321_ADD("k054321", ":lspeaker", ":rspeaker")
MCFG_DEVICE_ADD("k054539_1", K054539, XTAL_18_432MHz)
MCFG_K054539_REGION_OVERRRIDE("shared")

View File

@ -262,36 +262,11 @@ WRITE16_MEMBER(xexex_state::control2_w)
parse_control2();
}
WRITE16_MEMBER(xexex_state::sound_cmd1_w)
{
if(ACCESSING_BITS_0_7)
{
// anyone knows why 0x1a keeps lurking the sound queue in the world version???
if (m_strip_0x1a)
if (m_soundlatch2->read(space, 0) == 1 && data == 0x1a)
return;
m_soundlatch->write(space, 0, data & 0xff);
}
}
WRITE16_MEMBER(xexex_state::sound_cmd2_w)
{
if (ACCESSING_BITS_0_7)
m_soundlatch2->write(space, 0, data & 0xff);
}
WRITE16_MEMBER(xexex_state::sound_irq_w)
{
m_audiocpu->set_input_line(0, HOLD_LINE);
}
READ16_MEMBER(xexex_state::sound_status_r)
{
return m_soundlatch3->read(space, 0);
}
WRITE8_MEMBER(xexex_state::sound_bankswitch_w)
{
membank("z80bank")->set_entry(data & 0x07);
@ -378,10 +353,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, xexex_state )
AM_RANGE(0x0cc000, 0x0cc01f) AM_DEVWRITE("k053251", k053251_device, lsb_w) // priority encoder
// AM_RANGE(0x0d0000, 0x0d001f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff) // CCU
AM_RANGE(0x0d4000, 0x0d4001) AM_WRITE(sound_irq_w)
AM_RANGE(0x0d600c, 0x0d600d) AM_WRITE(sound_cmd1_w)
AM_RANGE(0x0d600e, 0x0d600f) AM_WRITE(sound_cmd2_w)
AM_RANGE(0x0d6014, 0x0d6015) AM_READ(sound_status_r)
AM_RANGE(0x0d6000, 0x0d601f) AM_RAM // sound regs fall through
AM_RANGE(0x0d6000, 0x0d601f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x0d8000, 0x0d8007) AM_DEVWRITE("k056832", k056832_device, b_word_w) // VSCCS regs
AM_RANGE(0x0da000, 0x0da001) AM_READ_PORT("P1")
AM_RANGE(0x0da002, 0x0da003) AM_READ_PORT("P2")
@ -412,9 +384,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, xexex_state )
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe22f) AM_DEVREADWRITE("k054539", k054539_device, read, write)
AM_RANGE(0xec00, 0xec01) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0xf000, 0xf000) AM_DEVWRITE("soundlatch3", generic_latch_8_device, write)
AM_RANGE(0xf002, 0xf002) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xf003, 0xf003) AM_DEVREAD("soundlatch2", generic_latch_8_device, read)
AM_RANGE(0xf000, 0xf003) AM_DEVICE("k054321", k054321_device, sound_map)
AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_bankswitch_w)
ADDRESS_MAP_END
@ -545,9 +515,7 @@ static MACHINE_CONFIG_START( xexex, xexex_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_GENERIC_LATCH_8_ADD("soundlatch3")
MCFG_K054321_ADD("k054321", ":lspeaker", ":rspeaker")
MCFG_YM2151_ADD("ymsnd", XTAL_32MHz/8) // 4MHz
MCFG_SOUND_ROUTE(0, "filter1l", 0.50)

View File

@ -46,7 +46,10 @@ WRITE16_MEMBER(xmen_state::eeprom_w)
/* bit 3 is clock (active high) */
/* bit 4 is cs (active low) */
/* bit 5 is enabled in IRQ3, disabled in IRQ5 (sprite DMA start?) */
/* bit 6 is sound irq, but with some kind of hold */
ioport("EEPROMOUT")->write(data, 0xff);
if(data & 0x40)
m_audiocpu->set_input_line(0, HOLD_LINE);
}
if (ACCESSING_BITS_8_15)
{
@ -57,25 +60,6 @@ WRITE16_MEMBER(xmen_state::eeprom_w)
}
}
READ16_MEMBER(xmen_state::sound_status_r)
{
return m_soundlatch2->read(space, 0);
}
WRITE16_MEMBER(xmen_state::sound_cmd_w)
{
if (ACCESSING_BITS_0_7)
{
data &= 0xff;
m_soundlatch->write(space, 0, data);
}
}
WRITE16_MEMBER(xmen_state::sound_irq_w)
{
m_audiocpu->set_input_line(0, HOLD_LINE);
}
WRITE16_MEMBER(xmen_state::xmen_18fa00_w)
{
if(ACCESSING_BITS_0_7)
@ -99,9 +83,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, xmen_state )
AM_RANGE(0x104000, 0x104fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0x108000, 0x108001) AM_WRITE(eeprom_w)
AM_RANGE(0x108020, 0x108027) AM_DEVWRITE("k053246", k053247_device, k053246_word_w)
AM_RANGE(0x10804c, 0x10804d) AM_WRITE(sound_cmd_w)
AM_RANGE(0x10804e, 0x10804f) AM_WRITE(sound_irq_w)
AM_RANGE(0x108054, 0x108055) AM_READ(sound_status_r)
AM_RANGE(0x108040, 0x10805f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x108060, 0x10807f) AM_DEVWRITE("k053251", k053251_device, lsb_w)
AM_RANGE(0x10a000, 0x10a001) AM_READ_PORT("P2_P4") AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w)
AM_RANGE(0x10a002, 0x10a003) AM_READ_PORT("P1_P3")
@ -118,8 +100,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, xmen_state )
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe22f) AM_DEVREADWRITE("k054539", k054539_device, read, write)
AM_RANGE(0xe800, 0xe801) AM_MIRROR(0x0400) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0xf000, 0xf000) AM_DEVWRITE("soundlatch2", generic_latch_8_device, write)
AM_RANGE(0xf002, 0xf002) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xf000, 0xf003) AM_DEVICE("k054321", k054321_device, sound_map)
AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_bankswitch_w)
ADDRESS_MAP_END
@ -134,9 +115,7 @@ static ADDRESS_MAP_START( 6p_main_map, AS_PROGRAM, 16, xmen_state )
AM_RANGE(0x104000, 0x104fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0x108000, 0x108001) AM_WRITE(eeprom_w)
AM_RANGE(0x108020, 0x108027) AM_DEVWRITE("k053246", k053247_device, k053246_word_w) /* sprites */
AM_RANGE(0x10804c, 0x10804d) AM_WRITE(sound_cmd_w)
AM_RANGE(0x10804e, 0x10804f) AM_WRITE(sound_irq_w)
AM_RANGE(0x108054, 0x108055) AM_READ(sound_status_r)
AM_RANGE(0x108040, 0x10805f) AM_DEVICE8("k054321", k054321_device, main_map, 0x00ff)
AM_RANGE(0x108060, 0x10807f) AM_DEVWRITE("k053251", k053251_device, lsb_w)
AM_RANGE(0x10a000, 0x10a001) AM_READ_PORT("P2_P4") AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w)
AM_RANGE(0x10a002, 0x10a003) AM_READ_PORT("P1_P3")
@ -354,8 +333,7 @@ static MACHINE_CONFIG_START( xmen, xmen_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_K054321_ADD("k054321", ":lspeaker", ":rspeaker")
MCFG_YM2151_ADD("ymsnd", XTAL_16MHz/4) /* verified on pcb */
MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)

View File

@ -12,6 +12,7 @@
#include "video/k054156_k054157_k056832.h"
#include "video/k053246_k053247_k055673.h"
#include "video/konami_helper.h"
#include "machine/k054321.h"
class gijoe_state : public driver_device
{
@ -27,8 +28,7 @@ public:
m_k053246(*this, "k053246"),
m_k053251(*this, "k053251"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
m_soundlatch2(*this, "soundlatch2") { }
m_k054321(*this, "k054321") { }
/* memory pointers */
required_shared_ptr<uint16_t> m_spriteram;
@ -54,14 +54,11 @@ public:
required_device<k053247_device> m_k053246;
required_device<k053251_device> m_k053251;
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
required_device<generic_latch_8_device> m_soundlatch2;
required_device<k054321_device> m_k054321;
DECLARE_READ16_MEMBER(control2_r);
DECLARE_WRITE16_MEMBER(control2_w);
DECLARE_WRITE16_MEMBER(sound_cmd_w);
DECLARE_WRITE16_MEMBER(sound_irq_w);
DECLARE_READ16_MEMBER(sound_status_r);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;

View File

@ -12,6 +12,7 @@
#include "video/k054156_k054157_k056832.h"
#include "video/k053244_k053245.h"
#include "video/k054000.h"
#include "machine/k054321.h"
class lethal_state : public driver_device
{
@ -23,6 +24,7 @@ public:
m_bank4000(*this, "bank4000"),
m_k056832(*this, "k056832"),
m_k053244(*this, "k053244"),
m_k054321(*this, "k054321"),
m_palette(*this, "palette") { }
/* video-related */
@ -39,11 +41,11 @@ public:
required_device<address_map_bank_device> m_bank4000;
required_device<k056832_device> m_k056832;
required_device<k05324x_device> m_k053244;
required_device<k054321_device> m_k054321;
required_device<palette_device> m_palette;
DECLARE_WRITE8_MEMBER(control2_w);
DECLARE_WRITE8_MEMBER(sound_irq_w);
DECLARE_READ8_MEMBER(sound_status_r);
DECLARE_WRITE8_MEMBER(le_bankswitch_w);
DECLARE_READ8_MEMBER(guns_r);
DECLARE_READ8_MEMBER(gunsaux_r);

View File

@ -14,6 +14,7 @@
#include "video/k053246_k053247_k055673.h"
#include "video/k054000.h"
#include "video/k054338.h"
#include "machine/k054321.h"
#include "video/konami_helper.h"
#include "screen.h"
@ -35,9 +36,7 @@ public:
m_k054338(*this, "k054338"),
m_palette(*this, "palette"),
m_screen(*this, "screen"),
m_soundlatch(*this, "soundlatch"),
m_soundlatch2(*this, "soundlatch2"),
m_soundlatch3(*this, "soundlatch3") { }
m_k054321(*this, "k054321") { }
/* memory pointers */
optional_shared_ptr<uint16_t> m_workram;
@ -66,17 +65,12 @@ public:
required_device<k054338_device> m_k054338;
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
optional_device<generic_latch_8_device> m_soundlatch;
optional_device<generic_latch_8_device> m_soundlatch2;
optional_device<generic_latch_8_device> m_soundlatch3;
optional_device<k054321_device> m_k054321;
emu_timer *m_dmaend_timer;
DECLARE_READ16_MEMBER(control2_r);
DECLARE_WRITE16_MEMBER(control2_w);
DECLARE_WRITE16_MEMBER(sound_cmd1_w);
DECLARE_WRITE16_MEMBER(sound_cmd2_w);
DECLARE_WRITE16_MEMBER(sound_irq_w);
DECLARE_READ16_MEMBER(sound_status_r);
DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
DECLARE_WRITE16_MEMBER(moo_prot_w);
DECLARE_WRITE16_MEMBER(moobl_oki_bank_w);

View File

@ -9,6 +9,7 @@
#include "machine/k053252.h"
#include "video/k055555.h"
#include "video/k054000.h"
#include "machine/k054321.h"
class mystwarr_state : public konamigx_state
{
@ -19,9 +20,7 @@ public:
m_k053252(*this, "k053252"),
m_k056832(*this, "k056832"),
m_k055673(*this, "k055673"),
m_soundlatch(*this, "soundlatch"),
m_soundlatch2(*this, "soundlatch2"),
m_soundlatch3(*this, "soundlatch3"),
m_k054321(*this, "k054321"),
m_gx_workram(*this,"gx_workram"),
m_spriteram(*this,"spriteram")
{ }
@ -30,9 +29,7 @@ public:
required_device<k053252_device> m_k053252;
required_device<k056832_device> m_k056832;
required_device<k055673_device> m_k055673;
required_device<generic_latch_8_device> m_soundlatch;
required_device<generic_latch_8_device> m_soundlatch2;
required_device<generic_latch_8_device> m_soundlatch3;
required_device<k054321_device> m_k054321;
required_shared_ptr<uint16_t> m_gx_workram;
optional_shared_ptr<uint16_t> m_spriteram;
std::unique_ptr<uint8_t[]> m_decoded;
@ -58,13 +55,7 @@ public:
DECLARE_WRITE16_MEMBER(mweeprom_w);
DECLARE_READ16_MEMBER(dddeeprom_r);
DECLARE_WRITE16_MEMBER(mmeeprom_w);
DECLARE_WRITE16_MEMBER(sound_cmd1_w);
DECLARE_WRITE16_MEMBER(sound_cmd1_msb_w);
DECLARE_WRITE16_MEMBER(sound_cmd2_w);
DECLARE_WRITE16_MEMBER(sound_cmd2_msb_w);
DECLARE_WRITE16_MEMBER(sound_irq_w);
DECLARE_READ16_MEMBER(sound_status_r);
DECLARE_READ16_MEMBER(sound_status_msb_r);
DECLARE_WRITE16_MEMBER(irq_ack_w);
DECLARE_READ16_MEMBER(k053247_scattered_word_r);
DECLARE_WRITE16_MEMBER(k053247_scattered_word_w);

View File

@ -11,6 +11,7 @@
#include "machine/k053252.h"
#include "video/k053246_k053247_k055673.h"
#include "video/k053936.h"
#include "machine/k054321.h"
#include "video/konami_helper.h"
#include "screen.h"
@ -30,8 +31,7 @@ public:
m_palette(*this, "palette"),
m_palette2(*this, "palette2"),
m_screen(*this, "screen"),
m_soundlatch(*this, "soundlatch"),
m_soundlatch2(*this, "soundlatch2"),
m_k054321(*this, "k054321"),
m_sysreg(*this, "sysreg")
{ }
@ -47,8 +47,7 @@ public:
required_device<palette_device> m_palette;
optional_device<palette_device> m_palette2;
required_device<screen_device> m_screen;
required_device<generic_latch_8_device> m_soundlatch;
required_device<generic_latch_8_device> m_soundlatch2;
required_device<k054321_device> m_k054321;
/* memory pointers */
required_shared_ptr<uint16_t> m_sysreg;

View File

@ -16,6 +16,7 @@
#include "video/k054338.h"
#include "video/k053251.h"
#include "video/konami_helper.h"
#include "machine/k054321.h"
#include "screen.h"
class xexex_state : public driver_device
@ -40,9 +41,7 @@ public:
m_k054338(*this, "k054338"),
m_palette(*this, "palette"),
m_screen(*this, "screen"),
m_soundlatch(*this, "soundlatch"),
m_soundlatch2(*this, "soundlatch2"),
m_soundlatch3(*this, "soundlatch3") { }
m_k054321(*this, "k054321") { }
/* memory pointers */
required_shared_ptr<uint16_t> m_workram;
@ -78,19 +77,14 @@ public:
required_device<k054338_device> m_k054338;
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
required_device<generic_latch_8_device> m_soundlatch;
required_device<generic_latch_8_device> m_soundlatch2;
required_device<generic_latch_8_device> m_soundlatch3;
required_device<k054321_device> m_k054321;
DECLARE_READ16_MEMBER(spriteram_mirror_r);
DECLARE_WRITE16_MEMBER(spriteram_mirror_w);
DECLARE_READ16_MEMBER(xexex_waitskip_r);
DECLARE_READ16_MEMBER(control2_r);
DECLARE_WRITE16_MEMBER(control2_w);
DECLARE_WRITE16_MEMBER(sound_cmd1_w);
DECLARE_WRITE16_MEMBER(sound_cmd2_w);
DECLARE_WRITE16_MEMBER(sound_irq_w);
DECLARE_READ16_MEMBER(sound_status_r);
DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
DECLARE_DRIVER_INIT(xexex);
virtual void machine_start() override;

View File

@ -7,6 +7,7 @@
#include "video/k053251.h"
#include "video/k052109.h"
#include "video/konami_helper.h"
#include "machine/k054321.h"
#include "screen.h"
class xmen_state : public driver_device
@ -25,8 +26,7 @@ public:
m_k053246(*this, "k053246"),
m_k053251(*this, "k053251"),
m_screen(*this, "screen"),
m_soundlatch(*this, "soundlatch"),
m_soundlatch2(*this, "soundlatch2"),
m_k054321(*this, "k054321"),
m_z80bank(*this, "z80bank") { }
/* video-related */
@ -54,14 +54,10 @@ public:
required_device<k053247_device> m_k053246;
required_device<k053251_device> m_k053251;
required_device<screen_device> m_screen;
required_device<generic_latch_8_device> m_soundlatch;
required_device<generic_latch_8_device> m_soundlatch2;
required_device<k054321_device> m_k054321;
required_memory_bank m_z80bank;
DECLARE_WRITE16_MEMBER(eeprom_w);
DECLARE_READ16_MEMBER(sound_status_r);
DECLARE_WRITE16_MEMBER(sound_cmd_w);
DECLARE_WRITE16_MEMBER(sound_irq_w);
DECLARE_WRITE16_MEMBER(xmen_18fa00_w);
DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
DECLARE_CUSTOM_INPUT_MEMBER(xmen_frame_r);