summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/centronics/nec_p72.cpp
blob: fe03bb93d341090d1e541b2f72379505e79cd0c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// license:BSD-3-Clause
// copyright-holders:Ramiro Polla

#include "emu.h"
#include "nec_p72.h"


//**************************************************************************
//  DEVICE DEFINITIONS
//**************************************************************************

DEFINE_DEVICE_TYPE(NEC_P72, nec_p72_device, "p72", "NEC PinWriter P72")


//-------------------------------------------------
//  ROM( p72 )
//-------------------------------------------------

ROM_START( p72 )
	ROM_REGION(0x100000, "maincpu", 0)
	ROM_LOAD("p72.2c", 0x000000, 0x100000, CRC(2bc6846f) SHA1(10430f1d3b73ad413d77053515d9d53831a1341b))
ROM_END


//-------------------------------------------------
//  rom_region - device-specific ROM region
//-------------------------------------------------

const tiny_rom_entry *nec_p72_device::device_rom_region() const
{
	return ROM_NAME( p72 );
}


//-------------------------------------------------
//  ADDRESS_MAP( p72_mem )
//-------------------------------------------------

void nec_p72_device::p72_mem(address_map &map)
{
	map(0x000000, 0x0fffff).rom(); /* 1Mbyte firmware */
	//map(0x100000, 0x1fffff).ram(); /* 1Mbyte external RAM */ /* TODO might be 2x1Mbit */
	// [RH] 29 August 2016: Commented out because the NEC V33 only has 20 address lines, and
	// the V40 has more, but we don't have an NEC V40 implemented yet.
}


//-------------------------------------------------
//  device_add_mconfig - add device configuration
//-------------------------------------------------

void nec_p72_device::device_add_mconfig(machine_config &config)
{
	/* basic machine hardware */
	V33(config, m_maincpu, XTAL(16'000'000)/2); /* TODO it's actually a V40 */
	m_maincpu->set_addrmap(AS_PROGRAM, &nec_p72_device::p72_mem);
}


//-------------------------------------------------
//  device_start - device-specific startup
//-------------------------------------------------

void nec_p72_device::device_start()
{
}

//**************************************************************************
//  LIVE DEVICE
//**************************************************************************

//-------------------------------------------------
//  nec_p72_device - constructor
//-------------------------------------------------

nec_p72_device::nec_p72_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	nec_p72_device(mconfig, NEC_P72, tag, owner, clock)
{
}

nec_p72_device::nec_p72_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
	device_t(mconfig, type, tag, owner, clock),
	device_centronics_peripheral_interface(mconfig, *this),
	m_maincpu(*this, "maincpu")
{
}