mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
big event golf hookup doesn't seem identical (or isn't hooked up 100% properly) but can use the common device too (nw)
This commit is contained in:
parent
c56c0d6372
commit
2bf764c9a1
@ -346,8 +346,8 @@ static ADDRESS_MAP_START( bigevglf_sub_portmap, AS_IO, 8, bigevglf_state )
|
||||
AM_RANGE(0x06, 0x06) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0x07, 0x07) AM_READNOP
|
||||
AM_RANGE(0x08, 0x08) AM_WRITE(beg_port08_w) /* muxed port select + other unknown stuff */
|
||||
AM_RANGE(0x0b, 0x0b) AM_READ(bigevglf_mcu_r)
|
||||
AM_RANGE(0x0c, 0x0c) AM_WRITE(bigevglf_mcu_w)
|
||||
AM_RANGE(0x0b, 0x0b) AM_DEVREAD("bmcu", taito68705_mcu_device, mcu_r)
|
||||
AM_RANGE(0x0c, 0x0c) AM_DEVWRITE("bmcu", taito68705_mcu_device, mcu_w)
|
||||
AM_RANGE(0x0e, 0x0e) AM_WRITENOP /* 0-enable MCU, 1-keep reset line ASSERTED; D0 goes to the input of ls74 and the /Q of this ls74 goes to reset line on 68705 */
|
||||
AM_RANGE(0x10, 0x17) AM_WRITE(beg13_a_clr_w)
|
||||
AM_RANGE(0x18, 0x1f) AM_WRITE(beg13_b_set_w)
|
||||
@ -376,20 +376,6 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, bigevglf_state )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
/*********************************************************************************/
|
||||
/* MCU */
|
||||
|
||||
static ADDRESS_MAP_START( m68705_map, AS_PROGRAM, 8, bigevglf_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7ff)
|
||||
AM_RANGE(0x0000, 0x0000) AM_READWRITE(bigevglf_68705_port_a_r, bigevglf_68705_port_a_w)
|
||||
AM_RANGE(0x0001, 0x0001) AM_READWRITE(bigevglf_68705_port_b_r, bigevglf_68705_port_b_w)
|
||||
AM_RANGE(0x0002, 0x0002) AM_READWRITE(bigevglf_68705_port_c_r, bigevglf_68705_port_c_w)
|
||||
AM_RANGE(0x0004, 0x0004) AM_WRITE(bigevglf_68705_ddr_a_w)
|
||||
AM_RANGE(0x0005, 0x0005) AM_WRITE(bigevglf_68705_ddr_b_w)
|
||||
AM_RANGE(0x0006, 0x0006) AM_WRITE(bigevglf_68705_ddr_c_w)
|
||||
AM_RANGE(0x0010, 0x007f) AM_RAM
|
||||
AM_RANGE(0x0080, 0x07ff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static const gfx_layout gfxlayout =
|
||||
@ -424,20 +410,10 @@ void bigevglf_state::machine_start()
|
||||
save_item(NAME(m_from_sound));
|
||||
save_item(NAME(m_sound_state));
|
||||
|
||||
save_item(NAME(m_main_sent));
|
||||
save_item(NAME(m_mcu_sent));
|
||||
|
||||
save_item(NAME(m_mcu_coin_bit5));
|
||||
|
||||
save_item(NAME(m_port_a_in));
|
||||
save_item(NAME(m_port_a_out));
|
||||
save_item(NAME(m_ddr_a));
|
||||
save_item(NAME(m_port_b_in));
|
||||
save_item(NAME(m_port_b_out));
|
||||
save_item(NAME(m_ddr_b));
|
||||
save_item(NAME(m_port_c_in));
|
||||
save_item(NAME(m_port_c_out));
|
||||
save_item(NAME(m_ddr_c));
|
||||
save_item(NAME(m_from_mcu));
|
||||
|
||||
}
|
||||
|
||||
void bigevglf_state::machine_reset()
|
||||
@ -457,20 +433,7 @@ void bigevglf_state::machine_reset()
|
||||
m_from_sound = 0;
|
||||
m_sound_state = 0;
|
||||
|
||||
m_main_sent = 0;
|
||||
m_mcu_sent = 0;
|
||||
m_mcu_coin_bit5 = 0;
|
||||
|
||||
m_port_a_in = 0;
|
||||
m_port_a_out = 0;
|
||||
m_ddr_a = 0;
|
||||
m_port_b_in = 0;
|
||||
m_port_b_out = 0;
|
||||
m_ddr_b = 0;
|
||||
m_port_c_in = 0;
|
||||
m_port_c_out = 0;
|
||||
m_ddr_c = 0;
|
||||
m_from_mcu = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -493,8 +456,7 @@ static MACHINE_CONFIG_START( bigevglf, bigevglf_state )
|
||||
2 irqs/frame give good music tempo but also SOUND ERROR in test mode,
|
||||
4 irqs/frame give SOUND OK in test mode but music seems to be running too fast */
|
||||
|
||||
MCFG_CPU_ADD("mcu", M68705,2000000) /* ??? */
|
||||
MCFG_CPU_PROGRAM_MAP(m68705_map)
|
||||
MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU_BEG, 2000000) /* ??? */
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - interleaving is forced on the fly */
|
||||
|
||||
@ -559,7 +521,7 @@ ROM_START( bigevglf )
|
||||
ROM_LOAD( "a67-17", 0x4000, 0x4000, CRC(9f57deae) SHA1(dbdb3d77c3de0113ef6671aec854e4e44ee162ef))
|
||||
ROM_LOAD( "a67-18", 0x8000, 0x4000, CRC(40d54fed) SHA1(bfa0922809bffafec15d3ef59ac8b8ad653860a1))
|
||||
|
||||
ROM_REGION( 0x0800, "mcu", 0 )
|
||||
ROM_REGION( 0x0800, "bmcu:mcu", 0 )
|
||||
ROM_LOAD( "a67_19-1", 0x0000, 0x0800, CRC(25691658) SHA1(aabf47abac43abe2ffed18ead1cb94e587149e6e))
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", 0 )
|
||||
@ -590,7 +552,7 @@ ROM_START( bigevglfj )
|
||||
ROM_LOAD( "a67-17", 0x4000, 0x4000, CRC(9f57deae) SHA1(dbdb3d77c3de0113ef6671aec854e4e44ee162ef))
|
||||
ROM_LOAD( "a67-18", 0x8000, 0x4000, CRC(40d54fed) SHA1(bfa0922809bffafec15d3ef59ac8b8ad653860a1))
|
||||
|
||||
ROM_REGION( 0x0800, "mcu", 0 )
|
||||
ROM_REGION( 0x0800, "bmcu:mcu", 0 )
|
||||
ROM_LOAD( "a67_19-1", 0x0000, 0x0800, CRC(25691658) SHA1(aabf47abac43abe2ffed18ead1cb94e587149e6e))
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", 0 )
|
||||
|
@ -1,6 +1,7 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Jarek Burczynski, Tomasz Slanina
|
||||
#include "sound/msm5232.h"
|
||||
#include "machine/taito68705interface.h"
|
||||
|
||||
class bigevglf_state : public driver_device
|
||||
{
|
||||
@ -11,7 +12,7 @@ public:
|
||||
m_spriteram1(*this, "spriteram1"),
|
||||
m_spriteram2(*this, "spriteram2"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_mcu(*this, "mcu"),
|
||||
m_bmcu(*this, "bmcu"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_msm(*this, "msm"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
@ -38,18 +39,6 @@ public:
|
||||
uint8_t m_sound_state;
|
||||
|
||||
/* MCU related */
|
||||
uint8_t m_from_mcu;
|
||||
int m_mcu_sent;
|
||||
int m_main_sent;
|
||||
uint8_t m_port_a_in;
|
||||
uint8_t m_port_a_out;
|
||||
uint8_t m_ddr_a;
|
||||
uint8_t m_port_b_in;
|
||||
uint8_t m_port_b_out;
|
||||
uint8_t m_ddr_b;
|
||||
uint8_t m_port_c_in;
|
||||
uint8_t m_port_c_out;
|
||||
uint8_t m_ddr_c;
|
||||
int m_mcu_coin_bit5;
|
||||
|
||||
/* misc */
|
||||
@ -59,7 +48,7 @@ public:
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
optional_device<cpu_device> m_mcu;
|
||||
optional_device<taito68705_mcu_device> m_bmcu;
|
||||
DECLARE_WRITE8_MEMBER(beg_banking_w);
|
||||
DECLARE_WRITE8_MEMBER(beg_fromsound_w);
|
||||
DECLARE_READ8_MEMBER(beg_fromsound_r);
|
||||
|
@ -13,90 +13,14 @@
|
||||
#include "includes/bigevglf.h"
|
||||
|
||||
|
||||
READ8_MEMBER(bigevglf_state::bigevglf_68705_port_a_r)
|
||||
{
|
||||
return (m_port_a_out & m_ddr_a) | (m_port_a_in & ~m_ddr_a);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bigevglf_state::bigevglf_68705_port_a_w)
|
||||
{
|
||||
m_port_a_out = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bigevglf_state::bigevglf_68705_ddr_a_w)
|
||||
{
|
||||
m_ddr_a = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER(bigevglf_state::bigevglf_68705_port_b_r)
|
||||
{
|
||||
return (m_port_b_out & m_ddr_b) | (m_port_b_in & ~m_ddr_b);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bigevglf_state::bigevglf_68705_port_b_w)
|
||||
{
|
||||
if ((m_ddr_b & 0x02) && (~m_port_b_out & 0x02) && (data & 0x02)) /* positive going transition of the clock */
|
||||
{
|
||||
m_mcu->set_input_line(0, CLEAR_LINE);
|
||||
m_main_sent = 0;
|
||||
|
||||
}
|
||||
if ((m_ddr_b & 0x04) && (~m_port_b_out & 0x04) && (data & 0x04) ) /* positive going transition of the clock */
|
||||
{
|
||||
m_from_mcu = m_port_a_out;
|
||||
m_mcu_sent = 0;
|
||||
}
|
||||
|
||||
m_port_b_out = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bigevglf_state::bigevglf_68705_ddr_b_w)
|
||||
{
|
||||
m_ddr_b = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER(bigevglf_state::bigevglf_68705_port_c_r)
|
||||
{
|
||||
m_port_c_in = 0;
|
||||
if (m_main_sent)
|
||||
m_port_c_in |= 0x01;
|
||||
if (m_mcu_sent)
|
||||
m_port_c_in |= 0x02;
|
||||
|
||||
return (m_port_c_out & m_ddr_c) | (m_port_c_in & ~m_ddr_c);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bigevglf_state::bigevglf_68705_port_c_w)
|
||||
{
|
||||
m_port_c_out = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bigevglf_state::bigevglf_68705_ddr_c_w)
|
||||
{
|
||||
m_ddr_c = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bigevglf_state::bigevglf_mcu_w)
|
||||
{
|
||||
m_port_a_in = data;
|
||||
m_main_sent = 1;
|
||||
m_mcu->set_input_line(0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(bigevglf_state::bigevglf_mcu_r)
|
||||
{
|
||||
m_mcu_sent = 1;
|
||||
return m_from_mcu;
|
||||
}
|
||||
|
||||
READ8_MEMBER(bigevglf_state::bigevglf_mcu_status_r)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
if (!m_main_sent)
|
||||
if (!m_bmcu->get_main_sent())
|
||||
res |= 0x08;
|
||||
if (!m_mcu_sent)
|
||||
if (m_bmcu->get_mcu_sent())
|
||||
res |= 0x10;
|
||||
|
||||
return res;
|
||||
|
@ -22,6 +22,8 @@
|
||||
and the following with slight changes:
|
||||
slapfght.cpp - tigerh (inverted status bits read on portC)
|
||||
- slapfght (extended outputs for scrolling)
|
||||
bigevglf.cpp - writes to mcu aren't latched(?)f
|
||||
|
||||
|
||||
not hooked up here, but possible (needs investigating)
|
||||
pitnrun.cpp - have more functionality on portB, currently using 'instant timers' for latches
|
||||
@ -31,7 +33,6 @@
|
||||
xain.cpp - not a Taito game (licensed to Taito?) but MCU hookup looks almost the same
|
||||
renegade.cpp - ^^
|
||||
matmania.cpp - ^^
|
||||
bigevglf.cpp - can probably be hooked up
|
||||
|
||||
68705 sets in Taito drivers that are NOT suitable for hookup here?
|
||||
bublbobl.cpp - bub68705 - this is a bootleg, not an official Taito hookup
|
||||
@ -46,6 +47,7 @@
|
||||
const device_type TAITO68705_MCU = &device_creator<taito68705_mcu_device>;
|
||||
const device_type TAITO68705_MCU_SLAP = &device_creator<taito68705_mcu_slap_device>;
|
||||
const device_type TAITO68705_MCU_TIGER = &device_creator<taito68705_mcu_tiger_device>;
|
||||
const device_type TAITO68705_MCU_BEG = &device_creator<taito68705_mcu_beg_device>;
|
||||
|
||||
taito68705_mcu_device::taito68705_mcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, TAITO68705_MCU, "Taito M68705 MCU Interface", tag, owner, clock, "taito68705", __FILE__),
|
||||
@ -309,3 +311,44 @@ READ8_MEMBER(taito68705_mcu_tiger_device::mcu_portc_r)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* Big Event Golf has some things switched around, handle them here */
|
||||
|
||||
taito68705_mcu_beg_device::taito68705_mcu_beg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: taito68705_mcu_device(mconfig, TAITO68705_MCU_BEG, "Taito M68705 MCU Interface (Big Event Golf)", tag, owner, clock, "taito68705bigevglf", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(taito68705_mcu_beg_device::mcu_portb_w)
|
||||
{
|
||||
// transitions are reversed
|
||||
if ((mem_mask & 0x02) && (data & 0x02) && (~m_old_portB & 0x02) ) /* positive going transition of the clock */
|
||||
{
|
||||
//if (m_main_sent)
|
||||
m_mcu->set_input_line(0, CLEAR_LINE);
|
||||
|
||||
//m_to_mcu_latch = m_from_main; // this is weird, no latching?!
|
||||
m_main_sent = false;
|
||||
}
|
||||
if ((mem_mask & 0x04) && (data & 0x04) && (~m_old_portB & 0x04) ) /* positive going transition of the clock */
|
||||
{
|
||||
m_from_mcu = m_from_mcu_latch;
|
||||
m_mcu_sent = true;
|
||||
// logerror("sent %02x\n", m_from_mcu);
|
||||
}
|
||||
|
||||
m_old_portB = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(taito68705_mcu_beg_device::mcu_w)
|
||||
{
|
||||
// logerror("%s: mcu_w %02x\n", space.machine().describe_context(), data);
|
||||
|
||||
m_to_mcu_latch = data; // this is weird, no latching?!
|
||||
m_main_sent = true;
|
||||
m_mcu->set_input_line(0, ASSERT_LINE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,7 +11,7 @@ public:
|
||||
|
||||
~taito68705_mcu_device() {}
|
||||
|
||||
DECLARE_WRITE8_MEMBER( mcu_w );
|
||||
virtual DECLARE_WRITE8_MEMBER( mcu_w );
|
||||
DECLARE_READ8_MEMBER( mcu_r );
|
||||
DECLARE_READ8_MEMBER( mcu_porta_r );
|
||||
virtual DECLARE_READ8_MEMBER( mcu_portc_r );
|
||||
@ -74,3 +74,13 @@ public:
|
||||
};
|
||||
|
||||
extern const device_type TAITO68705_MCU_TIGER;
|
||||
|
||||
class taito68705_mcu_beg_device : public taito68705_mcu_device
|
||||
{
|
||||
public:
|
||||
taito68705_mcu_beg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
virtual DECLARE_WRITE8_MEMBER(mcu_w) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(mcu_portb_w) override;
|
||||
};
|
||||
|
||||
extern const device_type TAITO68705_MCU_BEG;
|
||||
|
Loading…
Reference in New Issue
Block a user