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