OSDN Git Service

[VM][WIP] Use namespace to devices per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz700 / memory.h
index 2d4f4f5..5b89f0b 100644 (file)
@@ -9,8 +9,8 @@
        [ memory ]
 */
 
-#ifndef _MEMORY_H_
-#define _MEMORY_H_
+#ifndef _MZ700_MEMORY_H_
+#define _MZ700_MEMORY_H_
 
 #include "../vm.h"
 #include "../../emu.h"
@@ -20,6 +20,8 @@
 class DISPLAY;
 #endif
 
+namespace MZ700 {
+       
 class MEMORY : public DEVICE
 {
 private:
@@ -114,7 +116,7 @@ private:
 #endif
        
 public:
-       MEMORY(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
+       MEMORY(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
        {
                set_device_name(_T("Memory Bus"));
        }
@@ -136,8 +138,7 @@ public:
 #if defined(_MZ800)
        uint32_t read_io8(uint32_t addr);
 #endif
-       void save_state(FILEIO* state_fio);
-       bool load_state(FILEIO* state_fio);
+       bool process_state(FILEIO* state_fio, bool loading);
        
        // unique functions
        void set_context_cpu(DEVICE* device)
@@ -161,5 +162,6 @@ public:
        void draw_screen();
 };
 
+}
 #endif