1 // license:BSD-3-Clause
2 // copyright-holders:Miodrag Milanovic
3 #ifndef MAME_INCLUDES_PK8000_H
4 #define MAME_INCLUDES_PK8000_H
5 
6 #pragma once
7 
8 #include "emupal.h"
9 
10 class pk8000_base_state : public driver_device
11 {
12 public:
pk8000_base_state(const machine_config & mconfig,device_type type,const char * tag)13 	pk8000_base_state(const machine_config &mconfig, device_type type, const char *tag)
14 		: driver_device(mconfig, type, tag)
15 		, m_maincpu(*this, "maincpu")
16 	{ }
17 
18 protected:
19 	uint8_t _84_porta_r();
20 	void _84_porta_w(uint8_t data);
21 	void _84_portc_w(uint8_t data);
22 
23 	uint8_t video_color_r();
24 	void video_color_w(uint8_t data);
25 	uint8_t text_start_r();
26 	void text_start_w(uint8_t data);
27 	uint8_t chargen_start_r();
28 	void chargen_start_w(uint8_t data);
29 	uint8_t video_start_r();
30 	void video_start_w(uint8_t data);
31 	uint8_t color_start_r();
32 	void color_start_w(uint8_t data);
33 	uint8_t color_r(offs_t offset);
34 	void color_w(offs_t offset, uint8_t data);
35 
36 	void pk8000_palette(palette_device &palette) const;
37 	uint32_t video_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *videomem);
38 
39 	uint8_t m_text_start;
40 	uint8_t m_chargen_start;
41 	uint8_t m_video_start;
42 	uint8_t m_color_start;
43 
44 	uint8_t m_video_mode;
45 	uint8_t m_video_color;
46 	uint8_t m_color[32];
47 	uint8_t m_video_enable;
48 	required_device<cpu_device> m_maincpu;
49 };
50 
51 #endif // MAME_INCLUDES_PK8000_H
52