OSDN Git Service

[VM][FMTOWNS][MEMORY] Fix setup around memory banks by I/O 0404h and 0480h.
[csp-qt/common_source_project-fm7.git] / source / src / config.h
index 903f10e..4d3d592 100644 (file)
@@ -49,7 +49,7 @@ enum {
        CONFIG_HOST_KEYBOARD_TYPE_AT_MISC = 0x00ff0000,
        CONFIG_HOST_KEYBOARD_TYPE_PC98    = 0x00980000,
        CONFIG_HOST_KEYBOARD_TYPE_MAC     = 0x00fe0000,
-};     
+};
 
 enum {
        CONFIG_HOST_KEYBOARD_AT_106JP    = CONFIG_HOST_KEYBOARD_TYPE_AT_JP + 106,
@@ -63,7 +63,7 @@ enum {
        CONFIG_HOST_KEYBOARD_MAC_US      = CONFIG_HOST_KEYBOARD_TYPE_MAC + 0,
        CONFIG_HOST_KEYBOARD_MAC_JP      = CONFIG_HOST_KEYBOARD_TYPE_MAC + 1,
        CONFIG_HOST_KEYBOARD_MAC_ANOTHER = CONFIG_HOST_KEYBOARD_TYPE_MAC + 0xff,
-};     
+};
 
 enum {
        CONFIG_CURSOR_AS_CURSOR = 0,
@@ -109,7 +109,7 @@ bool process_config_state(void *f, bool loading);
  * Qt:
  *  To reduce time to build, compiling common blocks of GUI at once.
  *  So, you should not separate items with #ifdef.
- */ 
+ */
 typedef struct {
        // control
        #if defined(USE_FIXED_CONFIG) || defined(USE_BOOT_MODE)
@@ -131,10 +131,10 @@ typedef struct {
                int keyboard_type;
        #endif
        #if defined(USE_FIXED_CONFIG) || defined(USE_MOUSE_TYPE)
-               int mouse_type;
+               int mouse_type; /*!< Emulated type of mouse by VM */
        #endif
        #if defined(USE_FIXED_CONFIG) || defined(USE_JOYSTICK_TYPE)
-               int joystick_type;
+               int joystick_type; /*!< Emulated type of joystick by VM */
        #endif
        #if defined(USE_FIXED_CONFIG) || defined(USE_SOUND_TYPE)
                int sound_type;
@@ -144,10 +144,14 @@ typedef struct {
        #endif
        #if defined(USE_FIXED_CONFIG) || defined(USE_SCANLINE)
                bool scan_line;
+               bool scan_line_auto;
        #endif
        #if defined(USE_FIXED_CONFIG) || defined(USE_PRINTER_TYPE)
                int printer_type;
        #endif
+       #if defined(USE_FIXED_CONFIG) || defined(USE_SERIAL_TYPE)
+               int serial_type;
+       #endif
        #if defined(USE_SHARED_DLL) || defined(USE_FLOPPY_DISK)
                bool correct_disk_timing[/*USE_FLOPPY_DISK_TMP*/16];
                bool ignore_disk_crc[/*USE_FLOPPY_DISK_TMP*/16];
@@ -162,8 +166,8 @@ typedef struct {
        #endif
        bool compress_state;
        int cpu_power;
-       bool full_speed;
-       
+       bool full_speed, drive_vm_in_opecode;
+
        // recent files
        #if defined(USE_SHARED_DLL) || defined(USE_CART)
                _TCHAR initial_cart_dir[_MAX_PATH];
@@ -211,12 +215,13 @@ typedef struct {
        //      #if defined(USE_FIXED_CONFIG) || defined(USE_SCREEN_ROTATE)
                int rotate_type;
        //      #endif
-       
+
        // filter
        #if defined(USE_FIXED_CONFIG) || defined(USE_SCREEN_FILTER)
                int filter_type;
        #endif
 
+       uint32_t mouse_sensitivity; /*!< SENSITIVITY of MOUSE , Value * 2^12, limit is 2^16-1 */
        // NOTE: Belows contain STAGED CONFIGURATION.
 #if defined(_USE_QT)
        bool use_separate_thread_draw;
@@ -227,15 +232,15 @@ typedef struct {
        bool use_opengl_filters;
        bool focus_with_click;
        int opengl_filter_num;
-       
+
        // STAGED CONFIG VALUES
        bool swap_kanji_pause;
        int  cursor_as_ten_key;
        bool numpad_enter_as_fullkey;
        int host_keyboard_type;
-       
+
        /*
-        * TYPE : 
+        * TYPE :
         *    0 : OpenGL/Main Profile
         *    1 : OpenGL/Core Profile
         *    2 : OpenGL ES
@@ -244,7 +249,7 @@ typedef struct {
         *   24 : DirectDraw (Will not implement)
         *   25 : SDLFB(Will not implement)
      *   32 : DirectX(Will not implement)
-        */ 
+        */
        int render_platform;
        int render_major_version;
        int render_minor_version;
@@ -255,16 +260,16 @@ typedef struct {
        int debugwindow_height;
        int logwindow_width;
        int logwindow_height;
-       
-#endif 
-       
+
+#endif
+
        // sound
        int sound_frequency;
        int sound_latency;
        bool sound_strict_rendering;
-       int sound_device_num;
-       
-#if defined(_USE_QT)   
+       _TCHAR sound_device_name[1024];
+
+#if defined(_USE_QT)
        int general_sound_level;
 #endif
 #if defined(USE_FIXED_CONFIG) || defined(USE_FLOPPY_DISK)
@@ -272,7 +277,8 @@ typedef struct {
 #endif
 #if defined(USE_FIXED_CONFIG) || defined(USE_TAPE)
        bool sound_noise_cmt;
-       bool sound_play_tape;
+       bool sound_tape_signal;
+       bool sound_tape_voice;
 #endif
 #if defined(USE_FIXED_CONFIG) || defined(USE_SOUND_VOLUME)
        int sound_volume_l[MAX_VOLUME_TMP];
@@ -289,6 +295,9 @@ typedef struct {
                int joy_to_key_type; // Note: ADD "1235" as type 3.20181218 K.O
                bool joy_to_key_numpad5;
                int joy_to_key_buttons[16];
+               _TCHAR assigned_joystick_name[16][256];
+               int assigned_joystick_num[16];
+               bool emulated_joystick_dpad[4];
        #endif
        #if defined(USE_FIXED_CONFIG) || defined(USE_AUTO_KEY)
                bool romaji_to_kana;
@@ -298,14 +307,16 @@ typedef struct {
 #if defined(USE_FIXED_CONFIG) || defined(USE_PRINTER)
        _TCHAR printer_dll_path[_MAX_PATH];
 #endif
-       // debug 
-       bool special_debug_fdc; 
+       // debug
+       bool special_debug_fdc;
        bool print_statistics;
 
+       bool use_telnet;
 #if defined(_WIN32) && !defined(_USE_QT)
        bool use_direct_input;
        bool disable_dwm;
 
+       bool use_d2d1;
        bool use_d3d9;
        bool wait_vsync;
        bool use_dinput;
@@ -313,13 +324,12 @@ typedef struct {
 #endif
 
 #ifdef _USE_QT
-       _TCHAR assigned_joystick_name[16][256];
 
        int video_width;
        int video_height;
        int video_codec_type;
        int audio_codec_type;
-       
+
        int video_h264_bitrate;
        int video_h264_bframes;
        int video_h264_b_adapt;
@@ -331,7 +341,7 @@ typedef struct {
        int video_mpeg4_bframes;
        int video_mpeg4_minq;
        int video_mpeg4_maxq;
-       
+
        int video_threads;
        int audio_bitrate;
        int video_frame_rate; // FPS * 1000.0
@@ -344,12 +354,16 @@ typedef struct {
        bool state_log_to_console;
        bool state_log_to_syslog;
        bool state_log_to_recording;
-       
+
        int rendering_type;
 
        int virtual_media_position; // -1 = none, 1, 2, 3, 4 = LRUD
 #endif
-       
+       // 20210728 K.O
+       // Belows are machine features config (without DIPSW. I.E. joystick ports
+#if defined(USE_FIXED_CONFIG) || defined(USE_MACHINE_FEATURES)
+       uint32_t machine_features[32];
+#endif
 } config_t;
 
 extern config_t DLL_PREFIX_I config;
@@ -359,4 +373,3 @@ extern config_t DLL_PREFIX_I config;
 #endif
 
 #endif
-