OSDN Git Service

[General] Merge Updtream 2017-03-15 . Still not build all of VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / jr800 / io.h
diff --git a/source/src/vm/jr800/io.h b/source/src/vm/jr800/io.h
new file mode 100644 (file)
index 0000000..d64a29a
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+       National JR-800 Emulator 'eJR-800'
+
+       Author : Takeda.Toshiya
+       Origin : PockEmul
+       Date   : 2017.03.13-
+
+       [ memory mapped i/o ]
+*/
+
+#ifndef _IO_H_
+#define _IO_H_
+
+#include "../vm.h"
+#include "../../emu.h"
+#include "../device.h"
+
+class HD44102;
+
+class IO : public DEVICE
+{
+private:
+       HD44102 *d_lcd[8];
+       
+public:
+       IO(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
+       {
+               set_device_name(_T("Memory Mapped I/O"));
+       }
+       ~IO() {}
+       
+       // common functions
+       void write_memory_mapped_io8(uint32_t addr, uint32_t data);
+       uint32_t read_memory_mapped_io8(uint32_t addr);
+       void save_state(FILEIO* state_fio);
+       bool load_state(FILEIO* state_fio);
+       
+       // unique function
+       void set_context_lcd(int i, HD44102 *device)
+       {
+               d_lcd[i] = device;
+       }
+};
+
+#endif
+