mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
added alpha8201 skeleton
This commit is contained in:
parent
03050aab9e
commit
068c61549a
@ -838,6 +838,7 @@ files {
|
||||
MAME_DIR .. "src/mame/video/equites.c",
|
||||
MAME_DIR .. "src/mame/drivers/meijinsn.c",
|
||||
MAME_DIR .. "src/mame/drivers/shougi.c",
|
||||
MAME_DIR .. "src/mame/machine/alpha8201.c",
|
||||
}
|
||||
|
||||
createMAMEProjects(_target, _subtarget, "amiga")
|
||||
|
@ -80,7 +80,7 @@ PROM : Type MB7051
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/alph8201/alph8201.h"
|
||||
//#include "cpu/hmcs40/hmcs40.h"
|
||||
#include "machine/alpha8201.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "video/resnet.h"
|
||||
@ -402,6 +402,8 @@ static MACHINE_CONFIG_START( shougi, shougi_state )
|
||||
|
||||
MCFG_CPU_ADD("mcu", ALPHA8201L, XTAL_10MHz/4/8)
|
||||
MCFG_CPU_PROGRAM_MAP(mcu_map)
|
||||
|
||||
MCFG_DEVICE_ADD("prot", ALPHA_8201, XTAL_10MHz/4/8)
|
||||
|
||||
MCFG_QUANTUM_PERFECT_CPU("maincpu")
|
||||
MCFG_WATCHDOG_VBLANK_INIT(16) // assuming it's the same as champbas
|
||||
@ -451,6 +453,9 @@ ROM_START( shougi )
|
||||
ROM_REGION( 0x2000, "mcu", 0 )
|
||||
ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
|
||||
|
||||
ROM_REGION( 0x2000, "prot:mcu", 0 )
|
||||
ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
|
||||
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "pr.2l", 0x0000, 0x0020, CRC(cd3559ff) SHA1(a1291b06a8a337943660b2ef62c94c49d58a6fb5) )
|
||||
ROM_END
|
||||
@ -474,6 +479,9 @@ ROM_START( shougi2 )
|
||||
ROM_REGION( 0x2000, "mcu", 0 )
|
||||
ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
|
||||
|
||||
ROM_REGION( 0x2000, "prot:mcu", 0 )
|
||||
ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
|
||||
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "pr.2l", 0x0000, 0x0020, CRC(cd3559ff) SHA1(a1291b06a8a337943660b2ef62c94c49d58a6fb5) )
|
||||
ROM_END
|
||||
|
79
src/mame/machine/alpha8201.c
Normal file
79
src/mame/machine/alpha8201.c
Normal file
@ -0,0 +1,79 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/***************************************************************************
|
||||
|
||||
Alpha Denshi ALPHA-8201 family protection emulation
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
abc
|
||||
|
||||
|
||||
TODO:
|
||||
- x
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "cpu/hmcs40/hmcs40.h"
|
||||
#include "alpha8201.h"
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
const device_type ALPHA_8201 = &device_creator<alpha_8201_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// alpha_8201_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
alpha_8201_device::alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, ALPHA_8201, "ALPHA-8201", tag, owner, clock, "alpha8201", __FILE__),
|
||||
m_mcu(*this, "mcu")
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void alpha_8201_device::device_start()
|
||||
{
|
||||
m_shared_ram = auto_alloc_array_clear(machine(), UINT8, 0x400);
|
||||
|
||||
// register for savestates
|
||||
save_pointer(NAME(m_shared_ram), 0x400);
|
||||
}
|
||||
|
||||
// machine config additions
|
||||
static MACHINE_CONFIG_FRAGMENT(alpha8201)
|
||||
|
||||
MCFG_CPU_ADD("mcu", HD44801, DERIVED_CLOCK(1,1))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor alpha_8201_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(alpha8201);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void alpha_8201_device::device_reset()
|
||||
{
|
||||
m_mcu->set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Internal I/O
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
I/O for External Interface
|
||||
|
||||
***************************************************************************/
|
38
src/mame/machine/alpha8201.h
Normal file
38
src/mame/machine/alpha8201.h
Normal file
@ -0,0 +1,38 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/***************************************************************************
|
||||
|
||||
Alpha Denshi ALPHA-8201 family protection emulation
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _ALPHA8201_H_
|
||||
#define _ALPHA8201_H_
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
class alpha_8201_device : public device_t
|
||||
{
|
||||
public:
|
||||
alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~alpha_8201_device() {}
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_mcu;
|
||||
|
||||
// internal state
|
||||
UINT8* m_shared_ram;
|
||||
};
|
||||
|
||||
|
||||
extern const device_type ALPHA_8201;
|
||||
|
||||
|
||||
#endif /* _ALPHA8201_H_ */
|
Loading…
Reference in New Issue
Block a user