try some overscan display option
[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: 2.0
17  ********************************
18  *
19  * - 2.0: Add support for core options v2 interface
20  * - 1.3: Move translations to libretro_core_options_intl.h
21  *        - libretro_core_options_intl.h includes BOM and utf-8
22  *          fix for MSVC 2010-2013
23  *        - Added HAVE_NO_LANGEXTRA flag to disable translations
24  *          on platforms/compilers without BOM support
25  * - 1.2: Use core options v1 interface when
26  *        RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION is >= 1
27  *        (previously required RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION == 1)
28  * - 1.1: Support generation of core options v0 retro_core_option_value
29  *        arrays containing options with a single value
30  * - 1.0: First commit
31 */
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /*
38  ********************************
39  * Core Option Definitions
40  ********************************
41 */
42
43 /* RETRO_LANGUAGE_ENGLISH */
44
45 /* Default language:
46  * - All other languages must include the same keys and values
47  * - Will be used as a fallback in the event that frontend language
48  *   is not available
49  * - Will be used as a fallback for any missing entries in
50  *   frontend language definition
51  */
52
53 struct retro_core_option_v2_category option_cats_us[] = {
54    {
55       "system",
56       "System",
57       "Configure base hardware parameters: region, BIOS selection, memory cards, etc."
58    },
59    {
60       "video",
61       "Video",
62       "Configure base display parameters."
63    },
64 #ifdef GPU_NEON
65    {
66       "gpu_neon",
67       "GPU Plugin",
68       "Configure low-level settings of the NEON GPU plugin."
69    },
70 #endif
71 #ifdef GPU_PEOPS
72    {
73       "gpu_peops",
74       "GPU Plugin (Advanced)",
75       "Configure low-level settings of the P.E.Op.S. GPU plugin."
76    },
77 #endif
78 #ifdef GPU_UNAI
79    {
80       "gpu_unai",
81       "GPU Plugin (Advanced)",
82       "Configure low-level settings of the UNAI GPU plugin."
83    },
84 #endif
85    {
86       "audio",
87       "Audio",
88       "Configure sound emulation: reverb, interpolation, CD audio decoding."
89    },
90    {
91       "input",
92       "Input",
93       "Configure input devices: analog response, haptic feedback, Multitaps, light guns, etc."
94    },
95    {
96       "compat_hack",
97       "Compatibility Fixes",
98       "Configure settings/workarounds required for correct operation of specific games."
99    },
100    {
101       "speed_hack",
102       "Speed Hacks (Advanced)",
103       "Configure hacks that may improve performance at the expense of decreased accuracy/stability."
104    },
105    { NULL, NULL, NULL },
106 };
107
108 struct retro_core_option_v2_definition option_defs_us[] = {
109    {
110       "pcsx_rearmed_region",
111       "Region",
112       NULL,
113       "Specify which region the system is from. 'NTSC' is 60 Hz while 'PAL' is 50 Hz. 'Auto' will detect the region of the currently loaded content. Games may run faster or slower than normal if the incorrect region is selected.",
114       NULL,
115       "system",
116       {
117          { "auto", "Auto" },
118          { "NTSC", NULL },
119          { "PAL",  NULL },
120          { NULL, NULL },
121       },
122       "auto",
123    },
124    {
125       "pcsx_rearmed_bios",
126       "BIOS Selection",
127       NULL,
128       "Specify which BIOS to use. 'Auto' will attempt to load a real bios file from the frontend 'system' directory, falling back to high level emulation if unavailable. 'HLE' forces high level BIOS emulation. It is recommended to use an official bios file for better compatibility.",
129       NULL,
130       "system",
131       {
132          { "auto", "Auto" },
133          { "HLE",  NULL },
134          { NULL, NULL },
135       },
136       "auto",
137    },
138    {
139       "pcsx_rearmed_show_bios_bootlogo",
140       "Show BIOS Boot Logo",
141       NULL,
142       "When using an official BIOS file, specify whether to show the PlayStation logo upon starting or resetting content. Warning: Enabling the boot logo may reduce game compatibility.",
143       NULL,
144       "system",
145       {
146          { "disabled", NULL },
147          { "enabled",  NULL },
148          { NULL, NULL },
149       },
150       "disabled",
151    },
152    {
153       "pcsx_rearmed_memcard2",
154       "Enable Second Memory Card (Shared)",
155       NULL,
156       "Emulate a second memory card in slot 2. This will be shared by all games.",
157       NULL,
158       "system",
159       {
160          { "disabled", NULL },
161          { "enabled",  NULL },
162          { NULL, NULL },
163       },
164       "disabled",
165    },
166 #ifndef _WIN32
167    {
168       "pcsx_rearmed_async_cd",
169       "CD Access Method (Restart)",
170       NULL,
171       "Select method used to read data from content disk images. 'Synchronous' mimics original hardware. 'Asynchronous' can reduce stuttering on devices with slow storage. 'Pre-Cache (CHD)' loads disk image into memory for faster access (CHD files only).",
172       NULL,
173       "system",
174       {
175          { "sync",     "Synchronous" },
176          { "async",    "Asynchronous" },
177          { "precache", "Pre-Cache (CHD)" },
178          { NULL, NULL},
179       },
180       "sync",
181    },
182 #endif
183 #ifdef HAVE_CDROM
184 #define V(x) { #x, NULL }
185    {
186       "pcsx_rearmed_phys_cd_readahead",
187       "Physical CD read-ahead",
188       NULL,
189       "(Hardware CD-ROM only) Reads the specified amount of sectors ahead of time to try to avoid later stalls. 333000 will try to read the complete disk (requires an additional 750MB of RAM).",
190       NULL,
191       "system",
192       {
193          V(0),  V(1),  V(2),  V(3),  V(4),  V(5),  V(6),  V(7),
194          V(8),  V(9),  V(10), V(11), V(12), V(13), V(14), V(15),
195          V(16), V(32), V(64), V(128), V(256), V(512), V(1024), V(333000),
196          { NULL, NULL},
197       },
198       "12",
199    },
200 #undef V
201 #endif
202 #ifndef DRC_DISABLE
203    {
204       "pcsx_rearmed_drc",
205       "Dynamic Recompiler",
206       NULL,
207       "Dynamically recompile PSX CPU instructions to native instructions. Much faster than using an interpreter, but may be less accurate on some platforms.",
208       NULL,
209       "system",
210       {
211          { "disabled", NULL },
212          { "enabled",  NULL },
213          { NULL, NULL },
214       },
215       "enabled",
216    },
217 #endif
218    {
219       "pcsx_rearmed_psxclock",
220       "PSX CPU Clock Speed",
221       NULL,
222       "Overclock or under-clock the PSX CPU. Try adjusting this if the game is too slow, too fast or hangs."
223 #if defined(HAVE_PRE_ARMV7) && !defined(_3DS)
224       " Default is 50."
225 #else
226       " Default is 57."
227 #endif
228       ,
229       NULL,
230       "system",
231       {
232          { "30",  NULL },
233          { "31",  NULL },
234          { "32",  NULL },
235          { "33",  NULL },
236          { "34",  NULL },
237          { "35",  NULL },
238          { "36",  NULL },
239          { "37",  NULL },
240          { "38",  NULL },
241          { "39",  NULL },
242          { "40",  NULL },
243          { "41",  NULL },
244          { "42",  NULL },
245          { "43",  NULL },
246          { "44",  NULL },
247          { "45",  NULL },
248          { "46",  NULL },
249          { "47",  NULL },
250          { "48",  NULL },
251          { "49",  NULL },
252          { "50",  NULL },
253          { "51",  NULL },
254          { "52",  NULL },
255          { "53",  NULL },
256          { "54",  NULL },
257          { "55",  NULL },
258          { "56",  NULL },
259          { "57",  NULL },
260          { "58",  NULL },
261          { "59",  NULL },
262          { "60",  NULL },
263          { "61",  NULL },
264          { "62",  NULL },
265          { "63",  NULL },
266          { "64",  NULL },
267          { "65",  NULL },
268          { "66",  NULL },
269          { "67",  NULL },
270          { "68",  NULL },
271          { "69",  NULL },
272          { "70",  NULL },
273          { "71",  NULL },
274          { "72",  NULL },
275          { "73",  NULL },
276          { "74",  NULL },
277          { "75",  NULL },
278          { "76",  NULL },
279          { "77",  NULL },
280          { "78",  NULL },
281          { "79",  NULL },
282          { "80",  NULL },
283          { "81",  NULL },
284          { "82",  NULL },
285          { "83",  NULL },
286          { "84",  NULL },
287          { "85",  NULL },
288          { "86",  NULL },
289          { "87",  NULL },
290          { "88",  NULL },
291          { "89",  NULL },
292          { "90",  NULL },
293          { "91",  NULL },
294          { "92",  NULL },
295          { "93",  NULL },
296          { "94",  NULL },
297          { "95",  NULL },
298          { "96",  NULL },
299          { "97",  NULL },
300          { "98",  NULL },
301          { "99",  NULL },
302          { "100", NULL },
303          { NULL, NULL },
304       },
305 #if defined(HAVE_PRE_ARMV7) && !defined(_3DS)
306       "50",
307 #else
308       "57",
309 #endif
310    },
311    {
312       "pcsx_rearmed_dithering",
313       "Dithering Pattern",
314       NULL,
315       "Enable emulation of the dithering technique used by the PSX to smooth out color banding artifacts. Increases performance requirements.",
316       NULL,
317       "video",
318       {
319          { "disabled", NULL },
320          { "enabled",  NULL },
321          { NULL, NULL },
322       },
323 #if defined HAVE_LIBNX || defined _3DS
324       "disabled",
325 #else
326       "enabled",
327 #endif
328    },
329 #ifdef THREAD_RENDERING
330    {
331       "pcsx_rearmed_gpu_thread_rendering",
332       "Threaded Rendering",
333       NULL,
334       "When enabled, runs GPU commands in a secondary thread. 'Synchronous' improves performance while maintaining proper frame pacing. 'Asynchronous' improves performance even further, but may cause dropped frames and increased latency. Produces best results with games that run natively at less than 60 frames per second.",
335       NULL,
336       "video",
337       {
338          { "disabled", NULL },
339          { "sync",     "Synchronous" },
340          { "async",    "Asynchronous" },
341          { NULL, NULL},
342       },
343       "disabled",
344    },
345 #endif
346    {
347       "pcsx_rearmed_frameskip_type",
348       "Frameskip",
349       NULL,
350       "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.",
351       NULL,
352       "video",
353       {
354          { "disabled",       NULL },
355          { "auto",           "Auto" },
356          { "auto_threshold", "Auto (Threshold)" },
357          { "fixed_interval", "Fixed Interval" },
358          { NULL, NULL },
359       },
360       "disabled"
361    },
362    {
363       "pcsx_rearmed_frameskip_threshold",
364       "Frameskip Threshold (%)",
365       NULL,
366       "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.",
367       NULL,
368       "video",
369       {
370          { "15", NULL },
371          { "18", NULL },
372          { "21", NULL },
373          { "24", NULL },
374          { "27", NULL },
375          { "30", NULL },
376          { "33", NULL },
377          { "36", NULL },
378          { "39", NULL },
379          { "42", NULL },
380          { "45", NULL },
381          { "48", NULL },
382          { "51", NULL },
383          { "54", NULL },
384          { "57", NULL },
385          { "60", NULL },
386          { NULL, NULL },
387       },
388       "33"
389    },
390    {
391       "pcsx_rearmed_frameskip_interval",
392       "Frameskip Interval",
393       NULL,
394       "Specify the maximum number of frames that can be skipped before a new frame is rendered.",
395       NULL,
396       "video",
397       {
398          { "1",  NULL },
399          { "2",  NULL },
400          { "3",  NULL },
401          { "4",  NULL },
402          { "5",  NULL },
403          { "6",  NULL },
404          { "7",  NULL },
405          { "8",  NULL },
406          { "9",  NULL },
407          { "10", NULL },
408          { NULL, NULL },
409       },
410       "3"
411    },
412    {
413       "pcsx_rearmed_display_internal_fps",
414       "Display Internal FPS",
415       NULL,
416       "Show the internal frame rate at which the emulated PlayStation system is rendering content. Note: Requires on-screen notifications to be enabled in the libretro frontend.",
417       NULL,
418       "video",
419       {
420          { "disabled", NULL },
421          { "enabled",  NULL },
422          { NULL, NULL },
423       },
424       "disabled",
425    },
426    {
427       "pcsx_rearmed_fractional_framerate",
428       "Use fractional frame rate",
429       NULL,
430       "Instead of the exact 50 or 60 (maximum) fps for PAL/NTSC the real console runs closer to something like 49.75 and 59.81fps (varies slightly between hw versions). PCSX-ReARMed uses the former \"round\" framerates to better match modern displays, however that may cause audio/video desync in games like DDR and Spyro 2 (intro). With this option you can try to use fractional framerates.",
431       NULL,
432       "video",
433       {
434          { "auto", "Auto" },
435          { "disabled", NULL },
436          { "enabled",  NULL },
437          { NULL, NULL },
438       },
439       "auto",
440    },
441    {
442       "pcsx_rearmed_gpu_slow_llists",
443       "(GPU) Slow linked list processing",
444       NULL,
445       "Slower but more accurate GPU linked list processing. Needed by only a few games like Vampire Hunter D. Should be autodetected in most cases.",
446       NULL,
447       "video",
448       {
449          { "auto", "Auto" },
450          { "disabled", NULL },
451          { "enabled",  NULL },
452          { NULL, NULL },
453       },
454       "auto",
455    },
456    {
457       "pcsx_rearmed_show_overscan",
458       "(GPU) Show horizontal overscan",
459       NULL,
460       "The PSX can display graphics way into the horizontal borders, even if most screens would crop it. This option tries to display all such graphics. Note that this may result in unusual resolutions that your device might not handle well. The 'Hack' option is intended for the widescreen hacks.",
461       NULL,
462       "video",
463       {
464          { "disabled", NULL },
465          { "auto", "Auto" },
466          { "hack", "Hack" },
467          { NULL, NULL },
468       },
469       "disabled",
470    },
471    {
472       "pcsx_rearmed_screen_centering",
473       "(GPU) Screen centering",
474       NULL,
475       "The PSX has a feature allowing it to shift the image position on screen. Some (mostly PAL) games used this feature in a strange way making the image miscentered and causing uneven borders to appear. With 'Auto' the emulator tries to correct this miscentering automatically. 'Game-controlled' uses the settings supplied by the game. 'Manual' allows to override those values with the settings below.",
476       NULL,
477       "video",
478       {
479          { "auto", "Auto" },
480          { "game", "Game-controlled" },
481          { "borderless", "Borderless" },
482          { "manual", "Manual" },
483          { NULL, NULL },
484       },
485       "auto",
486    },
487 #define V(x) { #x, NULL }
488    {
489       "pcsx_rearmed_screen_centering_x",
490       "(GPU) Manual screen centering X",
491       NULL,
492       "X offset of the frame buffer. Only effective when 'Screen centering' is set to 'Manual'.",
493       NULL,
494       "video",
495       {
496          V(-16), V(-14), V(-12), V(-10), V(-8), V(-6), V(-4), V(-2), V(0), V(2), V(4), V(6), V(8), V(10), V(12), V(14), V(16),
497          { NULL, NULL },
498       },
499       "0",
500    },
501    {
502       "pcsx_rearmed_screen_centering_y",
503       "(GPU) Manual screen centering Y",
504       NULL,
505       "Y offset of the frame buffer. Only effective when 'Screen centering' is set to 'Manual'.",
506       NULL,
507       "video",
508       {
509          V(-16), V(-15), V(-14), V(-13), V(-12), V(-11), V(-10), V(-9), V(-8), V(-7), V(-6), V(-5), V(-4), V(-3), V(-2), V(-1),
510          V(0), V(1), V(2), V(3), V(4), V(5), V(6), V(7), V(8), V(9), V(10), V(11), V(12), V(13), V(14), V(15), V(16),
511          { NULL, NULL },
512       },
513       "0",
514    },
515 #undef V
516 #ifdef GPU_NEON
517    {
518       "pcsx_rearmed_neon_interlace_enable_v2",
519       "(GPU) Show Interlaced Video",
520       "Show Interlaced Video",
521       "When enabled, games that run in high resolution video modes (480i, 512i) will produced interlaced video output. While this displays correctly on CRT televisions, it will produce artifacts on modern displays. When disabled, all video is output in progressive format. Note: there are games that will glitch is this is off.",
522       NULL,
523       "gpu_neon",
524       {
525          { "auto", NULL },
526          { "disabled", NULL },
527          { "enabled",  NULL },
528          { NULL, NULL },
529       },
530       "auto",
531    },
532    {
533       "pcsx_rearmed_neon_enhancement_enable",
534       "(GPU) Enhanced Resolution",
535       "Enhanced Resolution",
536       "Render games that do not already run in high resolution video modes (480i, 512i) at twice the native internal resolution. Improves the fidelity of 3D models at the expense of increased performance requirements. 2D elements are generally unaffected by this setting.",
537       NULL,
538       "gpu_neon",
539       {
540          { "disabled", NULL },
541          { "enabled",  NULL },
542          { NULL, NULL },
543       },
544       "disabled",
545    },
546    {
547       "pcsx_rearmed_neon_enhancement_no_main",
548       "(GPU) Enhanced Resolution Speed Hack",
549       "Enhanced Resolution Speed Hack",
550       "('Enhanced Resolution' Hack) Improves performance but reduces compatibility and may cause rendering errors.",
551       NULL,
552       "gpu_neon",
553       {
554          { "disabled", NULL },
555          { "enabled",  NULL },
556          { NULL, NULL },
557       },
558       "disabled",
559    },
560    {
561       "pcsx_rearmed_neon_enhancement_tex_adj",
562       "(GPU) Enhanced Resolution Texture Adjustment",
563       "Enhanced Resolution Texture Adjustment",
564       "('Enhanced Resolution' Hack) Attempts to solve some texturing issues in some games, but causes new ones in others.",
565       NULL,
566       "gpu_neon",
567       {
568          { "disabled", NULL },
569          { "enabled",  NULL },
570          { NULL, NULL },
571       },
572       "disabled",
573    },
574 #endif /* GPU_NEON */
575 #ifdef GPU_PEOPS
576    {
577       "pcsx_rearmed_show_gpu_peops_settings",
578       "Show Advanced P.E.Op.S. GPU Settings",
579       NULL,
580       "Show low-level configuration options for the P.E.Op.S. GPU plugin. Quick Menu may need to be toggled for this setting to take effect.",
581       NULL,
582       NULL,
583       {
584          { "disabled", NULL },
585          { "enabled",  NULL },
586          { NULL, NULL },
587       },
588       "disabled",
589    },
590    {
591       "pcsx_rearmed_gpu_peops_odd_even_bit",
592       "(GPU) Odd/Even Bit Hack",
593       "Odd/Even Bit Hack",
594       "A hack fix used to correct lock-ups that may occur in games such as Chrono Cross. Disable unless required.",
595       NULL,
596       "gpu_peops",
597       {
598          { "disabled", NULL },
599          { "enabled",  NULL },
600          { NULL, NULL },
601       },
602       "disabled",
603    },
604    {
605       "pcsx_rearmed_gpu_peops_expand_screen_width",
606       "(GPU) Expand Screen Width",
607       "Expand Screen Width",
608       "Intended for use only with Capcom 2D fighting games. Enlarges the display area at the right side of the screen to show all background elements without cut-off. May cause rendering errors.",
609       NULL,
610       "gpu_peops",
611       {
612          { "disabled", NULL },
613          { "enabled",  NULL },
614          { NULL, NULL },
615       },
616       "disabled",
617    },
618    {
619       "pcsx_rearmed_gpu_peops_ignore_brightness",
620       "(GPU) Ignore Brightness Color",
621       "Ignore Brightness Color",
622       "A hack fix used to repair black screens in Lunar Silver Star Story Complete when entering a house or a menu. Disable unless required.",
623       NULL,
624       "gpu_peops",
625       {
626          { "disabled", NULL },
627          { "enabled",  NULL },
628          { NULL, NULL },
629       },
630       "disabled",
631    },
632    {
633       "pcsx_rearmed_gpu_peops_disable_coord_check",
634       "(GPU) Disable Coordinate Check",
635       "Disable Coordinate Check",
636       "Legacy compatibility mode. May improve games that fail to run correctly on newer GPU hardware. Disable unless required.",
637       NULL,
638       "gpu_peops",
639       {
640          { "disabled", NULL },
641          { "enabled",  NULL },
642          { NULL, NULL },
643       },
644       "disabled",
645    },
646    {
647       "pcsx_rearmed_gpu_peops_lazy_screen_update",
648       "(GPU) Lazy Screen Update",
649       "Lazy Screen Update",
650       "A partial fix to prevent text box flickering in Dragon Warrior VII. May also improve Pandemonium 2. Disable unless required.",
651       NULL,
652       "gpu_peops",
653       {
654          { "disabled", NULL },
655          { "enabled",  NULL },
656          { NULL, NULL },
657       },
658       "disabled",
659    },
660    {
661       "pcsx_rearmed_gpu_peops_repeated_triangles",
662       "(GPU) Repeat Flat Tex Triangles",
663       "Repeat Flat Tex Triangles",
664       "A hack fix used to correct rendering errors in Star Wars: Dark Forces. Disable unless required.",
665       NULL,
666       "gpu_peops",
667       {
668          { "disabled", NULL },
669          { "enabled",  NULL },
670          { NULL, NULL },
671       },
672       "disabled",
673    },
674    {
675       "pcsx_rearmed_gpu_peops_quads_with_triangles",
676       "(GPU) Draw Tex-Quads as Triangles",
677       "Draw Tex-Quads as Triangles",
678       "Corrects graphical distortions that may occur when games utilize Gouraud Shading, at the expense of reduced texture quality. Disable unless required.",
679       NULL,
680       "gpu_peops",
681       {
682          { "disabled", NULL },
683          { "enabled",  NULL },
684          { NULL, NULL },
685       },
686       "disabled",
687    },
688    {
689       "pcsx_rearmed_gpu_peops_fake_busy_state",
690       "(GPU) Fake 'GPU Busy' States",
691       "Fake 'GPU Busy' States",
692       "Emulate the 'GPU is busy' (drawing primitives) status flag of the original hardware instead of assuming the GPU is always ready for commands. May improve compatibility at the expense of reduced performance. Disable unless required.",
693       NULL,
694       "gpu_peops",
695       {
696          { "disabled", NULL },
697          { "enabled",  NULL },
698          { NULL, NULL },
699       },
700       "disabled",
701    },
702 #endif /* GPU_PEOPS */
703 #ifdef GPU_UNAI
704    {
705       "pcsx_rearmed_show_gpu_unai_settings",
706       "Show Advanced UNAI GPU Settings",
707       NULL,
708       "Show low-level configuration options for the UNAI GPU plugin. Quick Menu may need to be toggled for this setting to take effect.",
709       NULL,
710       NULL,
711       {
712          { "disabled", NULL },
713          { "enabled",  NULL },
714          { NULL, NULL},
715       },
716       "disabled",
717    },
718    {
719       "pcsx_rearmed_gpu_unai_blending",
720       "(GPU) Texture Blending",
721       "Texture Blending",
722       "Enable alpha-based (and additive) texture blending. Required for various rendering effects, including transparency (e.g. water, shadows). Can be disabled to improve performance at the expense of severe display errors/inaccuracies.",
723       NULL,
724       "gpu_unai",
725       {
726          { "disabled", NULL },
727          { "enabled",  NULL },
728          { NULL, NULL},
729       },
730       "enabled",
731    },
732    {
733       "pcsx_rearmed_gpu_unai_lighting",
734       "(GPU) Lighting Effects",
735       "Lighting Effects",
736       "Enable simulated lighting effects (via vertex coloring combined with texture mapping). Required by almost all 3D games. Can be disabled to improve performance at the expense of severe display errors/inaccuracies (missing shadows, flat textures, etc.).",
737       NULL,
738       "gpu_unai",
739       {
740          { "disabled", NULL },
741          { "enabled",  NULL },
742          { NULL, NULL},
743       },
744       "enabled",
745    },
746    {
747       "pcsx_rearmed_gpu_unai_fast_lighting",
748       "(GPU) Fast Lighting",
749       "Fast Lighting",
750       "Improves performance when 'Lighting Effects' are enabled, but may cause moderate/severe rendering errors.",
751       NULL,
752       "gpu_unai",
753       {
754          { "disabled", NULL },
755          { "enabled",  NULL },
756          { NULL, NULL},
757       },
758       "disabled",
759    },
760    {
761       "pcsx_rearmed_gpu_unai_scale_hires",
762       "(GPU) Hi-Res Downscaling",
763       "Hi-Res Downscaling",
764       "When enabled, games that run in high resolution video modes (480i, 512i) will be downscaled to 320x240. Can improve performance, and is recommended on devices with native 240p display resolutions.",
765       NULL,
766       "gpu_unai",
767       {
768          { "disabled", NULL },
769          { "enabled",  NULL },
770          { NULL, NULL},
771       },
772 #ifdef _MIYOO
773       "enabled",
774 #else
775       "disabled",
776 #endif
777    },
778 #endif /* GPU_UNAI */
779    {
780       "pcsx_rearmed_spu_reverb",
781       "Audio Reverb Effects",
782       "Reverb Effects",
783       "Enable emulation of the reverb feature provided by the PSX SPU. Can be disabled to improve performance at the expense of reduced audio quality/authenticity.",
784       NULL,
785       "audio",
786       {
787          { "disabled", NULL },
788          { "enabled",  NULL },
789          { NULL, NULL },
790       },
791 #ifdef HAVE_PRE_ARMV7
792       "disabled",
793 #else
794       "enabled",
795 #endif
796    },
797    {
798       "pcsx_rearmed_spu_interpolation",
799       "Sound Interpolation",
800       NULL,
801       "Enable emulation of the in-built audio interpolation provided by the PSX SPU. 'Gaussian' sounds closest to original hardware. 'Simple' improves performance but reduces quality. 'Cubic' has the highest performance requirements but produces increased clarity. Can be disabled entirely for maximum performance, at the expense of greatly reduced audio quality.",
802       NULL,
803       "audio",
804       {
805          { "simple",   "Simple" },
806          { "gaussian", "Gaussian" },
807          { "cubic",    "Cubic" },
808          { "off",      "disabled" },
809          { NULL, NULL },
810       },
811 #ifdef HAVE_PRE_ARMV7
812       "off",
813 #else
814       "simple",
815 #endif
816    },
817    {
818       "pcsx_rearmed_nocdaudio",
819       "CD Audio",
820       NULL,
821       "Enable playback of CD (CD-DA) audio tracks. Can be disabled to improve performance in games that include CD audio, at the expense of missing music.",
822       NULL,
823       "audio",
824       {
825          { "disabled", NULL },
826          { "enabled",  NULL },
827          { NULL, NULL },
828       },
829       "enabled",
830    },
831    {
832       "pcsx_rearmed_noxadecoding",
833       "XA Decoding",
834       NULL,
835       "Enable playback of XA (eXtended Architecture ADPCM) audio tracks. Can be disabled to improve performance in games that include XA audio, at the expense of missing music.",
836       NULL,
837       "audio",
838       {
839          { "disabled", NULL },
840          { "enabled",  NULL },
841          { NULL, NULL },
842       },
843       "enabled",
844    },
845 #if P_HAVE_PTHREAD
846    {
847       "pcsx_rearmed_spu_thread",
848       "Threaded SPU",
849       NULL,
850       "Emulates the PSX SPU on another CPU thread. May cause audio glitches in some games.",
851       NULL,
852       "audio",
853       {
854          { "disabled", NULL },
855          { "enabled",  NULL },
856          { NULL, NULL },
857       },
858       "disabled",
859    },
860 #endif // P_HAVE_PTHREAD
861    {
862       "pcsx_rearmed_show_input_settings",
863       "Show Input Settings",
864       NULL,
865       "Show configuration options for all input devices: analog response, Multitaps, light guns, etc. Quick Menu may need to be toggled for this setting to take effect.",
866       NULL,
867       NULL,
868       {
869          { "disabled", NULL },
870          { "enabled",  NULL },
871          { NULL, NULL },
872       },
873       "disabled",
874    },
875    {
876       "pcsx_rearmed_analog_axis_modifier",
877       "Analog Axis Bounds",
878       NULL,
879       "Specify range limits for the left and right analog sticks when input device is set to 'analog' or 'dualshock'. 'Square' bounds improve input response when using controllers with highly circular ranges that are unable to fully saturate the X and Y axes at 45 degree deflections.",
880       NULL,
881       "input",
882       {
883          { "circle", "Circle" },
884          { "square", "Square" },
885          { NULL, NULL },
886       },
887       "circle",
888    },
889    {
890       "pcsx_rearmed_vibration",
891       "Rumble Effects",
892       NULL,
893       "Enable haptic feedback when using a rumble-equipped gamepad with input device set to 'dualshock'.",
894       NULL,
895       "input",
896       {
897          { "disabled", NULL },
898          { "enabled",  NULL },
899          { NULL, NULL },
900       },
901       "enabled",
902    },
903    {
904       "pcsx_rearmed_analog_combo",
905       "DualShock Analog Mode Toggle Key Combo",
906       NULL,
907       "When the input device type is DualShock, this option allows the emulated DualShock to be toggled between DIGITAL and ANALOG mode like original hardware. You can select the button combination for this.",
908       NULL,
909       "input",
910       {
911          { "disabled", NULL },
912          { "l1+r1+select",             "L1 + R1 + Select" },
913          { "l1+r1+start",              "L1 + R1 + Start" },
914          { "l1+r1+l3",                 "L1 + R1 + L3" },
915          { "l1+r1+r3",                 "L1 + R1 + R3" },
916          { "l3+r3",                    "L3 + R3" },
917          { NULL, NULL },
918       },
919       "l1+r1+select"
920    },
921    {
922       "pcsx_rearmed_multitap",
923       "Multitap Mode",
924       NULL,
925       "Connect a virtual PSX Multitap peripheral to either controller 'Port 1' or controller 'Port 2' for 5 player simultaneous input, or to both 'Ports 1 and 2' for 8 player input. Mutlitap usage requires compatible games.",
926       NULL,
927       "input",
928       {
929          { "disabled",      NULL },
930          { "port 1",        "Port 1" },
931          { "port 2",        "Port 2" },
932          { "ports 1 and 2", "Ports 1 and 2" },
933          { NULL, NULL },
934       },
935       "disabled",
936    },
937    {
938       "pcsx_rearmed_negcon_deadzone",
939       "NegCon Twist Deadzone",
940       NULL,
941       "Set the deadzone of the RetroPad left analog stick when simulating the 'twist' action of emulated neGcon Controllers. Used to eliminate drift/unwanted input.",
942       NULL,
943       "input",
944       {
945          { "0",  "0%" },
946          { "3",  "3%" },
947          { "5",  "5%" },
948          { "7",  "7%" },
949          { "10", "10%" },
950          { "13", "13%" },
951          { "15", "15%" },
952          { "17", "17%" },
953          { "20", "20%" },
954          { "23", "23%" },
955          { "25", "25%" },
956          { "27", "27%" },
957          { "30", "30%" },
958          { NULL, NULL },
959       },
960       "0",
961    },
962    {
963       "pcsx_rearmed_negcon_response",
964       "NegCon Twist Response",
965       NULL,
966       "Specify the analog response when using a RetroPad left analog stick to simulate the 'twist' action of emulated neGcon Controllers.",
967       NULL,
968       "input",
969       {
970          { "linear",    "Linear" },
971          { "quadratic", "Quadratic" },
972          { "cubic",     "Cubic" },
973          { NULL, NULL },
974       },
975       "linear",
976    },
977    {
978       "pcsx_rearmed_input_sensitivity",
979       "Mouse Sensitivity",
980       NULL,
981       "Adjust responsiveness of emulated 'mouse' input devices.",
982       NULL,
983       "input",
984       {
985          { "0.05", NULL },
986          { "0.10", NULL },
987          { "0.15", NULL },
988          { "0.20", NULL },
989          { "0.25", NULL },
990          { "0.30", NULL },
991          { "0.35", NULL },
992          { "0.40", NULL },
993          { "0.45", NULL },
994          { "0.50", NULL },
995          { "0.55", NULL },
996          { "0.60", NULL },
997          { "0.65", NULL },
998          { "0.70", NULL },
999          { "0.75", NULL },
1000          { "0.80", NULL },
1001          { "0.85", NULL },
1002          { "0.90", NULL },
1003          { "0.95", NULL },
1004          { "1.00", NULL },
1005          { "1.05", NULL },
1006          { "1.10", NULL },
1007          { "1.15", NULL },
1008          { "1.20", NULL },
1009          { "1.25", NULL },
1010          { "1.30", NULL },
1011          { "1.35", NULL },
1012          { "1.40", NULL },
1013          { "1.45", NULL },
1014          { "1.50", NULL },
1015          { "1.55", NULL },
1016          { "1.60", NULL },
1017          { "1.65", NULL },
1018          { "1.70", NULL },
1019          { "1.75", NULL },
1020          { "1.80", NULL },
1021          { "1.85", NULL },
1022          { "1.90", NULL },
1023          { "1.95", NULL },
1024          { "2.00", NULL },
1025       },
1026       "1.00",
1027    },
1028    {
1029       "pcsx_rearmed_crosshair1",
1030       "Player 1 Lightgun Crosshair",
1031       NULL,
1032       "Toggle player 1's crosshair for the Guncon or Konami Gun",
1033       NULL,
1034       "input",
1035       {
1036          { "disabled", NULL },
1037          { "blue",  NULL },
1038          { "green",  NULL },
1039          { "red",  NULL },
1040          { "white",  NULL },
1041          { NULL, NULL },
1042       },
1043       "disabled",
1044    },
1045    {
1046       "pcsx_rearmed_crosshair2",
1047       "Player 2 Lightgun Crosshair",
1048       NULL,
1049       "Toggle player 2's crosshair for the Guncon or Konami Gun",
1050       NULL,
1051       "input",
1052       {
1053          { "disabled", NULL },
1054          { "blue",  NULL },
1055          { "green",  NULL },
1056          { "red",  NULL },
1057          { "white",  NULL },
1058          { NULL, NULL },
1059       },
1060       "disabled",
1061    },
1062    {
1063       "pcsx_rearmed_konamigunadjustx",
1064       "Konami Gun X Axis Offset",
1065       NULL,
1066       "Apply an X axis offset to light gun input when emulating a Konami Gun (Hyper Blaster / Justifier) device. Can be used to correct aiming misalignments.",
1067       NULL,
1068       "input",
1069       {
1070          { "-40", NULL },
1071          { "-39", NULL },
1072          { "-38", NULL },
1073          { "-37", NULL },
1074          { "-36", NULL },
1075          { "-35", NULL },
1076          { "-34", NULL },
1077          { "-33", NULL },
1078          { "-32", NULL },
1079          { "-31", NULL },
1080          { "-30", NULL },
1081          { "-29", NULL },
1082          { "-28", NULL },
1083          { "-27", NULL },
1084          { "-26", NULL },
1085          { "-25", NULL },
1086          { "-24", NULL },
1087          { "-23", NULL },
1088          { "-22", NULL },
1089          { "-21", NULL },
1090          { "-20", NULL },
1091          { "-19", NULL },
1092          { "-18", NULL },
1093          { "-17", NULL },
1094          { "-16", NULL },
1095          { "-15", NULL },
1096          { "-14", NULL },
1097          { "-13", NULL },
1098          { "-12", NULL },
1099          { "-11", NULL },
1100          { "-10", NULL },
1101          { "-9",  NULL },
1102          { "-8",  NULL },
1103          { "-7",  NULL },
1104          { "-6",  NULL },
1105          { "-5",  NULL },
1106          { "-4",  NULL },
1107          { "-3",  NULL },
1108          { "-2",  NULL },
1109          { "-1",  NULL },
1110          { "0",   NULL },
1111          { "1",   NULL },
1112          { "2",   NULL },
1113          { "3",   NULL },
1114          { "4",   NULL },
1115          { "5",   NULL },
1116          { "6",   NULL },
1117          { "7",   NULL },
1118          { "8",   NULL },
1119          { "9",   NULL },
1120          { "10",  NULL },
1121          { "11",  NULL },
1122          { "12",  NULL },
1123          { "13",  NULL },
1124          { "14",  NULL },
1125          { "15",  NULL },
1126          { "16",  NULL },
1127          { "17",  NULL },
1128          { "18",  NULL },
1129          { "19",  NULL },
1130          { "20",  NULL },
1131          { "21",  NULL },
1132          { "22",  NULL },
1133          { "23",  NULL },
1134          { "24",  NULL },
1135          { "25",  NULL },
1136          { "26",  NULL },
1137          { "27",  NULL },
1138          { "28",  NULL },
1139          { "29",  NULL },
1140          { "30",  NULL },
1141          { "31",  NULL },
1142          { "32",  NULL },
1143          { "33",  NULL },
1144          { "34",  NULL },
1145          { "35",  NULL },
1146          { "36",  NULL },
1147          { "37",  NULL },
1148          { "38",  NULL },
1149          { "39",  NULL },
1150          { "40",  NULL },
1151          { NULL, NULL },
1152       },
1153       "0",
1154    },
1155    {
1156       "pcsx_rearmed_konamigunadjusty",
1157       "Konami Gun Y Axis Offset",
1158       NULL,
1159       "Apply a Y axis offset to light gun input when emulating a Konami Gun (Hyper Blaster / Justifier) device. Can be used to correct aiming misalignments.",
1160       NULL,
1161       "input",
1162       {
1163          { "-40", NULL },
1164          { "-39", NULL },
1165          { "-38", NULL },
1166          { "-37", NULL },
1167          { "-36", NULL },
1168          { "-35", NULL },
1169          { "-34", NULL },
1170          { "-33", NULL },
1171          { "-32", NULL },
1172          { "-31", NULL },
1173          { "-30", NULL },
1174          { "-29", NULL },
1175          { "-28", NULL },
1176          { "-27", NULL },
1177          { "-26", NULL },
1178          { "-25", NULL },
1179          { "-24", NULL },
1180          { "-23", NULL },
1181          { "-22", NULL },
1182          { "-21", NULL },
1183          { "-20", NULL },
1184          { "-19", NULL },
1185          { "-18", NULL },
1186          { "-17", NULL },
1187          { "-16", NULL },
1188          { "-15", NULL },
1189          { "-14", NULL },
1190          { "-13", NULL },
1191          { "-12", NULL },
1192          { "-11", NULL },
1193          { "-10", NULL },
1194          { "-9",  NULL },
1195          { "-8",  NULL },
1196          { "-7",  NULL },
1197          { "-6",  NULL },
1198          { "-5",  NULL },
1199          { "-4",  NULL },
1200          { "-3",  NULL },
1201          { "-2",  NULL },
1202          { "-1",  NULL },
1203          { "0",   NULL },
1204          { "1",   NULL },
1205          { "2",   NULL },
1206          { "3",   NULL },
1207          { "4",   NULL },
1208          { "5",   NULL },
1209          { "6",   NULL },
1210          { "7",   NULL },
1211          { "8",   NULL },
1212          { "9",   NULL },
1213          { "10",  NULL },
1214          { "11",  NULL },
1215          { "12",  NULL },
1216          { "13",  NULL },
1217          { "14",  NULL },
1218          { "15",  NULL },
1219          { "16",  NULL },
1220          { "17",  NULL },
1221          { "18",  NULL },
1222          { "19",  NULL },
1223          { "20",  NULL },
1224          { "21",  NULL },
1225          { "22",  NULL },
1226          { "23",  NULL },
1227          { "24",  NULL },
1228          { "25",  NULL },
1229          { "26",  NULL },
1230          { "27",  NULL },
1231          { "28",  NULL },
1232          { "29",  NULL },
1233          { "30",  NULL },
1234          { "31",  NULL },
1235          { "32",  NULL },
1236          { "33",  NULL },
1237          { "34",  NULL },
1238          { "35",  NULL },
1239          { "36",  NULL },
1240          { "37",  NULL },
1241          { "38",  NULL },
1242          { "39",  NULL },
1243          { "40",  NULL },
1244          { NULL, NULL },
1245       },
1246       "0",
1247    },
1248    {
1249       "pcsx_rearmed_gunconadjustx",
1250       "Guncon X Axis Offset",
1251       NULL,
1252       "Apply an X axis offset to light gun input when emulating a Guncon device. Can be used to correct aiming misalignments.",
1253       NULL,
1254       "input",
1255       {
1256          { "-40", NULL },
1257          { "-39", NULL },
1258          { "-38", NULL },
1259          { "-37", NULL },
1260          { "-36", NULL },
1261          { "-35", NULL },
1262          { "-34", NULL },
1263          { "-33", NULL },
1264          { "-32", NULL },
1265          { "-31", NULL },
1266          { "-30", NULL },
1267          { "-29", NULL },
1268          { "-28", NULL },
1269          { "-27", NULL },
1270          { "-26", NULL },
1271          { "-25", NULL },
1272          { "-24", NULL },
1273          { "-23", NULL },
1274          { "-22", NULL },
1275          { "-21", NULL },
1276          { "-20", NULL },
1277          { "-19", NULL },
1278          { "-18", NULL },
1279          { "-17", NULL },
1280          { "-16", NULL },
1281          { "-15", NULL },
1282          { "-14", NULL },
1283          { "-13", NULL },
1284          { "-12", NULL },
1285          { "-11", NULL },
1286          { "-10", NULL },
1287          { "-9",  NULL },
1288          { "-8",  NULL },
1289          { "-7",  NULL },
1290          { "-6",  NULL },
1291          { "-5",  NULL },
1292          { "-4",  NULL },
1293          { "-3",  NULL },
1294          { "-2",  NULL },
1295          { "-1",  NULL },
1296          { "0",   NULL },
1297          { "1",   NULL },
1298          { "2",   NULL },
1299          { "3",   NULL },
1300          { "4",   NULL },
1301          { "5",   NULL },
1302          { "6",   NULL },
1303          { "7",   NULL },
1304          { "8",   NULL },
1305          { "9",   NULL },
1306          { "10",  NULL },
1307          { "11",  NULL },
1308          { "12",  NULL },
1309          { "13",  NULL },
1310          { "14",  NULL },
1311          { "15",  NULL },
1312          { "16",  NULL },
1313          { "17",  NULL },
1314          { "18",  NULL },
1315          { "19",  NULL },
1316          { "20",  NULL },
1317          { "21",  NULL },
1318          { "22",  NULL },
1319          { "23",  NULL },
1320          { "24",  NULL },
1321          { "25",  NULL },
1322          { "26",  NULL },
1323          { "27",  NULL },
1324          { "28",  NULL },
1325          { "29",  NULL },
1326          { "30",  NULL },
1327          { "31",  NULL },
1328          { "32",  NULL },
1329          { "33",  NULL },
1330          { "34",  NULL },
1331          { "35",  NULL },
1332          { "36",  NULL },
1333          { "37",  NULL },
1334          { "38",  NULL },
1335          { "39",  NULL },
1336          { "40",  NULL },
1337          { NULL, NULL },
1338       },
1339       "0",
1340    },
1341    {
1342       "pcsx_rearmed_gunconadjusty",
1343       "Guncon Y Axis Offset",
1344       NULL,
1345       "Apply a Y axis offset to light gun input when emulating a Guncon device. Can be used to correct aiming misalignments.",
1346       NULL,
1347       "input",
1348       {
1349          { "-40", NULL },
1350          { "-39", NULL },
1351          { "-38", NULL },
1352          { "-37", NULL },
1353          { "-36", NULL },
1354          { "-35", NULL },
1355          { "-34", NULL },
1356          { "-33", NULL },
1357          { "-32", NULL },
1358          { "-31", NULL },
1359          { "-30", NULL },
1360          { "-29", NULL },
1361          { "-28", NULL },
1362          { "-27", NULL },
1363          { "-26", NULL },
1364          { "-25", NULL },
1365          { "-24", NULL },
1366          { "-23", NULL },
1367          { "-22", NULL },
1368          { "-21", NULL },
1369          { "-20", NULL },
1370          { "-19", NULL },
1371          { "-18", NULL },
1372          { "-17", NULL },
1373          { "-16", NULL },
1374          { "-15", NULL },
1375          { "-14", NULL },
1376          { "-13", NULL },
1377          { "-12", NULL },
1378          { "-11", NULL },
1379          { "-10", NULL },
1380          { "-9",  NULL },
1381          { "-8",  NULL },
1382          { "-7",  NULL },
1383          { "-6",  NULL },
1384          { "-5",  NULL },
1385          { "-4",  NULL },
1386          { "-3",  NULL },
1387          { "-2",  NULL },
1388          { "-1",  NULL },
1389          { "0",   NULL },
1390          { "1",   NULL },
1391          { "2",   NULL },
1392          { "3",   NULL },
1393          { "4",   NULL },
1394          { "5",   NULL },
1395          { "6",   NULL },
1396          { "7",   NULL },
1397          { "8",   NULL },
1398          { "9",   NULL },
1399          { "10",  NULL },
1400          { "11",  NULL },
1401          { "12",  NULL },
1402          { "13",  NULL },
1403          { "14",  NULL },
1404          { "15",  NULL },
1405          { "16",  NULL },
1406          { "17",  NULL },
1407          { "18",  NULL },
1408          { "19",  NULL },
1409          { "20",  NULL },
1410          { "21",  NULL },
1411          { "22",  NULL },
1412          { "23",  NULL },
1413          { "24",  NULL },
1414          { "25",  NULL },
1415          { "26",  NULL },
1416          { "27",  NULL },
1417          { "28",  NULL },
1418          { "29",  NULL },
1419          { "30",  NULL },
1420          { "31",  NULL },
1421          { "32",  NULL },
1422          { "33",  NULL },
1423          { "34",  NULL },
1424          { "35",  NULL },
1425          { "36",  NULL },
1426          { "37",  NULL },
1427          { "38",  NULL },
1428          { "39",  NULL },
1429          { "40",  NULL },
1430          { NULL, NULL },
1431       },
1432       "0",
1433    },
1434    {
1435       "pcsx_rearmed_gunconadjustratiox",
1436       "Guncon X Axis Response",
1437       NULL,
1438       "Adjust relative magnitude of horizontal light gun motion when emulating a Guncon device. Can be used to correct aiming misalignments.",
1439       NULL,
1440       "input",
1441       {
1442          { "0.75", NULL },
1443          { "0.76", NULL },
1444          { "0.77", NULL },
1445          { "0.78", NULL },
1446          { "0.79", NULL },
1447          { "0.80", NULL },
1448          { "0.81", NULL },
1449          { "0.82", NULL },
1450          { "0.83", NULL },
1451          { "0.84", NULL },
1452          { "0.85", NULL },
1453          { "0.86", NULL },
1454          { "0.87", NULL },
1455          { "0.88", NULL },
1456          { "0.89", NULL },
1457          { "0.90", NULL },
1458          { "0.91", NULL },
1459          { "0.92", NULL },
1460          { "0.93", NULL },
1461          { "0.94", NULL },
1462          { "0.95", NULL },
1463          { "0.96", NULL },
1464          { "0.97", NULL },
1465          { "0.98", NULL },
1466          { "0.99", NULL },
1467          { "1.00", NULL },
1468          { "1.01", NULL },
1469          { "1.02", NULL },
1470          { "1.03", NULL },
1471          { "1.04", NULL },
1472          { "1.05", NULL },
1473          { "1.06", NULL },
1474          { "1.07", NULL },
1475          { "1.08", NULL },
1476          { "1.09", NULL },
1477          { "1.10", NULL },
1478          { "1.11", NULL },
1479          { "1.12", NULL },
1480          { "1.13", NULL },
1481          { "1.14", NULL },
1482          { "1.15", NULL },
1483          { "1.16", NULL },
1484          { "1.17", NULL },
1485          { "1.18", NULL },
1486          { "1.19", NULL },
1487          { "1.20", NULL },
1488          { "1.21", NULL },
1489          { "1.22", NULL },
1490          { "1.23", NULL },
1491          { "1.24", NULL },
1492          { "1.25", NULL },
1493          { NULL, NULL },
1494       },
1495       "1.00",
1496    },
1497    {
1498       "pcsx_rearmed_gunconadjustratioy",
1499       "Guncon Y Axis Response",
1500       NULL,
1501       "Adjust relative magnitude of vertical light gun motion when emulating a Guncon device. Can be used to correct aiming misalignments.",
1502       NULL,
1503       "input",
1504       {
1505          { "0.75", NULL },
1506          { "0.76", NULL },
1507          { "0.77", NULL },
1508          { "0.78", NULL },
1509          { "0.79", NULL },
1510          { "0.80", NULL },
1511          { "0.81", NULL },
1512          { "0.82", NULL },
1513          { "0.83", NULL },
1514          { "0.84", NULL },
1515          { "0.85", NULL },
1516          { "0.86", NULL },
1517          { "0.87", NULL },
1518          { "0.88", NULL },
1519          { "0.89", NULL },
1520          { "0.90", NULL },
1521          { "0.91", NULL },
1522          { "0.92", NULL },
1523          { "0.93", NULL },
1524          { "0.94", NULL },
1525          { "0.95", NULL },
1526          { "0.96", NULL },
1527          { "0.97", NULL },
1528          { "0.98", NULL },
1529          { "0.99", NULL },
1530          { "1.00", NULL },
1531          { "1.01", NULL },
1532          { "1.02", NULL },
1533          { "1.03", NULL },
1534          { "1.04", NULL },
1535          { "1.05", NULL },
1536          { "1.06", NULL },
1537          { "1.07", NULL },
1538          { "1.08", NULL },
1539          { "1.09", NULL },
1540          { "1.10", NULL },
1541          { "1.11", NULL },
1542          { "1.12", NULL },
1543          { "1.13", NULL },
1544          { "1.14", NULL },
1545          { "1.15", NULL },
1546          { "1.16", NULL },
1547          { "1.17", NULL },
1548          { "1.18", NULL },
1549          { "1.19", NULL },
1550          { "1.20", NULL },
1551          { "1.21", NULL },
1552          { "1.22", NULL },
1553          { "1.23", NULL },
1554          { "1.24", NULL },
1555          { "1.25", NULL },
1556          { NULL, NULL },
1557       },
1558       "1.00",
1559    },
1560    {
1561       "pcsx_rearmed_icache_emulation",
1562       "Instruction Cache Emulation",
1563       NULL,
1564       "Enable emulation of the PSX CPU instruction cache. Improves accuracy at the expense of increased performance overheads. Required for Formula One 2001, Formula One Arcade and Formula One 99. [Interpreter only; partial on lightrec and ARM dynarecs]",
1565       NULL,
1566       "compat_hack",
1567       {
1568          { "enabled",  NULL },
1569          { "disabled", NULL },
1570          { NULL, NULL },
1571       },
1572       "enabled",
1573    },
1574    {
1575       "pcsx_rearmed_exception_emulation",
1576       "Exception and Breakpoint Emulation",
1577       NULL,
1578       "Enable emulation of some almost never used PSX's debug features. This causes a performance hit, is not useful for games and is intended for PSX homebrew and romhack developers only. Only enable if you know what you are doing. [Interpreter only]",
1579       NULL,
1580       "compat_hack",
1581       {
1582          { "disabled", NULL },
1583          { "enabled",  NULL },
1584          { NULL, NULL },
1585       },
1586       "disabled",
1587    },
1588    {
1589       "pcsx_rearmed_cd_turbo",
1590       "Turbo CD",
1591       NULL,
1592       "This makes the emulated CD-ROM extremely fast and can reduce loading times in some cases. Warning: many games were not programmed to handle such a speed. The game (or even the emulator) MAY CRASH at ANY TIME if this is enabled.",
1593       NULL,
1594       "speed_hack",
1595       {
1596          { "disabled", NULL },
1597          { "enabled",  NULL },
1598          { NULL, NULL },
1599       },
1600       "disabled",
1601    },
1602 #if !defined(DRC_DISABLE) && !defined(LIGHTREC)
1603    {
1604       "pcsx_rearmed_nocompathacks",
1605       "Disable Automatic Compatibility Hacks",
1606       NULL,
1607       "By default, PCSX-ReARMed will apply auxiliary compatibility hacks automatically, based on the currently loaded content. This behaviour is required for correct operation, but may be disabled if desired.",
1608       NULL,
1609       "compat_hack",
1610       {
1611          { "disabled", NULL },
1612          { "enabled",  NULL },
1613          { NULL, NULL },
1614       },
1615       "disabled",
1616    },
1617    {
1618       "pcsx_rearmed_nosmccheck",
1619       "(Speed Hack) Disable SMC Checks",
1620       "Disable SMC Checks",
1621       "Will cause crashes when loading, and lead to memory card failure.",
1622       NULL,
1623       "speed_hack",
1624       {
1625          { "disabled", NULL },
1626          { "enabled",  NULL },
1627          { NULL, NULL },
1628       },
1629       "disabled",
1630    },
1631    {
1632       "pcsx_rearmed_gteregsunneeded",
1633       "(Speed Hack) Assume GTE Registers Unneeded",
1634       "Assume GTE Registers Unneeded",
1635       "May cause rendering errors.",
1636       NULL,
1637       "speed_hack",
1638       {
1639          { "disabled", NULL },
1640          { "enabled",  NULL },
1641          { NULL, NULL },
1642       },
1643       "disabled",
1644    },
1645    {
1646       "pcsx_rearmed_nogteflags",
1647       "(Speed Hack) Disable GTE Flags",
1648       "Disable GTE Flags",
1649       "Will cause rendering errors.",
1650       NULL,
1651       "speed_hack",
1652       {
1653          { "disabled", NULL },
1654          { "enabled",  NULL },
1655          { NULL, NULL },
1656       },
1657       "disabled",
1658    },
1659 #endif /* !DRC_DISABLE && !LIGHTREC */
1660    {
1661       "pcsx_rearmed_nostalls",
1662       "Disable CPU/GTE Stalls",
1663       NULL,
1664       "Will cause some games to run too quickly. Should be disabled in almost all cases."
1665 #if defined(LIGHTREC)
1666       " Interpreter only."
1667 #endif
1668       ,
1669       NULL,
1670       "speed_hack",
1671       {
1672          { "disabled", NULL },
1673          { "enabled",  NULL },
1674          { NULL, NULL },
1675       },
1676       "disabled",
1677    },
1678    { NULL, NULL, NULL, NULL, NULL, NULL, {{0}}, NULL },
1679 };
1680
1681 struct retro_core_options_v2 options_us = {
1682    option_cats_us,
1683    option_defs_us
1684 };
1685
1686 /*
1687  ********************************
1688  * Language Mapping
1689  ********************************
1690 */
1691
1692 #ifndef HAVE_NO_LANGEXTRA
1693 struct retro_core_options_v2 *options_intl[RETRO_LANGUAGE_LAST] = {
1694    &options_us, /* RETRO_LANGUAGE_ENGLISH */
1695    NULL,        /* RETRO_LANGUAGE_JAPANESE */
1696    NULL,        /* RETRO_LANGUAGE_FRENCH */
1697    NULL,        /* RETRO_LANGUAGE_SPANISH */
1698    NULL,        /* RETRO_LANGUAGE_GERMAN */
1699    NULL,        /* RETRO_LANGUAGE_ITALIAN */
1700    NULL,        /* RETRO_LANGUAGE_DUTCH */
1701    NULL,        /* RETRO_LANGUAGE_PORTUGUESE_BRAZIL */
1702    NULL,        /* RETRO_LANGUAGE_PORTUGUESE_PORTUGAL */
1703    NULL,        /* RETRO_LANGUAGE_RUSSIAN */
1704    NULL,        /* RETRO_LANGUAGE_KOREAN */
1705    NULL,        /* RETRO_LANGUAGE_CHINESE_TRADITIONAL */
1706    NULL,        /* RETRO_LANGUAGE_CHINESE_SIMPLIFIED */
1707    NULL,        /* RETRO_LANGUAGE_ESPERANTO */
1708    NULL,        /* RETRO_LANGUAGE_POLISH */
1709    NULL,        /* RETRO_LANGUAGE_VIETNAMESE */
1710    NULL,        /* RETRO_LANGUAGE_ARABIC */
1711    NULL,        /* RETRO_LANGUAGE_GREEK */
1712    &options_tr, /* RETRO_LANGUAGE_TURKISH */
1713 };
1714 #endif
1715
1716 /*
1717  ********************************
1718  * Functions
1719  ********************************
1720 */
1721
1722 /* Handles configuration/setting of core options.
1723  * Should be called as early as possible - ideally inside
1724  * retro_set_environment(), and no later than retro_load_game()
1725  * > We place the function body in the header to avoid the
1726  *   necessity of adding more .c files (i.e. want this to
1727  *   be as painless as possible for core devs)
1728  */
1729
1730 static INLINE void libretro_set_core_options(retro_environment_t environ_cb,
1731       bool *categories_supported)
1732 {
1733    unsigned version  = 0;
1734 #ifndef HAVE_NO_LANGEXTRA
1735    unsigned language = 0;
1736 #endif
1737
1738    if (!environ_cb || !categories_supported)
1739       return;
1740
1741    *categories_supported = false;
1742
1743    if (!environ_cb(RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION, &version))
1744       version = 0;
1745
1746    if (version >= 2)
1747    {
1748 #ifndef HAVE_NO_LANGEXTRA
1749       struct retro_core_options_v2_intl core_options_intl;
1750
1751       core_options_intl.us    = &options_us;
1752       core_options_intl.local = NULL;
1753
1754       if (environ_cb(RETRO_ENVIRONMENT_GET_LANGUAGE, &language) &&
1755           (language < RETRO_LANGUAGE_LAST) && (language != RETRO_LANGUAGE_ENGLISH))
1756          core_options_intl.local = options_intl[language];
1757
1758       *categories_supported = environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL,
1759             &core_options_intl);
1760 #else
1761       *categories_supported = environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2,
1762             &options_us);
1763 #endif
1764    }
1765    else
1766    {
1767       size_t i, j;
1768       size_t option_index              = 0;
1769       size_t num_options               = 0;
1770       struct retro_core_option_definition
1771             *option_v1_defs_us         = NULL;
1772 #ifndef HAVE_NO_LANGEXTRA
1773       size_t num_options_intl          = 0;
1774       struct retro_core_option_v2_definition
1775             *option_defs_intl          = NULL;
1776       struct retro_core_option_definition
1777             *option_v1_defs_intl       = NULL;
1778       struct retro_core_options_intl
1779             core_options_v1_intl;
1780 #endif
1781       struct retro_variable *variables = NULL;
1782       char **values_buf                = NULL;
1783
1784       /* Determine total number of options */
1785       while (true)
1786       {
1787          if (option_defs_us[num_options].key)
1788             num_options++;
1789          else
1790             break;
1791       }
1792
1793       if (version >= 1)
1794       {
1795          /* Allocate US array */
1796          option_v1_defs_us = (struct retro_core_option_definition *)
1797                calloc(num_options + 1, sizeof(struct retro_core_option_definition));
1798
1799          /* Copy parameters from option_defs_us array */
1800          for (i = 0; i < num_options; i++)
1801          {
1802             struct retro_core_option_v2_definition *option_def_us = &option_defs_us[i];
1803             struct retro_core_option_value *option_values         = option_def_us->values;
1804             struct retro_core_option_definition *option_v1_def_us = &option_v1_defs_us[i];
1805             struct retro_core_option_value *option_v1_values      = option_v1_def_us->values;
1806
1807             option_v1_def_us->key           = option_def_us->key;
1808             option_v1_def_us->desc          = option_def_us->desc;
1809             option_v1_def_us->info          = option_def_us->info;
1810             option_v1_def_us->default_value = option_def_us->default_value;
1811
1812             /* Values must be copied individually... */
1813             while (option_values->value)
1814             {
1815                option_v1_values->value = option_values->value;
1816                option_v1_values->label = option_values->label;
1817
1818                option_values++;
1819                option_v1_values++;
1820             }
1821          }
1822
1823 #ifndef HAVE_NO_LANGEXTRA
1824          if (environ_cb(RETRO_ENVIRONMENT_GET_LANGUAGE, &language) &&
1825              (language < RETRO_LANGUAGE_LAST) && (language != RETRO_LANGUAGE_ENGLISH) &&
1826              options_intl[language])
1827             option_defs_intl = options_intl[language]->definitions;
1828
1829          if (option_defs_intl)
1830          {
1831             /* Determine number of intl options */
1832             while (true)
1833             {
1834                if (option_defs_intl[num_options_intl].key)
1835                   num_options_intl++;
1836                else
1837                   break;
1838             }
1839
1840             /* Allocate intl array */
1841             option_v1_defs_intl = (struct retro_core_option_definition *)
1842                   calloc(num_options_intl + 1, sizeof(struct retro_core_option_definition));
1843
1844             /* Copy parameters from option_defs_intl array */
1845             for (i = 0; i < num_options_intl; i++)
1846             {
1847                struct retro_core_option_v2_definition *option_def_intl = &option_defs_intl[i];
1848                struct retro_core_option_value *option_values           = option_def_intl->values;
1849                struct retro_core_option_definition *option_v1_def_intl = &option_v1_defs_intl[i];
1850                struct retro_core_option_value *option_v1_values        = option_v1_def_intl->values;
1851
1852                option_v1_def_intl->key           = option_def_intl->key;
1853                option_v1_def_intl->desc          = option_def_intl->desc;
1854                option_v1_def_intl->info          = option_def_intl->info;
1855                option_v1_def_intl->default_value = option_def_intl->default_value;
1856
1857                /* Values must be copied individually... */
1858                while (option_values->value)
1859                {
1860                   option_v1_values->value = option_values->value;
1861                   option_v1_values->label = option_values->label;
1862
1863                   option_values++;
1864                   option_v1_values++;
1865                }
1866             }
1867          }
1868
1869          core_options_v1_intl.us    = option_v1_defs_us;
1870          core_options_v1_intl.local = option_v1_defs_intl;
1871
1872          environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL, &core_options_v1_intl);
1873 #else
1874          environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS, option_v1_defs_us);
1875 #endif
1876       }
1877       else
1878       {
1879          /* Allocate arrays */
1880          variables  = (struct retro_variable *)calloc(num_options + 1,
1881                sizeof(struct retro_variable));
1882          values_buf = (char **)calloc(num_options, sizeof(char *));
1883
1884          if (!variables || !values_buf)
1885             goto error;
1886
1887          /* Copy parameters from option_defs_us array */
1888          for (i = 0; i < num_options; i++)
1889          {
1890             const char *key                        = option_defs_us[i].key;
1891             const char *desc                       = option_defs_us[i].desc;
1892             const char *default_value              = option_defs_us[i].default_value;
1893             struct retro_core_option_value *values = option_defs_us[i].values;
1894             size_t buf_len                         = 3;
1895             size_t default_index                   = 0;
1896
1897             values_buf[i] = NULL;
1898
1899             /* Skip options that are irrelevant when using the
1900              * old style core options interface */
1901             if ((strcmp(key, "pcsx_rearmed_show_input_settings") == 0) ||
1902                 (strcmp(key, "pcsx_rearmed_show_gpu_peops_settings") == 0) ||
1903                 (strcmp(key, "pcsx_rearmed_show_gpu_unai_settings") == 0))
1904                continue;
1905
1906             if (desc)
1907             {
1908                size_t num_values = 0;
1909
1910                /* Determine number of values */
1911                while (true)
1912                {
1913                   if (values[num_values].value)
1914                   {
1915                      /* Check if this is the default value */
1916                      if (default_value)
1917                         if (strcmp(values[num_values].value, default_value) == 0)
1918                            default_index = num_values;
1919
1920                      buf_len += strlen(values[num_values].value);
1921                      num_values++;
1922                   }
1923                   else
1924                      break;
1925                }
1926
1927                /* Build values string */
1928                if (num_values > 0)
1929                {
1930                   buf_len += num_values - 1;
1931                   buf_len += strlen(desc);
1932
1933                   values_buf[i] = (char *)calloc(buf_len, sizeof(char));
1934                   if (!values_buf[i])
1935                      goto error;
1936
1937                   strcpy(values_buf[i], desc);
1938                   strcat(values_buf[i], "; ");
1939
1940                   /* Default value goes first */
1941                   strcat(values_buf[i], values[default_index].value);
1942
1943                   /* Add remaining values */
1944                   for (j = 0; j < num_values; j++)
1945                   {
1946                      if (j != default_index)
1947                      {
1948                         strcat(values_buf[i], "|");
1949                         strcat(values_buf[i], values[j].value);
1950                      }
1951                   }
1952                }
1953             }
1954
1955             variables[option_index].key   = key;
1956             variables[option_index].value = values_buf[i];
1957             option_index++;
1958          }
1959
1960          /* Set variables */
1961          environ_cb(RETRO_ENVIRONMENT_SET_VARIABLES, variables);
1962       }
1963
1964 error:
1965       /* Clean up */
1966
1967       if (option_v1_defs_us)
1968       {
1969          free(option_v1_defs_us);
1970          option_v1_defs_us = NULL;
1971       }
1972
1973 #ifndef HAVE_NO_LANGEXTRA
1974       if (option_v1_defs_intl)
1975       {
1976          free(option_v1_defs_intl);
1977          option_v1_defs_intl = NULL;
1978       }
1979 #endif
1980
1981       if (values_buf)
1982       {
1983          for (i = 0; i < num_options; i++)
1984          {
1985             if (values_buf[i])
1986             {
1987                free(values_buf[i]);
1988                values_buf[i] = NULL;
1989             }
1990          }
1991
1992          free(values_buf);
1993          values_buf = NULL;
1994       }
1995
1996       if (variables)
1997       {
1998          free(variables);
1999          variables = NULL;
2000       }
2001    }
2002 }
2003
2004 #ifdef __cplusplus
2005 }
2006 #endif
2007
2008 #endif