OSDN Git Service

[Qt][GL][Display] Add NTSC-TV rendering.Still not enabled any VMs.
[csp-qt/common_source_project-fm7.git] / source / src / config.h
1 /*
2         Skelton for retropc emulator
3
4         Author : Takeda.Toshiya
5         Date   : 2006.08.18 -
6
7         [ config ]
8 */
9
10 #ifndef _CONFIG_H_
11 #define _CONFIG_H_
12
13 #include "vm/vm.h"
14 #include "fileio.h"
15 #if defined(_USE_QT)
16 #include "qt/gui/csp_logger.h"
17 #endif
18
19 enum {
20         CONFIG_RENDER_TYPE_STD = 0,
21         CONFIG_RENDER_TYPE_TV,
22         CONFIG_RENDER_TYPE_END
23 };
24
25 #define MAX_HISTORY     8
26
27 #if defined(USE_CART2)
28 #define MAX_CART        2
29 #elif defined(USE_CART1)
30 #define MAX_CART        1
31 #endif
32
33 #if defined(USE_FD8)
34 #define MAX_FD          8
35 #elif defined(USE_FD7)
36 #define MAX_FD          7
37 #elif defined(USE_FD6)
38 #define MAX_FD          6
39 #elif defined(USE_FD5)
40 #define MAX_FD          5
41 #elif defined(USE_FD4)
42 #define MAX_FD          4
43 #elif defined(USE_FD3)
44 #define MAX_FD          3
45 #elif defined(USE_FD2)
46 #define MAX_FD          2
47 #elif defined(USE_FD1)
48 #define MAX_FD          1
49 #endif
50
51 #if defined(USE_QD2)
52 #define MAX_QD          2
53 #elif defined(USE_QD1)
54 #define MAX_QD          1
55 #endif
56
57 #if defined(USE_BINARY_FILE2)
58 #define MAX_BINARY      2
59 #elif defined(USE_BINARY_FILE1)
60 #define MAX_BINARY      1
61 #endif
62
63 void DLL_PREFIX initialize_config();
64 void DLL_PREFIX load_config(const _TCHAR* config_path);
65 void DLL_PREFIX save_config(const _TCHAR* config_path);
66 void DLL_PREFIX save_config_state(void *f);
67 bool DLL_PREFIX load_config_state(void *f);
68
69
70 /*
71  * 20160407 Ohta:
72  * Qt:
73  *  To reduce time to build, compiling common blocks of GUI at once.
74  *  So, you should not separate items with #ifdef.
75  */ 
76 typedef struct {
77         // control
78         int boot_mode;
79         int cpu_type;
80         int cpu_power;
81         uint32_t dipswitch;
82         int device_type;
83         int drive_type;
84         bool correct_disk_timing[16];
85         bool ignore_disk_crc[16];
86         bool tape_sound;
87         bool wave_shaper;
88         bool direct_load_mzt;
89         bool baud_high;
90         // recent files
91         _TCHAR initial_cart_dir[_MAX_PATH];
92         _TCHAR recent_cart_path[8][MAX_HISTORY][_MAX_PATH];
93         _TCHAR initial_floppy_disk_dir[_MAX_PATH];
94         _TCHAR recent_floppy_disk_path[16][MAX_HISTORY][_MAX_PATH];
95         _TCHAR initial_quick_disk_dir[_MAX_PATH];
96         _TCHAR recent_quick_disk_path[8][MAX_HISTORY][_MAX_PATH];
97         _TCHAR initial_tape_dir[_MAX_PATH];
98         _TCHAR recent_tape_path[MAX_HISTORY][_MAX_PATH];
99         _TCHAR initial_compact_disc_dir[_MAX_PATH];
100         _TCHAR recent_compact_disc_path[MAX_HISTORY][_MAX_PATH];
101         _TCHAR initial_laser_disc_dir[_MAX_PATH];
102         _TCHAR recent_laser_disc_path[MAX_HISTORY][_MAX_PATH];
103         _TCHAR initial_binary_dir[_MAX_PATH];
104         _TCHAR recent_binary_path[8][MAX_HISTORY][_MAX_PATH];
105         _TCHAR initial_bubble_casette_dir[_MAX_PATH];
106         _TCHAR recent_bubble_casette_path[16][MAX_HISTORY][_MAX_PATH];
107         // screen
108         int window_mode;
109 #ifdef _WIN32
110         bool use_d3d9;
111         bool wait_vsync;
112 #endif
113         int window_stretch_type;
114         int fullscreen_stretch_type;
115         int monitor_type;
116         bool crt_filter;
117         bool scan_line;
118         int rotate_type;
119 #ifdef _USE_QT
120         bool use_opengl_scanline;
121         bool opengl_scanline_vert;
122         bool opengl_scanline_horiz;
123         bool use_opengl_filters;
124         int opengl_filter_num;
125
126         bool swap_kanji_pause;
127 #endif  
128         
129         // sound
130         int sound_frequency;
131         int sound_latency;
132         
133         int general_sound_level;
134         int sound_device_type;
135         int sound_volume_l[32];
136         int sound_volume_r[32];
137         _TCHAR fmgen_dll_path[_MAX_PATH];
138         
139         // input
140 #ifdef _WIN32
141         bool use_direct_input;
142         bool disable_dwm;
143 #endif
144         int keyboard_type;
145         int joy_buttons[4][16];
146 #ifdef _USE_QT
147         _TCHAR assigned_joystick_name[16][256];
148
149         int video_width;
150         int video_height;
151         int video_codec_type;
152         int audio_codec_type;
153         
154         int video_h264_bitrate;
155         int video_h264_bframes;
156         int video_h264_b_adapt;
157         int video_h264_minq;
158         int video_h264_maxq;
159         int video_h264_subme;
160
161         int video_mpeg4_bitrate;
162         int video_mpeg4_bframes;
163         int video_mpeg4_minq;
164         int video_mpeg4_maxq;
165         
166         int video_threads;
167         int audio_bitrate;
168         int video_frame_rate; // FPS * 1000.0
169 #endif  
170         // printer
171         int printer_device_type;
172         _TCHAR printer_dll_path[_MAX_PATH];
173
174         // General
175 #ifdef _USE_QT
176         bool log_to_syslog;
177         bool log_to_console;
178         bool dev_log_to_syslog[CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1][8];
179         bool dev_log_to_console[CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1][8];
180         bool dev_log_recording[CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1][8];
181
182         int sound_fdd;
183         int sound_relay;
184         int sound_buttons;
185
186         bool roma_kana_conversion;
187         int rendering_type;
188 #endif
189 } config_t;
190
191 extern config_t config;
192
193 #if defined(_USE_AGAR) || defined(_USE_QT)
194 # include <string>
195 #endif
196
197 #endif
198