OSDN Git Service

[Qt][OpenGL][WIP] GL4.3: Implementing texture buffer with mapping.
[csp-qt/common_source_project-fm7.git] / source / src / vm / upd16434.h
1 /*
2         Skelton for retropc emulator
3
4         Origin : PockEmul
5         Author : Takeda.Toshiya
6         Date   : 2016.03.18-
7
8         [ uPD16434 ]
9 */
10
11 #ifndef _UPD16434_H_
12 #define _UPD16434_H_
13
14 //#include "vm.h"
15 //#include "../emu.h"
16 #include "device.h"
17
18 class VM;
19 class EMU;
20 class UPD16434 : public DEVICE
21 {
22 private:
23         uint8_t pointer;
24         uint8_t mode;
25         uint8_t imem[0x80];
26         
27         void draw_char(uint8_t c, bool right);
28         void cmd_mode(uint8_t cmd);
29         void cmd_bset(uint8_t cmd, bool set);
30         void update_pointer(uint8_t mode);
31         
32 public:
33         UPD16434(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {
34                 set_device_name(_T("uPD16434 LCD Controller"));
35         }
36         ~UPD16434() {}
37         
38         // common functions
39         void initialize();
40         void reset();
41         void decl_state();
42         void save_state(FILEIO* state_fio);
43         bool load_state(FILEIO* state_fio);
44         
45         // unique functions
46         void data(uint8_t data);
47         void instruction(uint8_t cmd);
48         void draw(int xoffset);
49 };
50
51 #endif