OSDN Git Service

[General][CMake] Merge upstream 2016-02-26.
[csp-qt/common_source_project-fm7.git] / source / src / vm / mycomz80a / mycomz80a.h
index bc65d15..c11cc4a 100644 (file)
 #define FRAMES_PER_SEC         60.58
 #define LINES_PER_FRAME        260
 #define CHARS_PER_LINE         64
-#define HD46505_HORIZ_FREQ     15750
+#define HD46505_CHAR_CLOCK     1008000
 #define CPU_CLOCKS             2500000
 #define SCREEN_WIDTH           640
 #define SCREEN_HEIGHT          400
+#define WINDOW_HEIGHT_ASPECT   480
 #define SUPPORT_VARIABLE_TIMING
 #define HAS_MSM5832
 
 #define USE_AUTO_KEY_CAPS
 #define USE_CRT_FILTER
 #define USE_SCANLINE
+#define USE_SOUND_VOLUME       2
 #define USE_DEBUGGER
 #define USE_STATE
 
 #include "../../common.h"
 #include "../../fileio.h"
 
+#ifdef USE_SOUND_VOLUME
+static const _TCHAR *sound_device_caption[] = {
+       _T("PSG"), _T("CMT"),
+};
+#endif
+
 class EMU;
 class DEVICE;
 class EVENT;
@@ -93,7 +101,7 @@ public:
        // drive virtual machine
        void reset();
        void run();
-       double frame_rate();
+       double get_frame_rate();
        
 #ifdef USE_DEBUGGER
        // debugger
@@ -106,7 +114,10 @@ public:
        // sound generation
        void initialize_sound(int rate, int samples);
        uint16* create_sound(int* extra_frames);
-       int sound_buffer_ptr();
+       int get_sound_buffer_ptr();
+#ifdef USE_SOUND_VOLUME
+       void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
+#endif
        
        // notify key
        void key_down(int code, bool repeat);
@@ -116,8 +127,11 @@ public:
        void play_tape(const _TCHAR* file_path);
        void rec_tape(const _TCHAR* file_path);
        void close_tape();
-       bool tape_inserted();
-       bool now_skip();
+       bool is_tape_inserted();
+       bool is_tape_playing();
+       bool is_tape_recording();
+       int get_tape_position();
+       bool is_frame_skippable();
        
        void update_config();
        void save_state(FILEIO* state_fio);