OSDN Git Service

[VM][Qt][UI][EMU][WIP] Use EMU_TEMPLATE:: instead of EMU:: . Some VMs are not apply...
[csp-qt/common_source_project-fm7.git] / source / src / vm / ex80 / display.h
1 /*
2         TOSHIBA EX-80 Emulator 'eEX-80'
3
4         Author : Takeda.Toshiya
5         Date   : 2015.12.10-
6
7         [ display ]
8 */
9
10 #ifndef _DISPLAY_H_
11 #define _DISPLAY_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 #define SIG_DISPLAY_DMA         0
18
19 namespace EX80 {
20 class DISPLAY : public DEVICE
21 {
22 private:
23         DEVICE *d_cpu;
24         
25         uint8_t font[0x400];
26         uint8_t screen[8 * 29 * 2][8 * 12];
27         
28         uint8_t *ram;
29         int odd_even;
30         bool dma;
31         
32 public:
33         DISPLAY(VM_TEMPLATE* parent_vm, EMU_TEMPLATE* parent_emu) : DEVICE(parent_vm, parent_emu)
34         {
35                 set_device_name(_T("Display"));
36         }
37         ~DISPLAY() {}
38         
39         // common functions
40         void initialize();
41         void __FASTCALL write_signal(int id, uint32_t data, uint32_t mask);
42         void event_frame();
43         void event_vline(int v, int clock);
44         void event_callback(int event_id, int err);
45         bool process_state(FILEIO* state_fio, bool loading);
46         
47         // unique functions
48         void set_context_cpu(DEVICE* device)
49         {
50                 d_cpu = device;
51         }
52         void set_ram_ptr(uint8_t* ptr)
53         {
54                 ram = ptr;
55         }
56         void draw_screen();
57 };
58 }
59 #endif
60