OSDN Git Service

[DOC] For release 2017-01-24.
[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 UPD16434 : public DEVICE
19 {
20 private:
21         uint8_t pointer;
22         uint8_t mode;
23         uint8_t imem[0x80];
24         
25         void draw_char(uint8_t c, bool right);
26         void cmd_mode(uint8_t cmd);
27         void cmd_bset(uint8_t cmd, bool set);
28         void update_pointer(uint8_t mode);
29         
30 public:
31         UPD16434(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {
32                 set_device_name(_T("uPD16434 LCD CONTROLLER"));
33         }
34         ~UPD16434() {}
35         
36         // common functions
37         void reset();
38         void save_state(FILEIO* state_fio);
39         bool load_state(FILEIO* state_fio);
40         
41         // unique functions
42         void data(uint8_t data);
43         void instruction(uint8_t cmd);
44         void draw(int xoffset);
45 };
46
47 #endif