1
/***************************************************************************
5
31/08/2010 Skeleton driver.
6
18/11/2010 Connected to a terminal
8
****************************************************************************/
9
#define ADDRESS_MAP_MODERN
12
#include "cpu/z80/z80.h"
13
#include "machine/terminal.h"
15
#define MACHINE_RESET_MEMBER(name) void name::machine_reset()
17
class mccpm_state : public driver_device
20
mccpm_state(const machine_config &mconfig, device_type type, const char *tag)
21
: driver_device(mconfig, type, tag),
22
m_maincpu(*this, "maincpu"),
23
m_terminal(*this, TERMINAL_TAG)
26
required_device<cpu_device> m_maincpu;
27
required_device<device_t> m_terminal;
28
DECLARE_READ8_MEMBER( mccpm_f0_r );
29
DECLARE_WRITE8_MEMBER( kbd_put );
32
virtual void machine_reset();
37
READ8_MEMBER( mccpm_state::mccpm_f0_r )
39
UINT8 ret = m_term_data;
44
static ADDRESS_MAP_START(mccpm_mem, AS_PROGRAM, 8, mccpm_state)
45
ADDRESS_MAP_UNMAP_HIGH
46
AM_RANGE(0x0000, 0xffff) AM_RAM AM_BASE(m_ram)
49
static ADDRESS_MAP_START( mccpm_io, AS_IO, 8, mccpm_state)
50
ADDRESS_MAP_UNMAP_HIGH
51
ADDRESS_MAP_GLOBAL_MASK(0xff)
52
AM_RANGE(0xf0, 0xf0) AM_READ(mccpm_f0_r) AM_DEVWRITE_LEGACY(TERMINAL_TAG, terminal_write)
56
static INPUT_PORTS_START( mccpm )
60
MACHINE_RESET_MEMBER(mccpm_state)
62
UINT8* bios = machine().region("maincpu")->base();
63
memcpy(m_ram, bios, 0x1000);
66
WRITE8_MEMBER( mccpm_state::kbd_put )
71
static GENERIC_TERMINAL_INTERFACE( terminal_intf )
73
DEVCB_DRIVER_MEMBER(mccpm_state, kbd_put)
76
static MACHINE_CONFIG_START( mccpm, mccpm_state )
77
/* basic machine hardware */
78
MCFG_CPU_ADD("maincpu",Z80, XTAL_4MHz)
79
MCFG_CPU_PROGRAM_MAP(mccpm_mem)
80
MCFG_CPU_IO_MAP(mccpm_io)
83
MCFG_FRAGMENT_ADD( generic_terminal )
84
MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf)
89
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
90
ROM_LOAD( "mon36.j15", 0x0000, 0x1000, CRC(9c441537) SHA1(f95bad52d9392b8fc9d9b8779b7b861672a0022b))
95
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
96
COMP( 1981, mccpm, 0, 0, mccpm, mccpm, 0, "GRAF Elektronik Systeme GmbH", "mc-CP/M-Computer", GAME_NOT_WORKING | GAME_NO_SOUND)