OSDN Git Service

[VM][WIP] Use namespace to devices per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz80k / memory.h
index 3b88381..75e080d 100644 (file)
@@ -12,8 +12,8 @@
        [ memory ]
 */
 
-#ifndef _MEMORY_H_
-#define _MEMORY_H_
+#ifndef _MZ80A_MEMORY_H_
+#define _MZ80A_MEMORY_H_
 
 #include "../vm.h"
 #include "../../emu.h"
@@ -25,6 +25,8 @@
 #define SIG_MEMORY_FDC_DRQ     2
 #endif
 
+namespace MZ80 {
+
 class MEMORY : public DEVICE
 {
 private:
@@ -81,7 +83,7 @@ private:
        uint8_t pcg_ctrl;
        
 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"));
        }
@@ -98,9 +100,7 @@ public:
 #if defined(_MZ80K)
        void update_config();
 #endif
-       void decl_state();
-       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_ctc(DEVICE* device)
@@ -114,5 +114,6 @@ public:
        void draw_screen();
 };
 
+}
 #endif