OSDN Git Service

[VM][Qt][OSD][Genaral] Sync to upstream ; phase 1: Merege upstream 20151217.
[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 #if defined(_USE_QT)
14 #include <sys/param.h>
15
16 #ifndef _MAX_PATH
17  #define _MAX_PATH 2048
18 #endif
19 #endif
20 #include "vm/vm.h"
21 #include "fileio.h"
22
23 // LOG COMMAND
24 #define EMU_LOG_CPU1        0x00000001
25 #define EMU_LOG_CPU2        0x00000002
26 #define EMU_LOG_CPU3        0x00000004
27 #define EMU_LOG_CPU4        0x00000008
28 #define EMU_LOG_FLOPPY      0x00000010
29 #define EMU_LOG_CMT         0x00000020
30 #define EMU_LOG_QD          0x00000040
31 #define EMU_LOG_CART        0x00000080
32 #define EMU_LOG_BINARY      0x00000100
33 #define EMU_LOG_LASERDISC   0x00000200
34 #define EMU_LOG_DISPLAY     0x00001000
35 #define EMU_LOG_SOUND       0x00002000
36 #define EMU_LOG_KEYBOARD    0x00004000
37 #define EMU_LOG_IO          0x00008000
38 #define EMU_LOG_MEMORY      0x00010000
39 #define EMU_LOG_USR1        0x00020000
40 #define EMU_LOG_USR2        0x00040000
41 #define EMU_LOG_USR3        0x00080000
42 #define EMU_LOG_USR4        0x00100000
43 #define EMU_LOG_USR5        0x00200000
44 #define EMU_LOG_USR6        0x00400000
45 #define EMU_LOG_USR7        0x00800000
46 #define EMU_LOG_USR8        0x01000000
47 #define EMU_LOG_USR9        0x02000000
48 #define EMU_LOG_USR10       0x04000000
49 #define EMU_LOG_GUI         0x08000000
50 #define EMU_LOG_DEBUG       0x10000000
51 #define EMU_LOG_INFO        0x20000000
52 #define EMU_LOG_WARNING     0x40000000
53 #define EMU_LOG_GENERAL     0x80000000
54
55 #define MAX_HISTORY     8
56
57 #if defined(USE_CART2)
58 #define MAX_CART        2
59 #elif defined(USE_CART1)
60 #define MAX_CART        1
61 #endif
62
63 #if defined(USE_FD8)
64 #define MAX_FD          8
65 #elif defined(USE_FD7)
66 #define MAX_FD          7
67 #elif defined(USE_FD6)
68 #define MAX_FD          6
69 #elif defined(USE_FD5)
70 #define MAX_FD          5
71 #elif defined(USE_FD4)
72 #define MAX_FD          4
73 #elif defined(USE_FD3)
74 #define MAX_FD          3
75 #elif defined(USE_FD2)
76 #define MAX_FD          2
77 #elif defined(USE_FD1)
78 #define MAX_FD          1
79 #endif
80
81 #if defined(USE_QD2)
82 #define MAX_QD          2
83 #elif defined(USE_QD1)
84 #define MAX_QD          1
85 #endif
86
87 #if defined(USE_BINARY_FILE2)
88 #define MAX_BINARY      2
89 #elif defined(USE_BINARY_FILE1)
90 #define MAX_BINARY      1
91 #endif
92
93 #ifdef __cplusplus
94 void init_config();
95 void load_config(const _TCHAR* config_path);
96 void save_config(const _TCHAR* config_path);
97 void save_config_state(void *f);
98 bool load_config_state(void *f);
99 #endif
100
101 typedef struct {
102         // control
103 #ifdef USE_BOOT_MODE
104         int boot_mode;
105 #endif
106 #ifdef USE_CPU_TYPE
107         int cpu_type;
108 #endif
109         int cpu_power;
110 #ifdef USE_DIPSWITCH
111         uint32 dipswitch;
112 #endif
113 #ifdef USE_DEVICE_TYPE
114         int device_type;
115 #endif
116 #ifdef USE_DRIVE_TYPE
117         int drive_type;
118 #endif
119 #ifdef USE_FD1
120         bool correct_disk_timing[16];
121         bool ignore_disk_crc[16];
122 #endif
123 #ifdef USE_TAPE
124         bool tape_sound;
125         bool wave_shaper;
126         bool direct_load_mzt;
127         bool baud_high;
128 #endif
129         
130         // recent files
131 #ifdef USE_CART1
132         _TCHAR initial_cart_dir[_MAX_PATH];
133         _TCHAR recent_cart_path[MAX_CART][MAX_HISTORY][_MAX_PATH];
134 #endif
135 #ifdef USE_FD1
136         _TCHAR initial_disk_dir[_MAX_PATH];
137         _TCHAR recent_disk_path[MAX_FD][MAX_HISTORY][_MAX_PATH];
138 #endif
139 #ifdef USE_QD1
140         _TCHAR initial_quickdisk_dir[_MAX_PATH];
141         _TCHAR recent_quickdisk_path[MAX_QD][MAX_HISTORY][_MAX_PATH];
142 #endif
143 #ifdef USE_TAPE
144         _TCHAR initial_tape_dir[_MAX_PATH];
145         _TCHAR recent_tape_path[MAX_HISTORY][_MAX_PATH];
146 #endif
147 #ifdef USE_LASER_DISC
148         _TCHAR initial_laser_disc_dir[_MAX_PATH];
149         _TCHAR recent_laser_disc_path[MAX_HISTORY][_MAX_PATH];
150 #endif
151 #ifdef USE_BINARY_FILE1
152         _TCHAR initial_binary_dir[_MAX_PATH];
153         _TCHAR recent_binary_path[MAX_BINARY][MAX_HISTORY][_MAX_PATH];
154 #endif
155 #ifdef USE_SCREEN_ROTATE
156         int rotate_type;
157 #endif
158         
159         // screen
160         int window_mode;
161 #ifdef _WIN32
162         bool use_d3d9;
163         bool wait_vsync;
164 #endif
165         int stretch_type;
166 #ifdef USE_MONITOR_TYPE
167         int monitor_type;
168 #endif
169 #ifdef USE_CRT_FILTER
170         BOOL crt_filter;
171 #endif
172 #ifdef USE_SCANLINE
173         bool scan_line;
174 #endif
175         // sound
176         int sound_frequency;
177         int sound_latency;
178         
179         int general_sound_level;
180 #ifdef USE_MULTIPLE_SOUNDCARDS
181         int sound_device_level[USE_MULTIPLE_SOUNDCARDS];
182 #endif
183         bool multiple_speakers; // Effext if multiple sound boards : TRUE = not monoral.
184 #if defined(USE_QT)
185         bool use_opengl_scanline;
186         bool opengl_scanline_vert;
187         bool opengl_scanline_horiz;
188         
189         bool use_opengl_filters;
190         int opengl_filter_num;
191 #endif  
192 #ifdef USE_SOUND_DEVICE_TYPE
193         int sound_device_type;
194 #endif
195         _TCHAR fmgen_dll_path[_MAX_PATH];
196         
197         // input
198 #ifdef _WIN32
199         bool use_direct_input;
200         bool disable_dwm;
201 #endif
202         bool swap_joy_buttons;
203         
204         // printer
205 #ifdef USE_PRINTER
206         int printer_device_type;
207         _TCHAR printer_dll_path[_MAX_PATH];
208 #endif
209 } config_t;
210
211 extern config_t config;
212
213 #if defined(_USE_AGAR) || defined(_USE_QT)
214
215 # include <string>
216
217 #endif
218
219 #endif
220