OSDN Git Service

[VM][I286] Save cpustate without StateBuffer().
[csp-qt/common_source_project-fm7.git] / source / src / vm / hc80 / hc80.h
index 20c1231..159cf6b 100644 (file)
 #define USE_DEVICE_TYPE                3
 // Nonintelligent ram disk
 #define DEVICE_TYPE_DEFAULT    2
-#define USE_FD1
-#define USE_FD2
-#define USE_FD3
-#define USE_FD4
+#define USE_FLOPPY_DISK                4
 #define NOTIFY_KEY_DOWN
 #define USE_ALT_F10_KEY
 #define USE_AUTO_KEY           6
 #define USE_AUTO_KEY_RELEASE   10
-#define USE_ACCESS_LAMP
-#define USE_SOUND_FILES                2
-//#define USE_SOUND_FILES_FDD
-//#if defined(USE_SOUND_FILES)
-//#define USE_SOUND_VOLUME     2
-//#else
 #define USE_SOUND_VOLUME       1
-//#endif
 #define USE_DEBUGGER
 #define USE_STATE
+#define USE_CPU_Z80
 
 #include "../../common.h"
 #include "../../fileio.h"
+#include "../vm_template.h"
 
 #ifdef USE_SOUND_VOLUME
 static const _TCHAR *sound_device_caption[] = {
        _T("Beep"),
-#if defined(USE_SOUND_FILES)
-       //_T("FDD SEEK"),
-#endif
 };
 #endif
 
+class csp_state_utils;
 class EMU;
 class DEVICE;
 class EVENT;
@@ -66,24 +56,25 @@ class I8251;
 class PTF20;
 class Z80;
 
-class IO;
-class MEMORY;
+class HC80_IO;
+class HC80_MEMORY;
 
-class VM
+class VM : public VM_TEMPLATE
 {
 protected:
-       EMU* emu;
+       //EMU* emu;
+       //csp_state_utils *state_entry;
        
        // devices
-       EVENT* event;
+       //EVENT* event;
        
        BEEP* beep;
        I8251* sio;
        PTF20* tf20;
        Z80* cpu;
        
-       IO* io;
-       MEMORY* memory;
+       HC80_IO* io;
+       HC80_MEMORY* memory;
        
 public:
        // ----------------------------------------
@@ -109,7 +100,6 @@ public:
        
        // draw screen
        void draw_screen();
-       uint32_t get_access_lamp_status();
        
        // sound generation
        void initialize_sound(int rate, int samples);
@@ -129,11 +119,11 @@ public:
        bool is_floppy_disk_inserted(int drv);
        void is_floppy_disk_protected(int drv, bool value);
        bool is_floppy_disk_protected(int drv);
+       uint32_t is_floppy_disk_accessed();
        bool is_frame_skippable();
        
        void update_config();
-       void save_state(FILEIO* state_fio);
-       bool load_state(FILEIO* state_fio);
+       bool process_state(FILEIO* state_fio, bool loading);
        
        // ----------------------------------------
        // for each device
@@ -141,9 +131,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