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
|
// license:???
// copyright-holders:???
/*****************************************************************************
*
* DL1416
*
* license: MAME, GPL-2.0+
* copyright-holders: Dirk Best
*
* 4-Digit 16-Segment Alphanumeric Intelligent Display
* with Memory/Decoder/Driver
*
* See video/dl1416.c for more info
*
****************************************************************************/
#ifndef DL1416_H_
#define DL1416_H_
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define MCFG_DL1416_UPDATE_HANDLER(_devcb) \
devcb = &dl1416_device::set_update_handler(*device, DEVCB_##_devcb);
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
/* device get info callback */
class dl1416_device : public device_t
{
public:
dl1416_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
~dl1416_device() {}
template<class _Object> static devcb_base &set_update_handler(device_t &device, _Object object) { return downcast<dl1416_device &>(device).m_update.set_callback(object); }
/* inputs */
DECLARE_WRITE_LINE_MEMBER( wr_w ); /* write enable */
DECLARE_WRITE_LINE_MEMBER( ce_w ); /* chip enable */
DECLARE_WRITE_LINE_MEMBER( cu_w ); /* cursor enable */
DECLARE_WRITE8_MEMBER( data_w );
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
private:
// internal state
int m_write_enable;
int m_chip_enable;
int m_cursor_enable;
devcb_write16 m_update;
UINT16 m_digit_ram[4]; // holds the digit code for each position
UINT8 m_cursor_state[4]; // holds the cursor state for each position, 0=off, 1=on
};
class dl1416b_device : public dl1416_device
{
public:
dl1416b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
extern const device_type DL1416B;
class dl1416t_device : public dl1416_device
{
public:
dl1416t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
extern const device_type DL1416T;
#endif /* DL1416_H_ */
|