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