hd6309: Create HD6309E variant that fixes ajax regression (nw)

This commit is contained in:
AJR 2017-12-09 18:08:01 -05:00
parent 6c7c1e8a67
commit 7c0d984514
3 changed files with 28 additions and 4 deletions

View File

@ -126,19 +126,30 @@ March 2013 NPW:
//************************************************************************** //**************************************************************************
DEFINE_DEVICE_TYPE(HD6309, hd6309_device, "hd6309", "HD6309") DEFINE_DEVICE_TYPE(HD6309, hd6309_device, "hd6309", "HD6309")
DEFINE_DEVICE_TYPE(HD6309E, hd6309e_device, "hd6309e", "HD6309E")
//------------------------------------------------- //-------------------------------------------------
// hd6309_device - constructor // hd6309_device - constructor
//------------------------------------------------- //-------------------------------------------------
hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type, int divider) :
m6809_base_device(mconfig, tag, owner, clock, HD6309, 4), m6809_base_device(mconfig, tag, owner, clock, type, divider),
m_md(0), m_md(0),
m_temp_im(0) m_temp_im(0)
{ {
} }
hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
hd6309_device(mconfig, tag, owner, clock, HD6309, 4)
{
}
hd6309e_device::hd6309e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
hd6309_device(mconfig, tag, owner, clock, HD6309E, 1)
{
}
//------------------------------------------------- //-------------------------------------------------
// device_start - device-specific startup // device_start - device-specific startup
//------------------------------------------------- //-------------------------------------------------

View File

@ -20,8 +20,9 @@
// TYPE DEFINITIONS // TYPE DEFINITIONS
//************************************************************************** //**************************************************************************
// device type definition // device type definitions
DECLARE_DEVICE_TYPE(HD6309, hd6309_device) DECLARE_DEVICE_TYPE(HD6309, hd6309_device)
DECLARE_DEVICE_TYPE(HD6309E, hd6309e_device)
// ======================> hd6309_device // ======================> hd6309_device
@ -32,6 +33,9 @@ public:
hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected: protected:
// delegating constructor
hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type, int divider);
// device-level overrides // device-level overrides
virtual void device_start() override; virtual void device_start() override;
virtual void device_reset() override; virtual void device_reset() override;
@ -138,6 +142,15 @@ enum
HD6309_ZERO_WORD HD6309_ZERO_WORD
}; };
// ======================> hd6309e_device
class hd6309e_device : public hd6309_device
{
public:
// construction/destruction
hd6309e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
#define HD6309_IRQ_LINE M6809_IRQ_LINE /* 0 - IRQ line number */ #define HD6309_IRQ_LINE M6809_IRQ_LINE /* 0 - IRQ line number */
#define HD6309_FIRQ_LINE M6809_FIRQ_LINE /* 1 - FIRQ line number */ #define HD6309_FIRQ_LINE M6809_FIRQ_LINE /* 1 - FIRQ line number */

View File

@ -173,7 +173,7 @@ static MACHINE_CONFIG_START( ajax )
MCFG_CPU_ADD("maincpu", KONAMI, XTAL_24MHz/2/4) /* 052001 12/4 MHz*/ MCFG_CPU_ADD("maincpu", KONAMI, XTAL_24MHz/2/4) /* 052001 12/4 MHz*/
MCFG_CPU_PROGRAM_MAP(ajax_main_map) MCFG_CPU_PROGRAM_MAP(ajax_main_map)
MCFG_CPU_ADD("sub", HD6309, 3000000) /* ? */ MCFG_CPU_ADD("sub", HD6309E, 3000000) /* ? */
MCFG_CPU_PROGRAM_MAP(ajax_sub_map) MCFG_CPU_PROGRAM_MAP(ajax_sub_map)
MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.58 MHz */ MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.58 MHz */