OSDN Git Service

[VM][Qt][UI][EMU][WIP] Use EMU_TEMPLATE:: instead of EMU:: . Some VMs are not apply...
[csp-qt/common_source_project-fm7.git] / source / src / qt / gui / menu_flags.h
1
2 #ifndef __CSP_QT_COMMON_MENU_FLAGS_H
3 #define __CSP_QT_COMMON_MENU_FLAGS_H
4
5 #include <QString>
6 #include "common.h"
7 #include "config.h"
8
9 #ifndef _SCREEN_MODE_NUM
10 #define _SCREEN_MODE_NUM 32
11 #endif
12
13 class EMU;
14 class EMU_TEMPLATE;
15 class OSD;
16
17
18 typedef struct {
19         int x, y;
20         int width, height;
21         int code;
22 } button_desc_t;
23
24 typedef struct {
25         int x, y;
26         int width, height;
27 } vm_ranges_t;
28
29 class DLL_PREFIX USING_FLAGS {
30 protected:
31         QString config_name;
32         QString device_name;
33         // USE_* flags
34         bool use_alt_f10_key;
35         
36         bool use_auto_key;
37         bool use_auto_key_us;
38         bool use_auto_key_caps;
39         bool use_auto_key_no_caps;
40         bool use_auto_key_release;
41         bool use_auto_key_shift;
42
43         bool use_binary_file;
44         int max_binary;
45         int base_binary_num;
46         
47         bool use_bitmap;
48         int use_boot_mode;
49
50         bool use_bubble;
51         int max_bubble;
52         int base_bubble_num;
53         int max_b77_banks;
54
55         bool use_cart;
56         int max_cart;
57         int base_cart_num;
58
59         int use_cpu_type;
60
61         bool use_compact_disc;
62         int max_compact_disc;
63         int base_cd_num;
64
65         bool use_debugger;
66
67         int use_device_type;
68         int use_mouse_type;
69         bool use_dipswitch;
70
71         bool use_ram_size;
72         int max_ram_size;
73         int min_ram_size;
74         uint32_t ram_size_order;
75         
76         int use_drive_type;
77
78         bool use_fd;
79         int base_fd_num;
80         int max_drive;
81         int max_d88_banks;
82
83         int max_draw_ranges;
84         
85         bool use_joystick;
86         int use_joystick_type;
87         bool use_joy_button_captions;
88         int num_joy_button_captions;
89
90         int use_keyboard_type;
91
92         bool use_hd;
93         int max_hd;
94         int base_hd_num;
95         
96         bool use_laser_disc;
97         int max_laser_disc;
98         int base_ld_num;
99
100
101         bool use_key_locked;
102         bool independent_caps_kana_led;
103
104         int use_led_devices;
105
106         int max_memcard;
107         
108         bool use_minimum_rendering;
109         bool use_dig_resolution;
110
111         int use_monitor_type;
112         
113         bool use_mouse;
114         
115         bool use_movie_player;
116
117         bool use_notify_power_off;
118
119         bool use_one_board_computer;
120         bool use_printer;
121         int use_printer_type;
122
123         bool use_qd;
124         int max_qd;
125         int base_qd_num;
126
127         bool use_scanline;
128         bool use_screen_rotate;
129
130         int max_scsi;
131
132         int use_sound_device_type;
133         int use_sound_volume;
134         bool without_sound;
135         bool use_sound_files_fdd;
136         bool use_sound_files_relay;
137         
138         bool use_special_reset;
139
140         bool use_state;
141
142         bool use_tape;
143         bool use_tape_baud;
144         bool use_tape_button;
145         bool use_tape_ptr;
146         int max_tape;
147         int base_tape_num;
148         
149         bool use_vm_auto_key_table;
150
151         int max_button;
152         int max_ranges;
153         bool use_vertical_pixel_lines;
154
155         int screen_width;
156         int screen_height;
157         
158         int real_screen_width;
159         int real_screen_height;
160
161         float screen_x_zoom;
162         float screen_y_zoom;
163         
164         int screen_width_aspect;
165         int screen_height_aspect;
166         double custom_screen_zoom_factor;
167         
168         bool tape_binary_only;
169         int screen_mode_num;
170
171         bool support_tv_render;
172         
173         bool machine_basicmaster_variants;
174         bool machine_pasopia_variants;
175         bool machine_tk80_series;
176         bool machine_cmt_mz_series;
177         bool machine_pc6001;
178         bool machine_pc8001_variants;
179         bool machine_mz80a_variants;
180         bool machine_mz80b_variants;
181         bool machine_x1_series;
182         bool machine_fm7_series;
183         bool machine_gamegear;
184         bool machine_mastersystem;
185         bool machine_has_pcengine;
186         bool machine_sc3000;
187         bool machine_z80tvgame;
188         
189         button_desc_t *vm_buttons_d;
190         vm_ranges_t *vm_ranges_d;
191         EMU_TEMPLATE *p_emu;
192         OSD *p_osd;
193         config_t *p_config;
194 public:
195         USING_FLAGS(config_t *cfg);
196         ~USING_FLAGS();
197         QString get_config_name() { return config_name; }
198         QString get_device_name() { return device_name; }
199         
200         bool is_use_alt_f10_key() { return use_alt_f10_key; }
201         bool is_use_auto_key() { return use_auto_key; }
202         bool is_use_auto_key_us() { return use_auto_key_us; }
203         bool is_use_auto_key_caps() { return use_auto_key_caps; }
204         bool is_use_auto_key_no_caps() { return use_auto_key_no_caps; }
205         bool is_use_auto_key_release() { return use_auto_key_release; }
206         bool is_use_auto_key_shift() { return use_auto_key_shift; }
207
208         bool is_use_binary_file() { return use_binary_file; }
209         int get_max_binary() { return max_binary; }
210         int get_base_binary_num() { return base_binary_num; }
211         
212         bool is_use_bitmap() { return use_bitmap; }
213
214         int get_use_boot_mode() { return use_boot_mode; }
215
216         bool is_use_bubble() { return use_bubble; }
217         int get_max_bubble() { return max_bubble; }
218         int get_max_b77_banks() { return max_b77_banks; }
219         int get_base_bubble_num() { return base_bubble_num; }
220
221         bool is_use_cart() { return use_cart; }
222         int get_max_cart() { return max_cart; }
223         int get_base_cart_num() { return base_cart_num; }
224
225         int get_use_cpu_type() { return use_cpu_type; }
226
227         bool is_use_compact_disc() { return use_compact_disc; }
228         int get_max_cd() { return max_compact_disc; }
229         int get_base_compact_disc_num() { return base_cd_num; }
230         bool is_cdaudio_swap_byteorder(int drv) {
231                 if((use_compact_disc) && (p_config != NULL) && (drv < USE_COMPACT_DISC_TMP) && (drv >= 0)) {
232                         return p_config->swap_audio_byteorder[drv];
233                 }
234                 return false;
235         }
236
237         bool is_use_ram_size() { return use_ram_size; }
238         int get_max_ram_size() { return max_ram_size; }
239         int get_min_ram_size() { return min_ram_size; }
240         uint32_t get_ram_size_order() { return ram_size_order; }
241         int get_current_ram_size() {
242                 if(p_config != NULL) {
243                         return p_config->current_ram_size;
244                 }
245                 return -1;
246         }
247         
248         bool is_use_debugger() { return use_debugger; }
249
250         int get_use_device_type() { return use_device_type; }
251         int get_use_mouse_type() { return use_mouse_type; }
252         bool is_use_dipswitch() { return use_dipswitch; }
253
254         int get_use_drive_type() { return use_drive_type; }
255
256         bool is_use_fd() { return use_fd; }
257         int get_max_drive() { return max_drive; }
258         int get_max_d88_banks() { return max_d88_banks; }
259         int get_base_floppy_disk_num() { return base_fd_num; }
260
261         bool is_use_joystick() { return use_joystick; }
262         bool is_use_joy_button_captions() { return use_joy_button_captions; }
263         int  get_num_joy_button_captions() { return num_joy_button_captions; }
264         int  get_use_joystick_type() { return use_joystick_type; }
265
266         int  get_use_keyboard_type() { return use_keyboard_type; }
267         
268         bool is_use_hdd() { return use_hd; }
269         int get_max_hdd() { return max_hd; }
270         int get_base_hdd_num() { return base_hd_num; }
271         
272         bool is_use_laser_disc() {return use_laser_disc; }
273         int get_max_ld() { return max_laser_disc; }
274         int get_base_laser_disc_num() { return base_ld_num; }
275
276         bool get_use_key_locked() { return use_key_locked; }
277         int get_use_led_devices() { return use_led_devices; }
278         bool get_independent_caps_kana_led() { return independent_caps_kana_led; }
279
280         int get_max_memcard() { return max_memcard; }
281         
282         bool is_use_minimum_rendering() { return use_minimum_rendering; }
283         bool is_use_dig_resolution() { return use_dig_resolution; }
284
285         int get_use_monitor_type() { return use_monitor_type; }
286         
287         bool is_use_mouse() { return use_mouse; }
288         
289         bool is_use_movie_player() { return use_movie_player; }
290
291         bool is_use_notify_power_off() { return use_notify_power_off; }
292
293         bool is_use_one_board_computer() { return use_one_board_computer; }
294         bool is_use_printer() { return use_printer; }
295         int get_use_printer_type() { return use_printer_type; }
296
297         bool is_use_qd() { return use_qd; }
298         int get_max_qd() { return max_qd; }
299         int get_base_quick_disk_num() { return base_qd_num; }
300
301         bool is_use_scanline() { return use_scanline; }
302         bool is_use_screen_rotate() { return use_screen_rotate; }
303
304         int get_max_scsi() { return max_scsi; }
305
306         int get_use_sound_device_type() { return use_sound_device_type; }
307         int get_use_sound_volume() { return use_sound_volume; }
308         bool is_without_sound() { return without_sound; }
309         bool is_use_sound_files_fdd() { return use_sound_files_fdd; }
310         bool is_use_sound_files_relay() { return use_sound_files_relay; }
311         bool is_use_special_reset() { return use_special_reset; }
312
313         bool is_use_state() { return use_state; }
314
315         bool is_use_tape() { return use_tape; }
316         bool is_use_tape_baud() { return use_tape_baud; }
317         bool is_use_tape_button() { return use_tape_button; }
318         bool is_use_tape_ptr() { return use_tape_ptr; }
319         int get_max_tape() { return max_tape; }
320         int get_base_tape_num() { return base_tape_num; }
321
322         bool is_use_vm_auto_key_table() { return use_vm_auto_key_table; }
323
324         bool is_use_vertical_pixel_lines() { return use_vertical_pixel_lines; }
325         bool is_support_tv_render() { return support_tv_render; }
326
327         int get_screen_width() { return screen_width; }
328         int get_screen_height() { return screen_height; }
329         int get_screen_width_aspect() { return screen_width_aspect; }
330         int get_screen_height_aspect() { return screen_height_aspect; }
331         int get_real_screen_width() { return real_screen_width; }
332         int get_real_screen_height() { return real_screen_height; }
333         float get_screen_x_zoom() { return screen_x_zoom; }
334         float get_screen_y_zoom() { return screen_y_zoom; }
335         
336         int get_screen_mode_num() { return screen_mode_num; }
337         double get_custom_screen_zoom_factor() { return custom_screen_zoom_factor; }
338         int get_max_button() { return max_button; }
339         int get_max_draw_ranges() { return max_ranges; }
340         button_desc_t *get_vm_buttons() { return vm_buttons_d; }
341         vm_ranges_t *get_draw_ranges() { return vm_ranges_d; }
342
343         bool is_tape_binary_only() { return tape_binary_only; }
344
345         bool is_machine_basicmaster_variants() { return machine_basicmaster_variants; }
346         bool is_machine_pasopia_variants() { return machine_pasopia_variants; }
347         bool is_machine_tk80_series() { return machine_tk80_series; }
348         bool is_machine_cmt_mz_series() { return machine_cmt_mz_series; }
349         bool is_machine_pc6001() { return machine_pc6001; }
350         bool is_machine_pc8001_variants() { return machine_pc8001_variants; }
351         bool is_machine_mz80a_variants() { return machine_mz80a_variants; }
352         bool is_machine_mz80b_variants() { return machine_mz80b_variants; }
353         bool is_machine_x1_series() { return machine_x1_series; }
354         bool is_machine_fm7_series() { return machine_fm7_series; }
355         bool is_machine_gamegear() { return machine_gamegear; }
356         bool is_machine_mastersystem() { return machine_mastersystem; }
357         bool is_machine_has_pcengine() { return machine_has_pcengine; }
358         bool is_machine_sc3000() { return machine_sc3000; }
359         bool is_machine_z80tvgame() { return machine_z80tvgame; }
360         virtual const _TCHAR *get_joy_button_captions(int num);
361         virtual const _TCHAR *get_sound_device_caption(int num);
362         virtual int get_s_freq_table(int num);
363         void set_emu(EMU_TEMPLATE *p);
364         EMU_TEMPLATE *get_emu(void);
365         void set_osd(OSD *p);
366         OSD *get_osd(void);
367         virtual const _TCHAR *get_sound_device_name(int num);
368         virtual int get_sound_device_num();
369         
370         virtual int get_vm_node_size();
371         virtual void set_vm_node_name(int id, const _TCHAR *name);
372         virtual _TCHAR *get_vm_node_name(int id);
373         virtual bool is_support_phy_key_name();
374         config_t *get_config_ptr(void);
375 };
376         
377
378 #endif //#ifndef __CSP_QT_COMMON_MENU_FLAGS_H