summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/esqlcd.h
blob: eb5aaaa648cd848375af8a8c2ae9b944a475d68a (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
// license:BSD-3-Clause
// copyright-holders:R. Belmont, Parduz
#ifndef ESQLCD_H
#define ESQLCD_H

#include "emu.h"
#include "esqvfd.h"


// --- SQ1 - Parduz --------------------------------------------------------------------------------------------------------------------------

#define MCFG_ESQ2x16_SQ1_ADD(_tag)  \
	MCFG_DEVICE_ADD(_tag, ESQ2x16_SQ1, 60)

#define MCFG_ESQ2x16_SQ1_REMOVE(_tag) \
	MCFG_DEVICE_REMOVE(_tag)

class esq2x16_sq1_t : public esqvfd_t {
public:
	esq2x16_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

	virtual void write_char(int data) override;
	virtual void update_display() override;
	virtual void device_reset() override;


	void lcd_reset();
	void page_reset();
	char RotateLcdChar(uint8_t lcdChar, int charRow);
protected:
	virtual machine_config_constructor device_mconfig_additions() const override;
	uint8_t m_lcdpg[4][32];
	int m_lcdPage;
	int m_lcdPos,m_lcdSavedPos;

	uint8_t m_leds[16];
	uint8_t m_ledsDirty[16];

private:
	int m_LcdCommand;
};

extern const device_type ESQ2x16_SQ1;

#endif