summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/video/tlc34076.h
blob: 62d03d0d2cb253608d7aa323777fe6392212a84d (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
/***************************************************************************

    tlc34076.h

    Basic implementation of the TLC34076 palette chip and similar
    compatible chips.

***************************************************************************/

#define TLC34076_6_BIT		0
#define TLC34076_8_BIT		1

const pen_t *tlc34076_get_pens(device_t *device);


/***************************************************************************
    TYPE DEFINITIONS
***************************************************************************/

typedef struct _tlc34076_config tlc34076_config;
struct _tlc34076_config
{
	int res_sel;
};

extern const tlc34076_config tlc34076_6_bit_intf;

class tlc34076_device : public device_t
{
public:
	tlc34076_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
	~tlc34076_device() { global_free(m_token); }

	// access to legacy token
	void *token() const { assert(m_token != NULL); return m_token; }
protected:
	// device-level overrides
	virtual void device_config_complete();
	virtual void device_start();
	virtual void device_reset();
private:
	// internal state
	void *m_token;
};

extern const device_type TLC34076;



/***************************************************************************
    DEVICE CONFIGURATION MACROS
***************************************************************************/

#define MCFG_TLC34076_ADD(_tag, _config) \
	MCFG_DEVICE_ADD(_tag, TLC34076, 0) \
	MCFG_DEVICE_CONFIG(_config)


/***************************************************************************
    DEVICE I/O FUNCTIONS
***************************************************************************/

WRITE8_DEVICE_HANDLER( tlc34076_w );
READ8_DEVICE_HANDLER( tlc34076_r );