OSDN Git Service

d7e2fa870b866355254c8ad4c9ff8a444350c850
[csp-qt/common_source_project-fm7.git] / source / src / vm / pc8201 / lcd.h
1 /*
2         NEC PC-8201 Emulator 'ePC-8201'
3
4         Author : Takeda.Toshiya
5         Date   : 2009.04.01-
6
7         [ lcd ]
8 */
9
10 #ifndef _LCD_H_
11 #define _LCD_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 #define SIG_LCD_CHIPSEL_L       0
18 #define SIG_LCD_CHIPSEL_H       1
19
20 class LCD : public DEVICE
21 {
22 private:
23         struct {
24                 uint8_t vram[4][50];
25                 int updown, disp, spg, page, ofs, ofs2;
26         } seg[10];
27         uint16_t sel;
28         
29         uint8_t screen[64][250];
30         
31 public:
32         LCD(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
33         {
34                 set_device_name(_T("LCD"));
35         }
36         ~LCD() {}
37         
38         // common functions
39         void initialize();
40         void write_io8(uint32_t addr, uint32_t data);
41         uint32_t read_io8(uint32_t addr);
42         void write_signal(int id, uint32_t data, uint32_t mask);
43         bool process_state(FILEIO* state_fio, bool loading);
44         
45         // unique function
46         void draw_screen();
47 };
48
49 #endif