OSDN Git Service

[VM][WIP] Use namespace to devices per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / hc20 / hc20.h
index 8471ed7..c0a4814 100644 (file)
@@ -45,6 +45,7 @@
 
 #include "../../common.h"
 #include "../../fileio.h"
+#include "../vm_template.h"
 
 #ifdef USE_SOUND_VOLUME
 static const _TCHAR *sound_device_caption[] = {
@@ -67,16 +68,17 @@ class UPD765A;
 class Z80;
 class Z80SIO;
 
-class MEMORY;
-
-class VM
+namespace HC20 {
+       class MEMORY;
+}
+class VM : public VM_TEMPLATE
 {
 protected:
-       EMU* emu;
-       csp_state_utils *state_entry;
+       //EMU* emu;
+       //csp_state_utils *state_entry;
        
        // devices
-       EVENT* event;
+       //EVENT* event;
        
        BEEP* beep;
        HD146818P* rtc;
@@ -89,7 +91,7 @@ protected:
        Z80* cpu_tf20;
        Z80SIO* sio_tf20;
        
-       MEMORY* memory;
+       HC20::MEMORY* memory;
        
 public:
        // ----------------------------------------
@@ -142,9 +144,7 @@ public:
        bool is_frame_skippable();
        
        void update_config();
-       void decl_state();
-       void save_state(FILEIO* state_fio);
-       bool load_state(FILEIO* state_fio);
+       bool process_state(FILEIO* state_fio, bool loading);
        
        // ----------------------------------------
        // for each device
@@ -152,9 +152,9 @@ public:
        
        // devices
        DEVICE* get_device(int id);
-       DEVICE* dummy;
-       DEVICE* first_device;
-       DEVICE* last_device;
+       //DEVICE* dummy;
+       //DEVICE* first_device;
+       //DEVICE* last_device;
 };
 
 #endif