OSDN Git Service

[General][Qt] Merge upstream, datarecorder with sound.
[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 vram[4][50];
25                 int updown, disp, spg, page, ofs, ofs2;
26         } seg[10];
27         uint16 sel;
28         
29         uint8 screen[64][250];
30         
31 public:
32         LCD(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
33         ~LCD() {}
34         
35         // common functions
36         void initialize();
37         void write_io8(uint32 addr, uint32 data);
38         uint32 read_io8(uint32 addr);
39         void write_signal(int id, uint32 data, uint32 mask);
40         void save_state(FILEIO* state_fio);
41         bool load_state(FILEIO* state_fio);
42         
43         // unique function
44         void draw_screen();
45 };
46
47 #endif