OSDN Git Service

[VM][WIP] Use namespace to devices per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz2500 / mz1r12.h
index e8a563d..d29429c 100644 (file)
@@ -1,40 +1,45 @@
-/*\r
-       SHARP MZ-80B Emulator 'EmuZ-80B'\r
-       SHARP MZ-2200 Emulator 'EmuZ-2200'\r
-\r
-       Author : Takeda.Toshiya\r
-       Date   : 2013.03.17-\r
-\r
-       [ MZ-1R12 (32KB SRAM) ]\r
-*/\r
-\r
-#ifndef _MZ1R12_H_\r
-#define _MZ1R12_H_\r
-\r
-#include "../vm.h"\r
-#include "../../emu.h"\r
-#include "../device.h"\r
-\r
-class MZ1R12 : public DEVICE\r
-{\r
-private:\r
-       uint8 sram[0x8000];\r
-       bool read_only;\r
-       uint16 address;\r
-       uint32 crc32;\r
-       \r
-public:\r
-       MZ1R12(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}\r
-       ~MZ1R12() {}\r
-       \r
-       // common functions\r
-       void initialize();\r
-       void release();\r
-       void write_io8(uint32 addr, uint32 data);\r
-       uint32 read_io8(uint32 addr);\r
-       void save_state(FILEIO* state_fio);\r
-       bool load_state(FILEIO* state_fio);\r
-};\r
-\r
-#endif\r
-\r
+/*
+       SHARP MZ-80B Emulator 'EmuZ-80B'
+       SHARP MZ-2200 Emulator 'EmuZ-2200'
+
+       Author : Takeda.Toshiya
+       Date   : 2013.03.17-
+
+       [ MZ-1R12 (32KB SRAM) ]
+*/
+
+#ifndef _MZ1R12_H_
+#define _MZ1R12_H_
+
+#include "../vm.h"
+#include "../../emu.h"
+#include "../device.h"
+
+namespace MZ2500 {
+
+class MZ1R12 : public DEVICE
+{
+private:
+       uint8_t sram[0x8000];
+       bool read_only;
+       uint16_t address;
+       uint32_t crc32;
+       
+public:
+       MZ1R12(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
+       {
+               set_device_name(_T("MZ-1R12 (32KB SRAM)"));
+       }
+       ~MZ1R12() {}
+       
+       // common functions
+       void initialize();
+       void release();
+       void write_io8(uint32_t addr, uint32_t data);
+       uint32_t read_io8(uint32_t addr);
+       bool process_state(FILEIO* state_fio, bool loading);
+};
+
+}
+#endif
+