OSDN Git Service

[VM][I286] Save cpustate without StateBuffer().
[csp-qt/common_source_project-fm7.git] / source / src / vm / jr800 / io.h
1 /*
2         National JR-800 Emulator 'eJR-800'
3
4         Author : Takeda.Toshiya
5         Origin : PockEmul
6         Date   : 2017.03.13-
7
8         [ memory mapped i/o ]
9 */
10
11 #ifndef _JR800_IO_H_
12 #define _JR800_IO_H_
13
14 #include "../vm.h"
15 #include "../../emu.h"
16 #include "../device.h"
17
18 class HD44102;
19
20 class JR800_IO : public DEVICE
21 {
22 private:
23         HD44102 *d_lcd[8];
24         
25 public:
26         JR800_IO(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
27         {
28                 set_device_name(_T("Memory Mapped I/O"));
29         }
30         ~JR800_IO() {}
31         
32         // common functions
33         void write_memory_mapped_io8(uint32_t addr, uint32_t data);
34         uint32_t read_memory_mapped_io8(uint32_t addr);
35         bool process_state(FILEIO* state_fio, bool loading);
36         
37         // unique function
38         void set_context_lcd(int i, HD44102 *device)
39         {
40                 d_lcd[i] = device;
41         }
42 };
43
44 #endif
45