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