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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
// license: GPL-2.0+
// copyright-holders: Dirk Best
/***************************************************************************
Kontron Ergoline Keyboard
***************************************************************************/
#include "emu.h"
#include "ergoline.h"
#include "cpu/mcs51/mcs51.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(ERGOLINE_KEYBOARD, ergoline_keyboard_device, "ergoline_kbd", "Ergoline Keyboard")
//-------------------------------------------------
// address_map - device-specific address maps
//-------------------------------------------------
void ergoline_keyboard_device::kbd_mem(address_map &map)
{
map(0x0000, 0x0fff).rom().region("firmware", 0);
}
void ergoline_keyboard_device::kbd_io(address_map &map)
{
}
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
static INPUT_PORTS_START( keyboard )
INPUT_PORTS_END
ioport_constructor ergoline_keyboard_device::device_input_ports() const
{
return INPUT_PORTS_NAME( keyboard );
}
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
ROM_START( kbd_pcb )
ROM_REGION(0x1000, "firmware", 0)
ROM_LOAD("mcg_21_1035.ic10", 0x0000, 0x1000, CRC(cde2417e) SHA1(8a2e1a894fda3e92fd760b8523121ba171281206)) // SUM16: 06f0 (ok)
ROM_END
const tiny_rom_entry *ergoline_keyboard_device::device_rom_region() const
{
return ROM_NAME(kbd_pcb);
}
void ergoline_keyboard_device::device_add_mconfig(machine_config &config)
{
i8031_device &maincpu(I8031(config, "maincpu", XTAL(5'529'600)));
maincpu.set_addrmap(AS_PROGRAM, &ergoline_keyboard_device::kbd_mem);
maincpu.set_addrmap(AS_IO, &ergoline_keyboard_device::kbd_io);
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// ergoline_keyboard_device - constructor
//-------------------------------------------------
ergoline_keyboard_device::ergoline_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, ERGOLINE_KEYBOARD, tag, owner, clock),
device_psi_keyboard_interface(mconfig, *this)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void ergoline_keyboard_device::device_start()
{
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void ergoline_keyboard_device::device_reset()
{
}
//**************************************************************************
// INTERFACE
//**************************************************************************
//-------------------------------------------------
// tx_w - receive bit from host
//-------------------------------------------------
void ergoline_keyboard_device::tx_w(int state)
{
logerror("tx_w: %d\n", state);
}
|