OSDN Git Service

[VM][DEVICE] Use __FASTCALL with interfaces, read_*() ,write_*(), fetch_op() and...
[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 namespace JR800 {
21         
22 class IO : public DEVICE
23 {
24 private:
25         HD44102 *d_lcd[8];
26         
27 public:
28         IO(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
29         {
30                 set_device_name(_T("Memory Mapped I/O"));
31         }
32         ~IO() {}
33         
34         // common functions
35         void __FASTCALL write_memory_mapped_io8(uint32_t addr, uint32_t data);
36         uint32_t __FASTCALL read_memory_mapped_io8(uint32_t addr);
37         bool process_state(FILEIO* state_fio, bool loading);
38         
39         // unique function
40         void set_context_lcd(int i, HD44102 *device)
41         {
42                 d_lcd[i] = device;
43         }
44 };
45
46 }
47 #endif
48