1 #ifndef LIBRETRO_CORE_OPTIONS_H__
2 #define LIBRETRO_CORE_OPTIONS_H__
8 #include <retro_inline.h>
10 #ifndef HAVE_NO_LANGEXTRA
11 #include "libretro_core_options_intl.h"
15 ********************************
17 ********************************
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
38 ********************************
39 * Core Option Definitions
40 ********************************
43 /* RETRO_LANGUAGE_ENGLISH */
46 * - All other languages must include the same keys and values
47 * - Will be used as a fallback in the event that frontend language
49 * - Will be used as a fallback for any missing entries in
50 * frontend language definition
53 struct retro_core_option_v2_category option_cats_us[] = {
57 "Configure base hardware parameters: region, BIOS selection, memory cards, etc."
62 "Configure base display parameters."
68 "Configure low-level settings of the NEON GPU plugin."
74 "GPU Plugin (Advanced)",
75 "Configure low-level settings of the P.E.Op.S. GPU plugin."
81 "GPU Plugin (Advanced)",
82 "Configure low-level settings of the UNAI GPU plugin."
88 "Configure sound emulation: reverb, interpolation, CD audio decoding."
93 "Configure input devices: analog response, haptic feedback, Multitaps, light guns, etc."
97 "Compatibility Fixes",
98 "Configure settings/workarounds required for correct operation of specific games."
102 "Speed Hacks (Advanced)",
103 "Configure hacks that may improve performance at the expense of decreased accuracy/stability."
105 { NULL, NULL, NULL },
108 struct retro_core_option_v2_definition option_defs_us[] = {
110 "pcsx_rearmed_region",
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.",
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.",
139 "pcsx_rearmed_show_bios_bootlogo",
140 "Show BIOS Boot Logo",
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.",
146 { "disabled", NULL },
153 "pcsx_rearmed_memcard2",
154 "Second Memory Card (Shared)",
156 "Emulate a second memory card in slot 2. This will be shared by all games.",
160 { "disabled", NULL },
166 #if defined(HAVE_CDROM) || defined(USE_ASYNC_CDROM)
167 #define V(x) { #x, NULL }
169 "pcsx_rearmed_cd_readahead",
172 "Reads the specified amount of sectors ahead of time to try to avoid later stalls. "
174 "Affects both physical CD-ROM and CD images. "
176 #if !defined(_3DS) && !defined(VITA)
177 "333000 will try to read the complete disk (requires an additional 750MB of RAM)."
183 V(0), V(1), V(2), V(3), V(4), V(5), V(6), V(7),
184 V(8), V(9), V(10), V(11), V(12), V(13), V(14), V(15),
185 V(16), V(32), V(64), V(128), V(256), V(512), V(1024),
186 #if !defined(_3DS) && !defined(VITA)
198 "Dynamic Recompiler",
200 "Dynamically recompile PSX CPU instructions to native instructions. Much faster than using an interpreter, but may be less accurate on some platforms.",
204 { "disabled", NULL },
210 #if !defined(LIGHTREC) && defined(NDRC_THREAD)
212 "pcsx_rearmed_drc_thread",
215 "Run the dynarec on another thread.",
220 { "disabled", NULL },
227 #endif // DRC_DISABLE
229 "pcsx_rearmed_psxclock",
230 "PSX CPU Clock Speed (%)",
232 "Overclock or under-clock the PSX CPU. Should be much less than 100 (something like 57) due to some real hardware slowdowns not being emulated. Usually should be left at 'Auto', else glitches or hangs are likely.",
313 "pcsx_rearmed_dithering",
316 "Enable emulation of the dithering technique used by the PSX to smooth out color banding artifacts. \"Force\" enables it even if the game turns it off. Increases performance requirements.",
320 { "disabled", NULL },
322 { "force", "Force" },
331 #ifdef THREAD_RENDERING
333 "pcsx_rearmed_gpu_thread_rendering",
334 "Threaded Rendering",
336 "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.",
340 { "disabled", NULL },
341 { "sync", "Synchronous" },
342 { "async", "Asynchronous" },
349 "pcsx_rearmed_frameskip_type",
352 "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.",
356 { "disabled", NULL },
358 { "auto_threshold", "Auto (Threshold)" },
359 { "fixed_interval", "Fixed Interval" },
365 "pcsx_rearmed_frameskip_threshold",
366 "Frameskip Threshold (%)",
368 "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.",
393 "pcsx_rearmed_frameskip_interval",
394 "Frameskip Interval",
396 "Specify the maximum number of frames that can be skipped before a new frame is rendered.",
415 "pcsx_rearmed_display_fps_v2",
416 "Display Internal FPS",
418 "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.",
422 { "disabled", NULL },
430 "pcsx_rearmed_fractional_framerate",
431 "Use fractional frame rate",
433 "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.",
438 { "disabled", NULL },
445 "pcsx_rearmed_rgb32_output",
448 "Improves color depth for true color modes (most FMVs and occasional title screens). Causes higher CPU usage due to double memory bandwidth requirement, even in 15bpp modes. Takes effect on game reload only (libretro limitation).",
452 { "disabled", NULL },
459 "pcsx_rearmed_gpu_slow_llists",
460 "(GPU) Slow linked list processing",
462 "Slower but more accurate GPU linked list processing. Needed by only a few games like Vampire Hunter D. Should be autodetected in most cases.",
467 { "disabled", NULL },
474 "pcsx_rearmed_show_overscan",
475 "(GPU) Horizontal overscan",
477 "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.",
481 { "disabled", NULL },
489 "pcsx_rearmed_screen_centering",
490 "(GPU) Screen centering",
492 "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.",
497 { "game", "Game-controlled" },
498 { "borderless", "Borderless" },
499 { "manual", "Manual" },
504 #define V(x) { #x, NULL }
506 "pcsx_rearmed_screen_centering_x",
507 "(GPU) Manual position X",
509 "X offset of the frame buffer. Only effective when 'Screen centering' is set to 'Manual'.",
513 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),
519 "pcsx_rearmed_screen_centering_y",
520 "(GPU) Manual position Y",
522 "Y offset of the frame buffer. Only effective when 'Screen centering' is set to 'Manual'.",
526 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),
527 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),
533 "pcsx_rearmed_screen_centering_h_adj",
534 "(GPU) Manual height adjustment",
536 "Height adjustment. Only effective when 'Screen centering' is set to 'Manual'.",
540 V(-64), V(-48), V(-40), V(-32), V(-24), V(-16), V(-8), V(-7), V(-6), V(-5), V(-4), V(-3), V(-2), V(-1), V(0),
548 "pcsx_rearmed_neon_interlace_enable_v2",
549 "(GPU) Show Interlaced Video",
550 "Show Interlaced Video",
551 "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.",
556 { "disabled", NULL },
563 "pcsx_rearmed_neon_enhancement_enable",
564 "(GPU) Enhanced Resolution",
565 "Enhanced Resolution",
566 "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.",
570 { "disabled", NULL },
577 "pcsx_rearmed_neon_enhancement_no_main",
578 "(GPU) Enhanced Resolution Speed Hack",
579 "Enh. Res. Speed Hack",
580 "('Enhanced Resolution' Hack) Improves performance but reduces compatibility and may cause rendering errors.",
584 { "disabled", NULL },
591 "pcsx_rearmed_neon_enhancement_tex_adj_v2",
592 "(GPU) Enhanced Resolution Texture Adjustment",
593 "Enh. Res. Texture Fixup",
594 "('Enhanced Resolution' Hack) Solves some texturing issues in some games in Enhanced Resolution mode. May cause a small performance hit.",
598 { "disabled", NULL },
604 #endif /* GPU_NEON */
607 "pcsx_rearmed_show_gpu_peops_settings",
608 "Show Advanced P.E.Op.S. GPU Settings",
610 "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.",
614 { "disabled", NULL },
621 "pcsx_rearmed_gpu_peops_odd_even_bit",
622 "(GPU) Odd/Even Bit Hack",
624 "A hack fix used to correct lock-ups that may occur in games such as Chrono Cross. Disable unless required.",
628 { "disabled", NULL },
635 "pcsx_rearmed_gpu_peops_expand_screen_width",
636 "(GPU) Expand Screen Width",
637 "Expand Screen Width",
638 "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.",
642 { "disabled", NULL },
649 "pcsx_rearmed_gpu_peops_ignore_brightness",
650 "(GPU) Ignore Brightness Color",
651 "Ignore Brightness Color",
652 "A hack fix used to repair black screens in Lunar Silver Star Story Complete when entering a house or a menu. Disable unless required.",
656 { "disabled", NULL },
663 "pcsx_rearmed_gpu_peops_disable_coord_check",
664 "(GPU) Disable Coordinate Check",
665 "Disable Coordinate Check",
666 "Legacy compatibility mode. May improve games that fail to run correctly on newer GPU hardware. Disable unless required.",
670 { "disabled", NULL },
677 "pcsx_rearmed_gpu_peops_lazy_screen_update",
678 "(GPU) Lazy Screen Update",
679 "Lazy Screen Update",
680 "A partial fix to prevent text box flickering in Dragon Warrior VII. May also improve Pandemonium 2. Disable unless required.",
684 { "disabled", NULL },
691 "pcsx_rearmed_gpu_peops_repeated_triangles",
692 "(GPU) Repeat Flat Tex Triangles",
693 "Repeat Flat Tex Triangles",
694 "A hack fix used to correct rendering errors in Star Wars: Dark Forces. Disable unless required.",
698 { "disabled", NULL },
705 "pcsx_rearmed_gpu_peops_quads_with_triangles",
706 "(GPU) Draw Tex-Quads as Triangles",
707 "Draw Tex-Quads as Triangles",
708 "Corrects graphical distortions that may occur when games utilize Gouraud Shading, at the expense of reduced texture quality. Disable unless required.",
712 { "disabled", NULL },
719 "pcsx_rearmed_gpu_peops_fake_busy_state",
720 "(GPU) Fake 'GPU Busy' States",
721 "Fake 'GPU Busy' States",
722 "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.",
726 { "disabled", NULL },
732 #endif /* GPU_PEOPS */
735 "pcsx_rearmed_show_gpu_unai_settings",
736 "Show Advanced UNAI GPU Settings",
738 "Show low-level configuration options for the UNAI GPU plugin. Quick Menu may need to be toggled for this setting to take effect.",
742 { "disabled", NULL },
748 #ifndef GPU_UNAI_NO_OLD
750 "pcsx_rearmed_gpu_unai_old_renderer",
751 "(GPU) Old renderer",
753 "This enables faster, but less accurate code.",
757 { "disabled", NULL },
765 "pcsx_rearmed_gpu_unai_blending",
766 "(GPU) Texture Blending",
768 "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.",
772 { "disabled", NULL },
779 "pcsx_rearmed_gpu_unai_skipline",
780 "(GPU) Skip every 2nd line",
781 "Skip every 2nd line",
782 "Skips every second scanline. Can be enabled to improve performance at the expense of display inaccuracies (artifacts etc.).",
786 { "disabled", NULL },
793 "pcsx_rearmed_gpu_unai_lighting",
794 "(GPU) Lighting Effects",
796 "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.).",
800 { "disabled", NULL },
807 "pcsx_rearmed_gpu_unai_fast_lighting",
808 "(GPU) Fast Lighting",
810 "Improves performance when 'Lighting Effects' are enabled, but may cause moderate/severe rendering errors.",
814 { "disabled", NULL },
821 "pcsx_rearmed_gpu_unai_scale_hires",
822 "(GPU) Hi-Res Downscaling",
823 "Hi-Res Downscaling",
824 "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.",
828 { "disabled", NULL },
838 #endif /* GPU_UNAI */
840 "pcsx_rearmed_spu_reverb",
841 "Audio Reverb Effects",
843 "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.",
847 { "disabled", NULL },
851 #ifdef HAVE_PRE_ARMV7
858 "pcsx_rearmed_spu_interpolation",
859 "Sound Interpolation",
861 "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.",
865 { "simple", "Simple" },
866 { "gaussian", "Gaussian" },
867 { "cubic", "Cubic" },
868 { "off", "disabled" },
871 #ifdef HAVE_PRE_ARMV7
878 "pcsx_rearmed_nocdaudio",
881 "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.",
885 { "disabled", NULL },
892 "pcsx_rearmed_noxadecoding",
895 "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.",
899 { "disabled", NULL },
907 "pcsx_rearmed_spu_thread",
910 "Emulates the PSX SPU on another CPU thread. May cause audio glitches in some games.",
914 { "disabled", NULL },
920 #endif // P_HAVE_PTHREAD
922 "pcsx_rearmed_show_input_settings",
923 "Show Input Settings",
925 "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.",
929 { "disabled", NULL },
936 "pcsx_rearmed_analog_axis_modifier",
937 "Analog Axis Bounds",
939 "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.",
943 { "circle", "Circle" },
944 { "square", "Square" },
950 "pcsx_rearmed_vibration",
953 "Enable haptic feedback when using a rumble-equipped gamepad with input device set to 'dualshock'.",
957 { "disabled", NULL },
964 "pcsx_rearmed_analog_combo",
965 "DualShock Analog Mode Toggle Key Combo",
967 "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.",
971 { "disabled", NULL },
972 { "l1+r1+select", "L1 + R1 + Select" },
973 { "l1+r1+start", "L1 + R1 + Start" },
974 { "l1+r1+l3", "L1 + R1 + L3" },
975 { "l1+r1+r3", "L1 + R1 + R3" },
976 { "l3+r3", "L3 + R3" },
982 "pcsx_rearmed_multitap",
985 "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.",
989 { "disabled", NULL },
990 { "port 1", "Port 1" },
991 { "port 2", "Port 2" },
992 { "ports 1 and 2", "Ports 1 and 2" },
998 "pcsx_rearmed_negcon_deadzone",
999 "NegCon Twist Deadzone",
1001 "Set the deadzone of the RetroPad left analog stick when simulating the 'twist' action of emulated neGcon Controllers. Used to eliminate drift/unwanted input.",
1023 "pcsx_rearmed_negcon_response",
1024 "NegCon Twist Response",
1026 "Specify the analog response when using a RetroPad left analog stick to simulate the 'twist' action of emulated neGcon Controllers.",
1030 { "linear", "Linear" },
1031 { "quadratic", "Quadratic" },
1032 { "cubic", "Cubic" },
1038 "pcsx_rearmed_input_sensitivity",
1039 "Mouse Sensitivity",
1041 "Adjust responsiveness of emulated 'mouse' input devices.",
1089 "pcsx_rearmed_crosshair1",
1090 "Player 1 Lightgun Crosshair",
1092 "Toggle player 1's crosshair for the Guncon or Konami Gun. Only works if RGB32 output is off (video options).",
1096 { "disabled", NULL },
1106 "pcsx_rearmed_crosshair2",
1107 "Player 2 Lightgun Crosshair",
1109 "Toggle player 2's crosshair for the Guncon or Konami Gun. Only works if RGB32 output is off (video options).",
1113 { "disabled", NULL },
1123 "pcsx_rearmed_konamigunadjustx",
1124 "Konami Gun X Axis Offset",
1126 "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.",
1216 "pcsx_rearmed_konamigunadjusty",
1217 "Konami Gun Y Axis Offset",
1219 "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.",
1309 "pcsx_rearmed_gunconadjustx",
1310 "Guncon X Axis Offset",
1312 "Apply an X axis offset to light gun input when emulating a Guncon device. Can be used to correct aiming misalignments.",
1402 "pcsx_rearmed_gunconadjusty",
1403 "Guncon Y Axis Offset",
1405 "Apply a Y axis offset to light gun input when emulating a Guncon device. Can be used to correct aiming misalignments.",
1495 "pcsx_rearmed_gunconadjustratiox",
1496 "Guncon X Axis Response",
1498 "Adjust relative magnitude of horizontal light gun motion when emulating a Guncon device. Can be used to correct aiming misalignments.",
1558 "pcsx_rearmed_gunconadjustratioy",
1559 "Guncon Y Axis Response",
1561 "Adjust relative magnitude of vertical light gun motion when emulating a Guncon device. Can be used to correct aiming misalignments.",
1621 "pcsx_rearmed_icache_emulation",
1622 "Instruction Cache Emulation",
1624 "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]",
1628 { "enabled", NULL },
1629 { "disabled", NULL },
1635 "pcsx_rearmed_exception_emulation",
1636 "Exception and Breakpoint Emulation",
1638 "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]",
1642 { "disabled", NULL },
1643 { "enabled", NULL },
1649 #define V(x) { #x, NULL }
1651 "pcsx_rearmed_3ds_appcputime",
1652 "3DS AppCpuTimeLimit",
1654 "% of syscore (core #1) CPU time allocated to the emulator",
1673 "pcsx_rearmed_cd_turbo",
1676 "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.",
1680 { "disabled", NULL },
1681 { "enabled", NULL },
1686 #if !defined(DRC_DISABLE) && !defined(LIGHTREC)
1688 "pcsx_rearmed_nocompathacks",
1689 "Disable Automatic Compatibility Hacks",
1691 "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.",
1695 { "disabled", NULL },
1696 { "enabled", NULL },
1702 "pcsx_rearmed_nosmccheck",
1703 "(Speed Hack) Disable SMC Checks",
1704 "Disable SMC Checks",
1705 "Will cause crashes when loading, and lead to memory card failure.",
1709 { "disabled", NULL },
1710 { "enabled", NULL },
1716 "pcsx_rearmed_gteregsunneeded",
1717 "(Speed Hack) Assume GTE Registers Unneeded",
1718 "Assume GTE Registers Unneeded",
1719 "May cause rendering errors.",
1723 { "disabled", NULL },
1724 { "enabled", NULL },
1730 "pcsx_rearmed_nogteflags",
1731 "(Speed Hack) Disable GTE Flags",
1732 "Disable GTE Flags",
1733 "Will cause rendering errors.",
1737 { "disabled", NULL },
1738 { "enabled", NULL },
1743 #endif /* !DRC_DISABLE && !LIGHTREC */
1745 "pcsx_rearmed_nostalls",
1746 "Disable CPU/GTE Stalls",
1748 "Will cause some games to run too quickly. Should be disabled in almost all cases."
1749 #if defined(LIGHTREC)
1750 " Interpreter only."
1756 { "disabled", NULL },
1757 { "enabled", NULL },
1762 { NULL, NULL, NULL, NULL, NULL, NULL, {{0}}, NULL },
1765 struct retro_core_options_v2 options_us = {
1771 ********************************
1773 ********************************
1776 #ifndef HAVE_NO_LANGEXTRA
1777 struct retro_core_options_v2 *options_intl[RETRO_LANGUAGE_LAST] = {
1778 &options_us, /* RETRO_LANGUAGE_ENGLISH */
1779 NULL, /* RETRO_LANGUAGE_JAPANESE */
1780 NULL, /* RETRO_LANGUAGE_FRENCH */
1781 NULL, /* RETRO_LANGUAGE_SPANISH */
1782 NULL, /* RETRO_LANGUAGE_GERMAN */
1783 NULL, /* RETRO_LANGUAGE_ITALIAN */
1784 NULL, /* RETRO_LANGUAGE_DUTCH */
1785 NULL, /* RETRO_LANGUAGE_PORTUGUESE_BRAZIL */
1786 NULL, /* RETRO_LANGUAGE_PORTUGUESE_PORTUGAL */
1787 NULL, /* RETRO_LANGUAGE_RUSSIAN */
1788 NULL, /* RETRO_LANGUAGE_KOREAN */
1789 NULL, /* RETRO_LANGUAGE_CHINESE_TRADITIONAL */
1790 NULL, /* RETRO_LANGUAGE_CHINESE_SIMPLIFIED */
1791 NULL, /* RETRO_LANGUAGE_ESPERANTO */
1792 NULL, /* RETRO_LANGUAGE_POLISH */
1793 NULL, /* RETRO_LANGUAGE_VIETNAMESE */
1794 NULL, /* RETRO_LANGUAGE_ARABIC */
1795 NULL, /* RETRO_LANGUAGE_GREEK */
1796 &options_tr, /* RETRO_LANGUAGE_TURKISH */
1801 ********************************
1803 ********************************
1806 /* Handles configuration/setting of core options.
1807 * Should be called as early as possible - ideally inside
1808 * retro_set_environment(), and no later than retro_load_game()
1809 * > We place the function body in the header to avoid the
1810 * necessity of adding more .c files (i.e. want this to
1811 * be as painless as possible for core devs)
1814 static INLINE void libretro_set_core_options(retro_environment_t environ_cb,
1815 bool *categories_supported)
1817 unsigned version = 0;
1818 #ifndef HAVE_NO_LANGEXTRA
1819 unsigned language = 0;
1822 if (!environ_cb || !categories_supported)
1825 *categories_supported = false;
1827 if (!environ_cb(RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION, &version))
1832 #ifndef HAVE_NO_LANGEXTRA
1833 struct retro_core_options_v2_intl core_options_intl;
1835 core_options_intl.us = &options_us;
1836 core_options_intl.local = NULL;
1838 if (environ_cb(RETRO_ENVIRONMENT_GET_LANGUAGE, &language) &&
1839 (language < RETRO_LANGUAGE_LAST) && (language != RETRO_LANGUAGE_ENGLISH))
1840 core_options_intl.local = options_intl[language];
1842 *categories_supported = environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL,
1843 &core_options_intl);
1845 *categories_supported = environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2,
1852 size_t option_index = 0;
1853 size_t num_options = 0;
1854 struct retro_core_option_definition
1855 *option_v1_defs_us = NULL;
1856 #ifndef HAVE_NO_LANGEXTRA
1857 size_t num_options_intl = 0;
1858 struct retro_core_option_v2_definition
1859 *option_defs_intl = NULL;
1860 struct retro_core_option_definition
1861 *option_v1_defs_intl = NULL;
1862 struct retro_core_options_intl
1863 core_options_v1_intl;
1865 struct retro_variable *variables = NULL;
1866 char **values_buf = NULL;
1868 /* Determine total number of options */
1871 if (option_defs_us[num_options].key)
1879 /* Allocate US array */
1880 option_v1_defs_us = (struct retro_core_option_definition *)
1881 calloc(num_options + 1, sizeof(struct retro_core_option_definition));
1883 /* Copy parameters from option_defs_us array */
1884 for (i = 0; i < num_options; i++)
1886 struct retro_core_option_v2_definition *option_def_us = &option_defs_us[i];
1887 struct retro_core_option_value *option_values = option_def_us->values;
1888 struct retro_core_option_definition *option_v1_def_us = &option_v1_defs_us[i];
1889 struct retro_core_option_value *option_v1_values = option_v1_def_us->values;
1891 option_v1_def_us->key = option_def_us->key;
1892 option_v1_def_us->desc = option_def_us->desc;
1893 option_v1_def_us->info = option_def_us->info;
1894 option_v1_def_us->default_value = option_def_us->default_value;
1896 /* Values must be copied individually... */
1897 while (option_values->value)
1899 option_v1_values->value = option_values->value;
1900 option_v1_values->label = option_values->label;
1907 #ifndef HAVE_NO_LANGEXTRA
1908 if (environ_cb(RETRO_ENVIRONMENT_GET_LANGUAGE, &language) &&
1909 (language < RETRO_LANGUAGE_LAST) && (language != RETRO_LANGUAGE_ENGLISH) &&
1910 options_intl[language])
1911 option_defs_intl = options_intl[language]->definitions;
1913 if (option_defs_intl)
1915 /* Determine number of intl options */
1918 if (option_defs_intl[num_options_intl].key)
1924 /* Allocate intl array */
1925 option_v1_defs_intl = (struct retro_core_option_definition *)
1926 calloc(num_options_intl + 1, sizeof(struct retro_core_option_definition));
1928 /* Copy parameters from option_defs_intl array */
1929 for (i = 0; i < num_options_intl; i++)
1931 struct retro_core_option_v2_definition *option_def_intl = &option_defs_intl[i];
1932 struct retro_core_option_value *option_values = option_def_intl->values;
1933 struct retro_core_option_definition *option_v1_def_intl = &option_v1_defs_intl[i];
1934 struct retro_core_option_value *option_v1_values = option_v1_def_intl->values;
1936 option_v1_def_intl->key = option_def_intl->key;
1937 option_v1_def_intl->desc = option_def_intl->desc;
1938 option_v1_def_intl->info = option_def_intl->info;
1939 option_v1_def_intl->default_value = option_def_intl->default_value;
1941 /* Values must be copied individually... */
1942 while (option_values->value)
1944 option_v1_values->value = option_values->value;
1945 option_v1_values->label = option_values->label;
1953 core_options_v1_intl.us = option_v1_defs_us;
1954 core_options_v1_intl.local = option_v1_defs_intl;
1956 environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL, &core_options_v1_intl);
1958 environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS, option_v1_defs_us);
1963 /* Allocate arrays */
1964 variables = (struct retro_variable *)calloc(num_options + 1,
1965 sizeof(struct retro_variable));
1966 values_buf = (char **)calloc(num_options, sizeof(char *));
1968 if (!variables || !values_buf)
1971 /* Copy parameters from option_defs_us array */
1972 for (i = 0; i < num_options; i++)
1974 const char *key = option_defs_us[i].key;
1975 const char *desc = option_defs_us[i].desc;
1976 const char *default_value = option_defs_us[i].default_value;
1977 struct retro_core_option_value *values = option_defs_us[i].values;
1979 size_t default_index = 0;
1981 values_buf[i] = NULL;
1983 /* Skip options that are irrelevant when using the
1984 * old style core options interface */
1985 if ((strcmp(key, "pcsx_rearmed_show_input_settings") == 0) ||
1986 (strcmp(key, "pcsx_rearmed_show_gpu_peops_settings") == 0) ||
1987 (strcmp(key, "pcsx_rearmed_show_gpu_unai_settings") == 0))
1992 size_t num_values = 0;
1994 /* Determine number of values */
1997 if (values[num_values].value)
1999 /* Check if this is the default value */
2001 if (strcmp(values[num_values].value, default_value) == 0)
2002 default_index = num_values;
2004 buf_len += strlen(values[num_values].value);
2011 /* Build values string */
2014 buf_len += num_values - 1;
2015 buf_len += strlen(desc);
2017 values_buf[i] = (char *)calloc(buf_len, sizeof(char));
2021 strcpy(values_buf[i], desc);
2022 strcat(values_buf[i], "; ");
2024 /* Default value goes first */
2025 strcat(values_buf[i], values[default_index].value);
2027 /* Add remaining values */
2028 for (j = 0; j < num_values; j++)
2030 if (j != default_index)
2032 strcat(values_buf[i], "|");
2033 strcat(values_buf[i], values[j].value);
2039 variables[option_index].key = key;
2040 variables[option_index].value = values_buf[i];
2045 environ_cb(RETRO_ENVIRONMENT_SET_VARIABLES, variables);
2051 if (option_v1_defs_us)
2053 free(option_v1_defs_us);
2054 option_v1_defs_us = NULL;
2057 #ifndef HAVE_NO_LANGEXTRA
2058 if (option_v1_defs_intl)
2060 free(option_v1_defs_intl);
2061 option_v1_defs_intl = NULL;
2067 for (i = 0; i < num_options; i++)
2071 free(values_buf[i]);
2072 values_buf[i] = NULL;