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