Merge pull request #475 from negativeExponent/multitap
[pcsx_rearmed.git] / frontend / libretro_core_options.h
... / ...
CommitLineData
1#ifndef LIBRETRO_CORE_OPTIONS_H__
2#define LIBRETRO_CORE_OPTIONS_H__
3
4#include <stdlib.h>
5#include <string.h>
6
7#include <libretro.h>
8#include <retro_inline.h>
9
10#ifndef HAVE_NO_LANGEXTRA
11#include "libretro_core_options_intl.h"
12#endif
13
14/*
15 ********************************
16 * VERSION: 1.3
17 ********************************
18 *
19 * - 1.3: Move translations to libretro_core_options_intl.h
20 * - libretro_core_options_intl.h includes BOM and utf-8
21 * fix for MSVC 2010-2013
22 * - Added HAVE_NO_LANGEXTRA flag to disable translations
23 * on platforms/compilers without BOM support
24 * - 1.2: Use core options v1 interface when
25 * RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION is >= 1
26 * (previously required RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION == 1)
27 * - 1.1: Support generation of core options v0 retro_core_option_value
28 * arrays containing options with a single value
29 * - 1.0: First commit
30*/
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/*
37 ********************************
38 * Core Option Definitions
39 ********************************
40*/
41
42/* RETRO_LANGUAGE_ENGLISH */
43
44/* Default language:
45 * - All other languages must include the same keys and values
46 * - Will be used as a fallback in the event that frontend language
47 * is not available
48 * - Will be used as a fallback for any missing entries in
49 * frontend language definition
50 */
51
52struct retro_core_option_definition option_defs_us[] = {
53 {
54 "pcsx_rearmed_frameskip",
55 "Frameskip",
56 "Choose how much frames should be skipped to improve performance at the expense of visual smoothness.",
57 {
58 { "0", NULL },
59 { "1", NULL },
60 { "2", NULL },
61 { "3", NULL },
62 { NULL, NULL },
63 },
64 "0",
65 },
66 {
67 "pcsx_rearmed_bios",
68 "Use BIOS",
69 "Allows you to use real bios file (if available) or emulated bios (HLE). Its recommended to use official bios file for better compatibility.",
70 {
71 { "auto", "auto" },
72 { "HLE", "hle" },
73 { NULL, NULL },
74 },
75 "auto",
76 },
77 {
78 "pcsx_rearmed_region",
79 "Region",
80 "Choose what region the system is from. 60 Hz for NTSC, 50 Hz for PAL.",
81 {
82 { "auto", "auto" },
83 { "NTSC", "ntsc" },
84 { "PAL", "pal" },
85 { NULL, NULL },
86 },
87 "auto",
88 },
89 {
90 "pcsx_rearmed_memcard2",
91 "Enable Second Memory Card (Shared)",
92 "Enabled the memory card slot 2. This memory card is shared amongst all games.",
93 {
94 { "disabled", NULL },
95 { "enabled", NULL },
96 { NULL, NULL },
97 },
98 "disabled",
99 },
100 {
101 "pcsx_rearmed_show_other_input_settings",
102 "Show other input settings",
103 "Shows or hides other inputs settings like multitaps, player 3-8 ports, analog fine-tunings, etc.",
104 {
105 { "disabled", NULL },
106 { "enabled", NULL },
107 { NULL, NULL },
108 },
109 "disabled",
110 },
111 {
112 "pcsx_rearmed_input_sensitivity",
113 "Emulated Mouse Sensitivity",
114 "Adjust responsiveness when using mouse controller (Default 1.0).",
115 {
116 { "0.05", NULL },
117 { "0.10", NULL },
118 { "0.15", NULL },
119 { "0.20", NULL },
120 { "0.25", NULL },
121 { "0.30", NULL },
122 { "0.35", NULL },
123 { "0.40", NULL },
124 { "0.45", NULL },
125 { "0.50", NULL },
126 { "0.55", NULL },
127 { "0.60", NULL },
128 { "0.65", NULL },
129 { "0.70", NULL },
130 { "0.75", NULL },
131 { "0.80", NULL },
132 { "0.85", NULL },
133 { "0.90", NULL },
134 { "0.95", NULL },
135 { "1.00", NULL },
136 { "1.05", NULL },
137 { "1.10", NULL },
138 { "1.15", NULL },
139 { "1.20", NULL },
140 { "1.25", NULL },
141 { "1.30", NULL },
142 { "1.35", NULL },
143 { "1.40", NULL },
144 { "1.45", NULL },
145 { "1.50", NULL },
146 { "1.55", NULL },
147 { "1.60", NULL },
148 { "1.65", NULL },
149 { "1.70", NULL },
150 { "1.75", NULL },
151 { "1.80", NULL },
152 { "1.85", NULL },
153 { "1.90", NULL },
154 { "1.95", NULL },
155 { "2.00", NULL },
156 },
157 "1.00",
158 },
159 {
160 "pcsx_rearmed_multitap1",
161 "Multitap 1 (Restart)",
162 "Enables/Disables multitap on port 1, allowing upto 5 players in games that permit it.",
163 {
164 { "auto", NULL },
165 { "disabled", NULL },
166 { "enabled", NULL },
167 { NULL, NULL },
168 },
169 "disabled",
170 },
171 {
172 "pcsx_rearmed_multitap2",
173 "Multitap 2 (Restart)",
174 "Enables/Disables multitap on port 2, allowing up to 8 players in games that permit it. Multitap 1 has to be enabled for this to work.",
175 {
176 { "auto", NULL },
177 { "disabled", NULL },
178 { "enabled", NULL },
179 { NULL, NULL },
180 },
181 "disabled",
182 },
183 {
184 "pcsx_rearmed_negcon_deadzone",
185 "NegCon Twist Deadzone (Percent)",
186 "Sets the deadzone of the RetroPad left analog stick when simulating the 'twist' action of emulated neGcon Controllers. Used to eliminate drift/unwanted input.",
187 {
188 { "0", NULL },
189 { "5", NULL },
190 { "10", NULL },
191 { "15", NULL },
192 { "20", NULL },
193 { "25", NULL },
194 { "30", NULL },
195 { NULL, NULL },
196 },
197 "0",
198 },
199 {
200 "pcsx_rearmed_negcon_response",
201 "NegCon Twist Response",
202 "Specifies the analog response when using a RetroPad left analog stick to simulate the 'twist' action of emulated neGcon Controllers.",
203 {
204 { "linear", NULL },
205 { "quadratic", NULL },
206 { "cubic", NULL },
207 { NULL, NULL },
208 },
209 "linear",
210 },
211 {
212 "pcsx_rearmed_analog_axis_modifier",
213 "Analog axis bounds.",
214 "Range bounds for analog axis. Square bounds help controllers with highly circular ranges that are unable to fully saturate the x and y axis at 45degree deflections.",
215 {
216 { "circle", NULL },
217 { "square", NULL },
218 { NULL, NULL },
219 },
220 "circle",
221 },
222 {
223 "pcsx_rearmed_vibration",
224 "Enable Vibration",
225 "Enables vibration feedback for controllers that supports vibration features.",
226 {
227 { "disabled", NULL },
228 { "enabled", NULL },
229 { NULL, NULL },
230 },
231 "enabled",
232 },
233 {
234 "pcsx_rearmed_gunconadjustx",
235 "Guncon Adjust X",
236 "When using Guncon mode, you can override aim in emulator if shots misaligned, this applies an increment on the x axis.",
237 {
238 { "0", NULL },
239 { "-25", NULL },
240 { "-24", NULL },
241 { "-23", NULL },
242 { "-22", NULL },
243 { "-21", NULL },
244 { "-20", NULL },
245 { "-19", NULL },
246 { "-18", NULL },
247 { "-17", NULL },
248 { "-16", NULL },
249 { "-15", NULL },
250 { "-14", NULL },
251 { "-13", NULL },
252 { "-12", NULL },
253 { "-11", NULL },
254 { "-10", NULL },
255 { "-09", NULL },
256 { "-08", NULL },
257 { "-07", NULL },
258 { "-06", NULL },
259 { "-05", NULL },
260 { "-04", NULL },
261 { "-03", NULL },
262 { "-02", NULL },
263 { "-01", NULL },
264 { "00", NULL },
265 { "01", NULL },
266 { "02", NULL },
267 { "03", NULL },
268 { "04", NULL },
269 { "05", NULL },
270 { "06", NULL },
271 { "07", NULL },
272 { "08", NULL },
273 { "09", NULL },
274 { "10", NULL },
275 { "11", NULL },
276 { "12", NULL },
277 { "13", NULL },
278 { "14", NULL },
279 { "15", NULL },
280 { "16", NULL },
281 { "17", NULL },
282 { "18", NULL },
283 { "19", NULL },
284 { "20", NULL },
285 { "21", NULL },
286 { "22", NULL },
287 { "23", NULL },
288 { "24", NULL },
289 { "25", NULL },
290 { NULL, NULL },
291 },
292 "0",
293 },
294 {
295 "pcsx_rearmed_gunconadjusty",
296 "Guncon Adjust Y",
297 "When using Guncon mode, you can override aim in emulator if shots misaligned, this applies an increment on the y axis.",
298 {
299 { "0", NULL },
300 { "-25", NULL },
301 { "-24", NULL },
302 { "-23", NULL },
303 { "-22", NULL },
304 { "-21", NULL },
305 { "-20", NULL },
306 { "-19", NULL },
307 { "-18", NULL },
308 { "-17", NULL },
309 { "-16", NULL },
310 { "-15", NULL },
311 { "-14", NULL },
312 { "-13", NULL },
313 { "-12", NULL },
314 { "-11", NULL },
315 { "-10", NULL },
316 { "-09", NULL },
317 { "-08", NULL },
318 { "-07", NULL },
319 { "-06", NULL },
320 { "-05", NULL },
321 { "-04", NULL },
322 { "-03", NULL },
323 { "-02", NULL },
324 { "-01", NULL },
325 { "00", NULL },
326 { "01", NULL },
327 { "02", NULL },
328 { "03", NULL },
329 { "04", NULL },
330 { "05", NULL },
331 { "06", NULL },
332 { "07", NULL },
333 { "08", NULL },
334 { "09", NULL },
335 { "10", NULL },
336 { "11", NULL },
337 { "12", NULL },
338 { "13", NULL },
339 { "14", NULL },
340 { "15", NULL },
341 { "16", NULL },
342 { "17", NULL },
343 { "18", NULL },
344 { "19", NULL },
345 { "20", NULL },
346 { "21", NULL },
347 { "22", NULL },
348 { "23", NULL },
349 { "24", NULL },
350 { "25", NULL },
351 { NULL, NULL },
352 },
353 "0",
354 },
355 {
356 "pcsx_rearmed_gunconadjustratiox",
357 "Guncon Adjust Ratio X",
358 "When using Guncon mode, you can override aim in emulator if shots misaligned, this applies a ratio on the x axis.",
359 {
360 { "1", NULL },
361 { "0.75", NULL },
362 { "0.76", NULL },
363 { "0.77", NULL },
364 { "0.78", NULL },
365 { "0.79", NULL },
366 { "0.80", NULL },
367 { "0.81", NULL },
368 { "0.82", NULL },
369 { "0.83", NULL },
370 { "0.84", NULL },
371 { "0.85", NULL },
372 { "0.86", NULL },
373 { "0.87", NULL },
374 { "0.88", NULL },
375 { "0.89", NULL },
376 { "0.90", NULL },
377 { "0.91", NULL },
378 { "0.92", NULL },
379 { "0.93", NULL },
380 { "0.94", NULL },
381 { "0.95", NULL },
382 { "0.96", NULL },
383 { "0.97", NULL },
384 { "0.98", NULL },
385 { "0.99", NULL },
386 { "1.00", NULL },
387 { "1.01", NULL },
388 { "1.02", NULL },
389 { "1.03", NULL },
390 { "1.04", NULL },
391 { "1.05", NULL },
392 { "1.06", NULL },
393 { "1.07", NULL },
394 { "1.08", NULL },
395 { "1.09", NULL },
396 { "1.10", NULL },
397 { "1.11", NULL },
398 { "1.12", NULL },
399 { "1.13", NULL },
400 { "1.14", NULL },
401 { "1.15", NULL },
402 { "1.16", NULL },
403 { "1.17", NULL },
404 { "1.18", NULL },
405 { "1.19", NULL },
406 { "1.20", NULL },
407 { "1.21", NULL },
408 { "1.22", NULL },
409 { "1.23", NULL },
410 { "1.24", NULL },
411 { "1.25", NULL },
412 { NULL, NULL },
413 },
414 "1",
415 },
416 {
417 "pcsx_rearmed_gunconadjustratioy",
418 "Guncon Adjust Ratio Y",
419 "When using Guncon mode, you can override aim in emulator if shots misaligned, this applies a ratio on the y axis.",
420 {
421 { "1", NULL },
422 { "0.75", NULL },
423 { "0.76", NULL },
424 { "0.77", NULL },
425 { "0.78", NULL },
426 { "0.79", NULL },
427 { "0.80", NULL },
428 { "0.81", NULL },
429 { "0.82", NULL },
430 { "0.83", NULL },
431 { "0.84", NULL },
432 { "0.85", NULL },
433 { "0.86", NULL },
434 { "0.87", NULL },
435 { "0.88", NULL },
436 { "0.89", NULL },
437 { "0.90", NULL },
438 { "0.91", NULL },
439 { "0.92", NULL },
440 { "0.93", NULL },
441 { "0.94", NULL },
442 { "0.95", NULL },
443 { "0.96", NULL },
444 { "0.97", NULL },
445 { "0.98", NULL },
446 { "0.99", NULL },
447 { "1.00", NULL },
448 { "1.01", NULL },
449 { "1.02", NULL },
450 { "1.03", NULL },
451 { "1.04", NULL },
452 { "1.05", NULL },
453 { "1.06", NULL },
454 { "1.07", NULL },
455 { "1.08", NULL },
456 { "1.09", NULL },
457 { "1.10", NULL },
458 { "1.11", NULL },
459 { "1.12", NULL },
460 { "1.13", NULL },
461 { "1.14", NULL },
462 { "1.15", NULL },
463 { "1.16", NULL },
464 { "1.17", NULL },
465 { "1.18", NULL },
466 { "1.19", NULL },
467 { "1.20", NULL },
468 { "1.21", NULL },
469 { "1.22", NULL },
470 { "1.23", NULL },
471 { "1.24", NULL },
472 { "1.25", NULL },
473 { NULL, NULL },
474 },
475 "1",
476 },
477 {
478 "pcsx_rearmed_dithering",
479 "Enable Dithering",
480 "If Off, disables the dithering pattern the PSX applies to combat color banding.",
481 {
482 { "disabled", NULL },
483 { "enabled", NULL },
484 { NULL, NULL },
485 },
486#if defined HAVE_LIBNX || defined _3DS
487 "disabled",
488#else
489 "enabled",
490#endif
491 },
492
493#if defined(LIGHTREC) || defined(NEW_DYNAREC)
494 {
495 "pcsx_rearmed_drc",
496 "Dynamic Recompiler",
497 "Enables core to use dynamic recompiler or interpreter (slower) CPU instructions.",
498 {
499 { "disabled", NULL },
500 { "enabled", NULL },
501 { NULL, NULL },
502 },
503 "enabled",
504 },
505#endif /* LIGHTREC || NEW_DYNAREC */
506
507#ifdef NEW_DYNAREC
508 {
509 "pcsx_rearmed_psxclock",
510 "PSX CPU Clock",
511#if defined(HAVE_PRE_ARMV7) && !defined(_3DS)
512 "Overclock or underclock the PSX clock. Default is 50",
513#else
514 "Overclock or underclock the PSX clock. Default is 57",
515#endif
516 {
517 { "30", NULL },
518 { "31", NULL },
519 { "32", NULL },
520 { "33", NULL },
521 { "34", NULL },
522 { "35", NULL },
523 { "36", NULL },
524 { "37", NULL },
525 { "38", NULL },
526 { "39", NULL },
527 { "40", NULL },
528 { "41", NULL },
529 { "42", NULL },
530 { "43", NULL },
531 { "44", NULL },
532 { "45", NULL },
533 { "46", NULL },
534 { "47", NULL },
535 { "48", NULL },
536 { "49", NULL },
537 { "50", NULL },
538 { "51", NULL },
539 { "52", NULL },
540 { "53", NULL },
541 { "54", NULL },
542 { "55", NULL },
543 { "56", NULL },
544 { "57", NULL },
545 { "58", NULL },
546 { "59", NULL },
547 { "60", NULL },
548 { "61", NULL },
549 { "62", NULL },
550 { "63", NULL },
551 { "64", NULL },
552 { "65", NULL },
553 { "66", NULL },
554 { "67", NULL },
555 { "68", NULL },
556 { "69", NULL },
557 { "70", NULL },
558 { "71", NULL },
559 { "72", NULL },
560 { "73", NULL },
561 { "74", NULL },
562 { "75", NULL },
563 { "76", NULL },
564 { "77", NULL },
565 { "78", NULL },
566 { "79", NULL },
567 { "80", NULL },
568 { "81", NULL },
569 { "82", NULL },
570 { "83", NULL },
571 { "84", NULL },
572 { "85", NULL },
573 { "86", NULL },
574 { "87", NULL },
575 { "88", NULL },
576 { "89", NULL },
577 { "90", NULL },
578 { "91", NULL },
579 { "92", NULL },
580 { "93", NULL },
581 { "94", NULL },
582 { "95", NULL },
583 { "96", NULL },
584 { "97", NULL },
585 { "98", NULL },
586 { "99", NULL },
587 { "100", NULL },
588 { NULL, NULL },
589 },
590#if defined(HAVE_PRE_ARMV7) && !defined(_3DS)
591 "50",
592#else
593 "57",
594#endif
595 },
596#endif /* NEW_DYNAREC */
597
598#ifdef GPU_NEON
599 {
600 "pcsx_rearmed_neon_interlace_enable",
601 "Enable Interlacing Mode",
602 "Enables fake scanlines effect.",
603 {
604 { "disabled", NULL },
605 { "enabled", NULL },
606 { NULL, NULL },
607 },
608 "disabled",
609 },
610 {
611 "pcsx_rearmed_neon_enhancement_enable",
612 "Enhanced Resolution (Slow)",
613 "Renders in double resolution at the cost of lower performance.",
614 {
615 { "disabled", NULL },
616 { "enabled", NULL },
617 { NULL, NULL },
618 },
619 "disabled",
620 },
621 {
622 "pcsx_rearmed_neon_enhancement_no_main",
623 "Enhanced Resolution (Speed Hack)",
624 "Speed hack for Enhanced resolution option (glitches some games).",
625 {
626 { "disabled", NULL },
627 { "enabled", NULL },
628 { NULL, NULL },
629 },
630 "disabled",
631 },
632#endif /* GPU_NEON */
633
634 {
635 "pcsx_rearmed_duping_enable",
636 "Frame Duping",
637 "A speedup, redraws/reuses the last frame if there was no new data.",
638 {
639 { "disabled", NULL },
640 { "enabled", NULL },
641 { NULL, NULL },
642 },
643 "enabled",
644 },
645 {
646 "pcsx_rearmed_display_internal_fps",
647 "Display Internal FPS",
648 "Shows an on-screen frames per second counter when enabled.",
649 {
650 { "disabled", NULL },
651 { "enabled", NULL },
652 { NULL, NULL },
653 },
654 "disabled",
655 },
656
657 /* GPU PEOPS OPTIONS */
658#ifdef GPU_PEOPS
659 {
660 "pcsx_rearmed_show_gpu_peops_settings",
661 "Advanced GPU P.E.Op.S. Settings",
662 "Shows or hides advanced GPU plugin settings. NOTE: Quick Menu must be toggled for this setting to take effect.",
663 {
664 { "disabled", NULL },
665 { "enabled", NULL },
666 { NULL, NULL },
667 },
668 "disabled",
669 },
670 {
671 "pcsx_rearmed_gpu_peops_odd_even_bit",
672 "(GPU) Odd/Even Bit Hack",
673 "Needed for Chrono Cross.",
674 {
675 { "disabled", NULL },
676 { "enabled", NULL },
677 { NULL, NULL },
678 },
679 "disabled",
680 },
681 {
682 "pcsx_rearmed_gpu_peops_expand_screen_width",
683 "(GPU) Expand Screen Width",
684 "Capcom fighting games",
685 {
686 { "disabled", NULL },
687 { "enabled", NULL },
688 { NULL, NULL },
689 },
690 "disabled",
691 },
692 {
693 "pcsx_rearmed_gpu_peops_ignore_brightness",
694 "(GPU) Ignore Brightness Color",
695 "Black screens in Lunar Silver Star Story games",
696 {
697 { "disabled", NULL },
698 { "enabled", NULL },
699 { NULL, NULL },
700 },
701 "disabled",
702 },
703 {
704 "pcsx_rearmed_gpu_peops_disable_coord_check",
705 "(GPU) Disable Coordinate Check",
706 "Compatibility mode",
707 {
708 { "disabled", NULL },
709 { "enabled", NULL },
710 { NULL, NULL },
711 },
712 "disabled",
713 },
714 {
715 "pcsx_rearmed_gpu_peops_lazy_screen_update",
716 "(GPU) Lazy Screen Update",
717 "Pandemonium 2",
718 {
719 { "disabled", NULL },
720 { "enabled", NULL },
721 { NULL, NULL },
722 },
723 "disabled",
724 },
725 {
726 "pcsx_rearmed_gpu_peops_old_frame_skip",
727 "(GPU) Old Frame Skipping",
728 "Skip every second frame",
729 {
730 { "disabled", NULL },
731 { "enabled", NULL },
732 { NULL, NULL },
733 },
734 "enabled",
735 },
736 {
737 "pcsx_rearmed_gpu_peops_repeated_triangles",
738 "(GPU) Repeated Flat Tex Triangles",
739 "Needed by Star Wars: Dark Forces",
740 {
741 { "disabled", NULL },
742 { "enabled", NULL },
743 { NULL, NULL },
744 },
745 "disabled",
746 },
747 {
748 "pcsx_rearmed_gpu_peops_quads_with_triangles",
749 "(GPU) Draw Quads with Triangles",
750 "Better g-colors, worse textures",
751 {
752 { "disabled", NULL },
753 { "enabled", NULL },
754 { NULL, NULL },
755 },
756 "disabled",
757 },
758 {
759 "pcsx_rearmed_gpu_peops_fake_busy_state",
760 "(GPU) Fake 'Gpu Busy' States",
761 "Toggle busy flags after drawing",
762 {
763 { "disabled", NULL },
764 { "enabled", NULL },
765 { NULL, NULL },
766 },
767 "disabled",
768 },
769#endif
770
771 /* GPU UNAI Advanced Options */
772#ifdef GPU_UNAI
773 {
774 "pcsx_rearmed_show_gpu_unai_settings",
775 "Advance GPU UNAI/PCSX4All Settings",
776 "Shows or hides advanced gpu settings. A core restart might be needed for settings to take effect. NOTE: Quick Menu must be toggled for this setting to take effect.",
777 {
778 { "disabled", NULL },
779 { "enabled", NULL },
780 { NULL, NULL},
781 },
782 "disabled",
783 },
784 {
785 "pcsx_rearmed_gpu_unai_blending",
786 "(GPU) Enable Blending",
787 NULL,
788 {
789 { "disabled", NULL },
790 { "enabled", NULL },
791 { NULL, NULL},
792 },
793 "enabled",
794 },
795 {
796 "pcsx_rearmed_gpu_unai_lighting",
797 "(GPU) Enable Lighting",
798 NULL,
799 {
800 { "disabled", NULL },
801 { "enabled", NULL },
802 { NULL, NULL},
803 },
804 "enabled",
805 },
806 {
807 "pcsx_rearmed_gpu_unai_fast_lighting",
808 "(GPU) Enable Fast Lighting",
809 NULL,
810 {
811 { "disabled", NULL },
812 { "enabled", NULL },
813 { NULL, NULL},
814 },
815 "disabled",
816 },
817 {
818 "pcsx_rearmed_gpu_unai_ilace_force",
819 "(GPU) Enable Forced Interlace",
820 NULL,
821 {
822 { "disabled", NULL },
823 { "enabled", NULL },
824 { NULL, NULL},
825 },
826 "disabled",
827 },
828 {
829 "pcsx_rearmed_gpu_unai_pixel_skip",
830 "(GPU) Enable Pixel Skip",
831 NULL,
832 {
833 { "disabled", NULL },
834 { "enabled", NULL },
835 { NULL, NULL},
836 },
837 "disabled",
838 },
839 {
840 "pcsx_rearmed_gpu_unai_scale_hires",
841 "(GPU) Enable Hi-Res Downscaling",
842 "When enabled, will scale hi-res modes to 320x240, skipping unrendered pixels.",
843 {
844 { "disabled", NULL },
845 { "enabled", NULL },
846 { NULL, NULL},
847 },
848 "disabled",
849 },
850#endif /* GPU UNAI Advanced Settings */
851#ifdef THREAD_RENDERING
852 {
853 "pcsx_rearmed_gpu_thread_rendering",
854 "Threaded Rendering",
855 "When enabled, runs GPU commands in a thread. Sync waits for drawing to finish before vsync. Async will not wait unless there's another frame behind it.",
856 {
857 { "disabled", NULL },
858 { "sync", NULL },
859 { "async", NULL },
860 { NULL, NULL},
861 },
862 "disabled",
863 },
864#endif
865
866 {
867 "pcsx_rearmed_show_bios_bootlogo",
868 "Show Bios Bootlogo",
869 "When enabled, shows the PlayStation logo when starting or resetting. (Breaks some games).",
870 {
871 { "disabled", NULL },
872 { "enabled", NULL },
873 { NULL, NULL },
874 },
875 "disabled",
876 },
877 {
878 "pcsx_rearmed_spu_reverb",
879 "Sound Reverb",
880 "Enables or disables audio reverb effect.",
881 {
882 { "disabled", NULL },
883 { "enabled", NULL },
884 { NULL, NULL },
885 },
886 "enabled",
887 },
888 {
889 "pcsx_rearmed_spu_interpolation",
890 "Sound Interpolation",
891 NULL,
892 {
893 { "simple", "Simple" },
894 { "gaussian", "Gaussian" },
895 { "cubic", "Cubic" },
896 { "off", "disabled" },
897 { NULL, NULL },
898 },
899 "simple",
900 },
901 {
902 "pcsx_rearmed_idiablofix",
903 "Diablo Music Fix",
904 NULL,
905 {
906 { "disabled", NULL },
907 { "enabled", NULL },
908 { NULL, NULL },
909 },
910 "disabled",
911 },
912 {
913 "pcsx_rearmed_pe2_fix",
914 "Parasite Eve 2/Vandal Hearts 1/2 Fix",
915 NULL,
916 {
917 { "disabled", NULL },
918 { "enabled", NULL },
919 { NULL, NULL },
920 },
921 "disabled",
922 },
923 {
924 "pcsx_rearmed_inuyasha_fix",
925 "InuYasha Sengoku Battle Fix",
926 NULL,
927 {
928 { "disabled", NULL },
929 { "enabled", NULL },
930 { NULL, NULL },
931 },
932 "disabled",
933 },
934#ifndef _WIN32
935 {
936 "pcsx_rearmed_async_cd",
937 "CD Access Method (Restart)",
938 "Select method used to read data from content disk images. 'Synchronous' mimics original hardware. 'Asynchronous' can reduce stuttering on devices with slow storage. 'Precache' loads disk image into memory for faster access (CHD only).",
939 {
940 { "sync", "Synchronous" },
941 { "async", "Asynchronous" },
942 { "precache", "Precache" },
943 { NULL, NULL},
944 },
945 "sync",
946 },
947#endif
948 /* ADVANCED OPTIONS */
949 {
950 "pcsx_rearmed_noxadecoding",
951 "XA Decoding",
952 NULL,
953 {
954 { "disabled", NULL },
955 { "enabled", NULL },
956 { NULL, NULL },
957 },
958 "enabled",
959 },
960 {
961 "pcsx_rearmed_nocdaudio",
962 "CD Audio",
963 NULL,
964 {
965 { "disabled", NULL },
966 { "enabled", NULL },
967 { NULL, NULL },
968 },
969 "enabled",
970 },
971 {
972 "pcsx_rearmed_spuirq",
973 "SPU IRQ Always Enabled",
974 "Compatibility tweak, should be left to off in most cases.",
975 {
976 { "disabled", NULL },
977 { "enabled", NULL },
978 { NULL, NULL },
979 },
980 "disabled",
981 },
982
983#ifdef NEW_DYNAREC
984 {
985 "pcsx_rearmed_nosmccheck",
986 "(Speed Hack) Disable SMC Checks",
987 "Will cause crashes when loading, break memcards.",
988 {
989 { "disabled", NULL },
990 { "enabled", NULL },
991 { NULL, NULL },
992 },
993 "disabled",
994 },
995 {
996 "pcsx_rearmed_gteregsunneeded",
997 "(Speed Hack) Assume GTE Regs Unneeded",
998 "May cause graphical glitches.",
999 {
1000 { "disabled", NULL },
1001 { "enabled", NULL },
1002 { NULL, NULL },
1003 },
1004 "disabled",
1005 },
1006 {
1007 "pcsx_rearmed_nogteflags",
1008 "(Speed Hack) Disable GTE Flags",
1009 "Will cause graphical glitches.",
1010 {
1011 { "disabled", NULL },
1012 { "enabled", NULL },
1013 { NULL, NULL },
1014 },
1015 "disabled",
1016 },
1017#endif /* NEW_DYNAREC */
1018
1019 { NULL, NULL, NULL, {{0}}, NULL },
1020};
1021
1022/*
1023 ********************************
1024 * Language Mapping
1025 ********************************
1026*/
1027
1028#ifndef HAVE_NO_LANGEXTRA
1029struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
1030 option_defs_us, /* RETRO_LANGUAGE_ENGLISH */
1031 NULL, /* RETRO_LANGUAGE_JAPANESE */
1032 NULL, /* RETRO_LANGUAGE_FRENCH */
1033 NULL, /* RETRO_LANGUAGE_SPANISH */
1034 NULL, /* RETRO_LANGUAGE_GERMAN */
1035 NULL, /* RETRO_LANGUAGE_ITALIAN */
1036 NULL, /* RETRO_LANGUAGE_DUTCH */
1037 NULL, /* RETRO_LANGUAGE_PORTUGUESE_BRAZIL */
1038 NULL, /* RETRO_LANGUAGE_PORTUGUESE_PORTUGAL */
1039 NULL, /* RETRO_LANGUAGE_RUSSIAN */
1040 NULL, /* RETRO_LANGUAGE_KOREAN */
1041 NULL, /* RETRO_LANGUAGE_CHINESE_TRADITIONAL */
1042 NULL, /* RETRO_LANGUAGE_CHINESE_SIMPLIFIED */
1043 NULL, /* RETRO_LANGUAGE_ESPERANTO */
1044 NULL, /* RETRO_LANGUAGE_POLISH */
1045 NULL, /* RETRO_LANGUAGE_VIETNAMESE */
1046 NULL, /* RETRO_LANGUAGE_ARABIC */
1047 NULL, /* RETRO_LANGUAGE_GREEK */
1048 option_defs_tr, /* RETRO_LANGUAGE_TURKISH */
1049};
1050#endif
1051
1052/*
1053 ********************************
1054 * Functions
1055 ********************************
1056*/
1057
1058/* Handles configuration/setting of core options.
1059 * Should be called as early as possible - ideally inside
1060 * retro_set_environment(), and no later than retro_load_game()
1061 * > We place the function body in the header to avoid the
1062 * necessity of adding more .c files (i.e. want this to
1063 * be as painless as possible for core devs)
1064 */
1065
1066static INLINE void libretro_set_core_options(retro_environment_t environ_cb)
1067{
1068 unsigned version = 0;
1069
1070 if (!environ_cb)
1071 return;
1072
1073 if (environ_cb(RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION, &version) && (version >= 1))
1074 {
1075#ifndef HAVE_NO_LANGEXTRA
1076 struct retro_core_options_intl core_options_intl;
1077 unsigned language = 0;
1078
1079 core_options_intl.us = option_defs_us;
1080 core_options_intl.local = NULL;
1081
1082 if (environ_cb(RETRO_ENVIRONMENT_GET_LANGUAGE, &language) &&
1083 (language < RETRO_LANGUAGE_LAST) && (language != RETRO_LANGUAGE_ENGLISH))
1084 core_options_intl.local = option_defs_intl[language];
1085
1086 environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL, &core_options_intl);
1087#else
1088 environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS, &option_defs_us);
1089#endif
1090 }
1091 else
1092 {
1093 size_t i;
1094 size_t option_index = 0;
1095 size_t num_options = 0;
1096 struct retro_variable *variables = NULL;
1097 char **values_buf = NULL;
1098
1099 /* Determine number of options
1100 * > Note: We are going to skip a number of irrelevant
1101 * core options when building the retro_variable array,
1102 * but we'll allocate space for all of them. The difference
1103 * in resource usage is negligible, and this allows us to
1104 * keep the code 'cleaner' */
1105 while (true)
1106 {
1107 if (option_defs_us[num_options].key)
1108 num_options++;
1109 else
1110 break;
1111 }
1112
1113 /* Allocate arrays */
1114 variables = (struct retro_variable *)calloc(num_options + 1, sizeof(struct retro_variable));
1115 values_buf = (char **)calloc(num_options, sizeof(char *));
1116
1117 if (!variables || !values_buf)
1118 goto error;
1119
1120 /* Copy parameters from option_defs_us array */
1121 for (i = 0; i < num_options; i++)
1122 {
1123 const char *key = option_defs_us[i].key;
1124 const char *desc = option_defs_us[i].desc;
1125 const char *default_value = option_defs_us[i].default_value;
1126 struct retro_core_option_value *values = option_defs_us[i].values;
1127 size_t buf_len = 3;
1128 size_t default_index = 0;
1129
1130 values_buf[i] = NULL;
1131
1132 /* Skip options that are irrelevant when using the
1133 * old style core options interface */
1134 if ((strcmp(key, "pcsx_rearmed_show_gpu_peops_settings") == 0))
1135 continue;
1136
1137 if (desc)
1138 {
1139 size_t num_values = 0;
1140
1141 /* Determine number of values */
1142 while (true)
1143 {
1144 if (values[num_values].value)
1145 {
1146 /* Check if this is the default value */
1147 if (default_value)
1148 if (strcmp(values[num_values].value, default_value) == 0)
1149 default_index = num_values;
1150
1151 buf_len += strlen(values[num_values].value);
1152 num_values++;
1153 }
1154 else
1155 break;
1156 }
1157
1158 /* Build values string */
1159 if (num_values > 0)
1160 {
1161 size_t j;
1162
1163 buf_len += num_values - 1;
1164 buf_len += strlen(desc);
1165
1166 values_buf[i] = (char *)calloc(buf_len, sizeof(char));
1167 if (!values_buf[i])
1168 goto error;
1169
1170 strcpy(values_buf[i], desc);
1171 strcat(values_buf[i], "; ");
1172
1173 /* Default value goes first */
1174 strcat(values_buf[i], values[default_index].value);
1175
1176 /* Add remaining values */
1177 for (j = 0; j < num_values; j++)
1178 {
1179 if (j != default_index)
1180 {
1181 strcat(values_buf[i], "|");
1182 strcat(values_buf[i], values[j].value);
1183 }
1184 }
1185 }
1186 }
1187
1188 variables[option_index].key = key;
1189 variables[option_index].value = values_buf[i];
1190 option_index++;
1191 }
1192
1193 /* Set variables */
1194 environ_cb(RETRO_ENVIRONMENT_SET_VARIABLES, variables);
1195
1196error:
1197
1198 /* Clean up */
1199 if (values_buf)
1200 {
1201 for (i = 0; i < num_options; i++)
1202 {
1203 if (values_buf[i])
1204 {
1205 free(values_buf[i]);
1206 values_buf[i] = NULL;
1207 }
1208 }
1209
1210 free(values_buf);
1211 values_buf = NULL;
1212 }
1213
1214 if (variables)
1215 {
1216 free(variables);
1217 variables = NULL;
1218 }
1219 }
1220}
1221
1222#ifdef __cplusplus
1223}
1224#endif
1225
1226#endif