OSDN Git Service

[VM] .
[csp-qt/common_source_project-fm7.git] / source / src / vm / fmr30 / memory.h
index 1119187..0337d8f 100644 (file)
@@ -7,8 +7,8 @@
        [ memory ]
 */
 
-#ifndef _MEMORY_H_
-#define _MEMORY_H_
+#ifndef _FMR30_MEMORY_H_
+#define _FMR30_MEMORY_H_
 
 #include "../vm.h"
 #include "../../emu.h"
@@ -17,6 +17,8 @@
 #define SIG_MEMORY_DISP                0
 #define SIG_MEMORY_VSYNC       1
 
+namespace FMR30 {
+
 class MEMORY : public DEVICE
 {
 private:
@@ -54,7 +56,7 @@ private:
        void draw_cg();
        
 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"));
        }
@@ -68,8 +70,7 @@ public:
        void write_io8(uint32_t addr, uint32_t data);
        uint32_t read_io8(uint32_t addr);
        void event_frame();
-       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)
@@ -95,5 +96,6 @@ public:
        void draw_screen();
 };
 
+}
 #endif