summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/includes/pc1251.h
blob: b7bff70c00f02e8d403e215cf2e13beefd750370 (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
/*****************************************************************************
 *
 * includes/pc1251.h
 *
 * Pocket Computer 1251
 *
 ****************************************************************************/

#ifndef PC1251_H_
#define PC1251_H_

#include "machine/nvram.h"

#define PC1251_CONTRAST (ioport("DSW0")->read() & 0x07)


class pc1251_state : public driver_device
{
public:
	enum
	{
		TIMER_POWER_UP
	};

	pc1251_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag),
		m_maincpu(*this, "maincpu") { }

	UINT8 m_outa;
	UINT8 m_outb;
	int m_power;
	UINT8 m_reg[0x100];

	DECLARE_DRIVER_INIT(pc1251);
	UINT32 screen_update_pc1251(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	DECLARE_WRITE8_MEMBER(pc1251_outa);
	DECLARE_WRITE8_MEMBER(pc1251_outb);
	DECLARE_WRITE8_MEMBER(pc1251_outc);

	DECLARE_READ_LINE_MEMBER(pc1251_reset);
	DECLARE_READ_LINE_MEMBER(pc1251_brk);
	DECLARE_READ8_MEMBER(pc1251_ina);
	DECLARE_READ8_MEMBER(pc1251_inb);
	DECLARE_READ8_MEMBER(pc1251_lcd_read);
	DECLARE_WRITE8_MEMBER(pc1251_lcd_write);
	virtual void machine_start();
	DECLARE_MACHINE_START(pc1260);
	required_device<cpu_device> m_maincpu;

protected:
	virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
};

#endif /* PC1251_H_ */