OSDN Git Service

[VM][STATE] Use namespace {VMNAME} to separate per VMs.
[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 namespace PC8201 {
21
22 class LCD : public DEVICE
23 {
24 private:
25         struct {
26                 uint8_t vram[4][50];
27                 int updown, disp, spg, page, ofs, ofs2;
28         } seg[10];
29         uint16_t sel;
30         
31         uint8_t screen[64][250];
32         
33 public:
34         LCD(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
35         {
36                 set_device_name(_T("LCD"));
37         }
38         ~LCD() {}
39         
40         // common functions
41         void initialize();
42         void write_io8(uint32_t addr, uint32_t data);
43         uint32_t read_io8(uint32_t addr);
44         void write_signal(int id, uint32_t data, uint32_t mask);
45         bool process_state(FILEIO* state_fio, bool loading);
46         
47         // unique function
48         void draw_screen();
49 };
50
51 }
52 #endif