fix gaplus crash

This commit is contained in:
Michaël Banaan Ananas 2014-03-03 14:15:21 +00:00
parent 538fd3e863
commit f46c71c679
5 changed files with 36 additions and 16 deletions

View File

@ -258,7 +258,7 @@ void cswat_state::machine_start()
static MACHINE_CONFIG_START( cswat, cswat_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M6809E, XTAL_18_432MHz/3/4) // HD68A09EP
MCFG_CPU_ADD("maincpu", M6809E, XTAL_18_432MHz/3/4) // HD68A09EP, 1.5MHz?
MCFG_CPU_PROGRAM_MAP(cswat_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", cswat_state, irq0_line_assert)
MCFG_CPU_PERIODIC_INT_DRIVER(cswat_state, nmi_handler, 300) // ?

View File

@ -211,14 +211,14 @@ WRITE8_MEMBER(gaplus_state::gaplus_freset_w)
static const namco_62xx_interface namco_62xx_intf =
{
{ /* port read handlers */
//DEVCB_INPUT_PORT("IN0L"),
//DEVCB_INPUT_PORT("IN0H"),
//DEVCB_INPUT_PORT("IN1L"),
//DEVCB_INPUT_PORT("IN1H")
DEVCB_NULL, //DEVCB_INPUT_PORT("IN0L"),
DEVCB_NULL, //DEVCB_INPUT_PORT("IN0H"),
DEVCB_NULL, //DEVCB_INPUT_PORT("IN1L"),
DEVCB_NULL //DEVCB_INPUT_PORT("IN1H")
},
{ /* port write handlers */
//DEVCB_DRIVER_MEMBER(out_0),
//DEVCB_DRIVER_MEMBER(out_1)
DEVCB_NULL, //DEVCB_DRIVER_MEMBER(out_0),
DEVCB_NULL //DEVCB_DRIVER_MEMBER(out_1)
}
};

View File

@ -10,7 +10,7 @@
***************************************************************************/
#include "emu.h"
#include "namco62.h"
#include "machine/namco62.h"
#include "cpu/mb88xx/mb88xx.h"
@ -18,10 +18,6 @@
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/***************************************************************************
DEVICE INTERFACE
***************************************************************************/
@ -53,14 +49,37 @@ namco_62xx_device::namco_62xx_device(const machine_config &mconfig, const char *
{
}
//-------------------------------------------------
// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
void namco_62xx_device::device_config_complete()
{
// inherit a copy of the static data
const namco_62xx_interface *intf = reinterpret_cast<const namco_62xx_interface *>(static_config());
if (intf != NULL)
*static_cast<namco_62xx_interface *>(this) = *intf;
// or initialize to defaults if none provided
else
{
memset(&m_in[0], 0, sizeof(m_in[0]));
memset(&m_in[1], 0, sizeof(m_in[1]));
memset(&m_in[2], 0, sizeof(m_in[2]));
memset(&m_in[3], 0, sizeof(m_in[3]));
memset(&m_out[0], 0, sizeof(m_out[0]));
memset(&m_out[1], 0, sizeof(m_out[1]));
}
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void namco_62xx_device::device_start()
{
astring tempstring;
/* find our CPU */
m_cpu = subdevice("mcu");
assert(m_cpu != NULL);

View File

@ -10,7 +10,7 @@ struct namco_62xx_interface
};
class namco_62xx_device : public device_t,
public namco_62xx_interface
public namco_62xx_interface
{
public:
namco_62xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@ -21,6 +21,7 @@ public:
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
virtual const rom_entry *device_rom_region() const;
virtual machine_config_constructor device_mconfig_additions() const;

View File

@ -36,7 +36,7 @@ protected:
TYPE_NAMCO56XX,
TYPE_NAMCO58XX,
TYPE_NAMCO59XX,
};
};
// internal state
UINT8 m_ram[16];