OSDN Git Service

[VM][STATE][WIP] .
[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_TEMPLATE* 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         bool process_state(FILEIO* state_fio, bool loading);
42         
43         // unique functions
44         void data(uint8_t data);
45         void instruction(uint8_t cmd);
46         void draw(int xoffset);
47 };
48
49 #endif