summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/esqlcd.h
blob: 0fa306f51613af79cdb1b93890fa77a4d05d5c18 (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 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 lcdChar, int charRow);
protected:
	virtual machine_config_constructor device_mconfig_additions() const override;
	UINT8 m_lcdpg[4][32];
	int m_lcdPage;
	int m_lcdPos,m_lcdSavedPos;

	UINT8 m_leds[16];
	UINT8 m_ledsDirty[16];

private:
	int m_LcdCommand;
};

extern const device_type ESQ2x16_SQ1;

#endif