OSDN Git Service

[VM][State] Apply new state framework to some VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / ex80 / ex80.h
index e209ca9..ae33ada 100644 (file)
@@ -27,7 +27,7 @@
 // device informations for win32
 #define ONE_BOARD_MICRO_COMPUTER
 #define MAX_BUTTONS            25
-#define MAX_DRAW_RANGES                9
+//#define MAX_DRAW_RANGES      9
 /*
 SW1    ON = STEP / OFF = AUTO
 SW2    ON = CHAR / OFF = BIT
@@ -38,19 +38,22 @@ SW3-1/2     ON ,ON  = 8000H-81FFH
 */
 #define USE_DIPSWITCH
 #define DIPSWITCH_DEFAULT      0x0e
-#define USE_TAPE
+#define USE_TAPE               1
 #define TAPE_BINARY_ONLY
-#define USE_BINARY_FILE1
+#define USE_BINARY_FILE                1
 #define USE_ALT_F10_KEY
 #define USE_AUTO_KEY           5
 #define USE_AUTO_KEY_RELEASE   6
 #define USE_AUTO_KEY_NO_CAPS
+#define USE_MONITOR_TYPE       2
 #define USE_SOUND_VOLUME       1
 #define USE_DEBUGGER
 #define USE_STATE
+#define USE_CPU_I8080
 
 #include "../../common.h"
 #include "../../fileio.h"
+#include "../vm_template.h"
 
 #ifdef USE_SOUND_VOLUME
 static const _TCHAR *sound_device_caption[] = {
@@ -108,6 +111,7 @@ const struct {
        {8, 8, 8 * 6 * 12, 8 * 2 * 29}, // CRT
 };
 
+//class csp_state_utils;
 class EMU;
 class DEVICE;
 class EVENT;
@@ -123,13 +127,13 @@ class DISPLAY;
 class KEYBOARD;
 class MEMORY;
 
-class VM
+class VM : public VM_TEMPLATE
 {
 protected:
-       EMU* emu;
-       
+       //EMU* emu;
+       //csp_state_utils *state_entry;
        // devices
-       EVENT* event;
+       //EVENT* event;
        
        I8251* sio;
        I8255* pio;
@@ -165,6 +169,7 @@ public:
        
        // draw screen
        void draw_screen();
+       int max_draw_ranges();
        
        // sound generation
        void initialize_sound(int rate, int samples);
@@ -177,15 +182,14 @@ public:
        // user interface
        void load_binary(int drv, const _TCHAR* file_path);
        void save_binary(int drv, const _TCHAR* file_path);
-       void play_tape(const _TCHAR* file_path);
-       void rec_tape(const _TCHAR* file_path);
-       void close_tape();
-       bool is_tape_inserted();
+       void play_tape(int drv, const _TCHAR* file_path);
+       void rec_tape(int drv, const _TCHAR* file_path);
+       void close_tape(int drv);
+       bool is_tape_inserted(int drv);
        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
@@ -193,9 +197,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