1 #ifndef LIBRETRO_CORE_OPTIONS_H__
2 #define LIBRETRO_CORE_OPTIONS_H__
8 #include <retro_inline.h>
15 ********************************
16 * Core Option Definitions
17 ********************************
20 /* RETRO_LANGUAGE_ENGLISH */
23 * - All other languages must include the same keys and values
24 * - Will be used as a fallback in the event that frontend language
26 * - Will be used as a fallback for any missing entries in
27 * frontend language definition
31 #define PSX_CLOCK_DEFAULT "50"
32 #define PSX_CLOCK_LABEL "Overclock or underclock the PSX clock. Default is 50"
34 #define PSX_CLOCK_DEFAULT "57"
35 #define PSX_CLOCK_LABEL "Overclock or underclock the PSX clock. Default is 57"
38 struct retro_core_option_definition option_defs_us[] = {
40 "pcsx_rearmed_frameskip",
42 "Choose how much frames should be skipped to improve performance at the expense of visual smoothness.",
55 "Allows you to use real bios file (if available) or emulated bios (HLE). Its recommended to use official bios file for better compatibility.",
64 "pcsx_rearmed_region",
66 "Choose what region the system is from. 60 Hz for NTSC, 50 Hz for PAL.",
76 "pcsx_rearmed_memcard2",
77 "Enable Second Memory Card (Shared)",
78 "Enabled the memory card slot 2. This memory card is shared amongst all games.",
87 "pcsx_rearmed_pad1type",
89 "Pad type for player 1",
93 { "dualshock", NULL },
101 "pcsx_rearmed_pad2type",
103 "Pad type for player 2",
105 { "standard", NULL },
107 { "dualshock", NULL },
115 "pcsx_rearmed_pad3type",
117 "Pad type for player 3",
119 { "standard", NULL },
121 { "dualshock", NULL },
129 "pcsx_rearmed_pad4type",
131 "Pad type for player 4",
133 { "standard", NULL },
135 { "dualshock", NULL },
143 "pcsx_rearmed_pad5type",
145 "Pad type for player 5",
147 { "standard", NULL },
149 { "dualshock", NULL },
156 "pcsx_rearmed_pad6type",
158 "Pad type for player 6",
160 { "standard", NULL },
162 { "dualshock", NULL },
169 "pcsx_rearmed_pad7type",
171 "Pad type for player 7",
173 { "standard", NULL },
175 { "dualshock", NULL },
182 "pcsx_rearmed_pad8type",
184 "Pad type for player 8",
186 { "standard", NULL },
188 { "dualshock", NULL },
196 "pcsx_rearmed_multitap1",
198 "Enables/Disables multitap on port 1, allowing upto 5 players in games that permit it.",
201 { "disabled", NULL },
208 "pcsx_rearmed_multitap2",
210 "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.",
213 { "disabled", NULL },
220 "pcsx_rearmed_negcon_deadzone",
221 "NegCon Twist Deadzone (Percent)",
222 "Sets the deadzone of the RetroPad left analog stick when simulating the 'twist' action of emulated neGcon Controllers. Used to eliminate drift/unwanted input.",
236 "pcsx_rearmed_negcon_response",
237 "NegCon Twist Response",
238 "Specifies the analog response when using a RetroPad left analog stick to simulate the 'twist' action of emulated neGcon Controllers.",
241 { "quadratic", NULL },
248 "pcsx_rearmed_vibration",
250 "Enables vibration feedback for controllers that supports vibration features.",
252 { "disabled", NULL },
259 "pcsx_rearmed_dithering",
261 "If Off, disables the dithering pattern the PSX applies to combat color banding.",
263 { "disabled", NULL },
273 "Dynamic Recompiler",
274 "Enables core to use dynamic recompiler or interpreter (slower) CPU instructions.",
276 { "disabled", NULL },
283 "pcsx_rearmed_psxclock",
362 #endif /* DRC_DISABLE */
366 "pcsx_rearmed_neon_interlace_enable",
367 "Enable Interlacing Mode",
368 "Enables fake scanlines effect.",
370 { "disabled", NULL },
377 "pcsx_rearmed_neon_enhancement_enable",
378 "Enhanced Resolution (Slow)",
379 "Renders in double resolution at the cost of lower performance.",
381 { "disabled", NULL },
388 "pcsx_rearmed_neon_enhancement_no_main",
389 "Enhanced Resolution (Speed Hack)",
390 "Speed hack for Enhanced resolution option (glitches some games).",
392 { "disabled", NULL },
398 #endif /* __ARM_NEON__ */
401 "pcsx_rearmed_duping_enable",
403 "A speedup, redraws/reuses the last frame if there was no new data.",
405 { "disabled", NULL },
412 "pcsx_rearmed_display_internal_fps",
413 "Display Internal FPS",
414 "Shows an on-screen frames per second counter when enabled.",
416 { "disabled", NULL },
423 /* GPU PEOPS OPTIONS */
426 "pcsx_rearmed_show_gpu_peops_settings",
427 "Advanced GPU P.E.Op.S. Settings",
428 "Shows or hides advanced GPU plugin settings. NOTE: Quick Menu must be toggled for this setting to take effect.",
430 { "disabled", NULL },
437 "pcsx_rearmed_gpu_peops_fix_0",
438 "(GPU) Odd/Even Bit Hack",
439 "Needed for Chrono Cross.",
441 { "disabled", NULL },
448 "pcsx_rearmed_gpu_peops_fix_1",
449 "(GPU) Expand Screen Width",
450 "Capcom fighting games",
452 { "disabled", NULL },
459 "pcsx_rearmed_gpu_peops_fix_2",
460 "(GPU) Ignore Brightness Color",
461 "Black screens in Lunar Silver Star Story games",
463 { "disabled", NULL },
470 "pcsx_rearmed_gpu_peops_fix_3",
471 "(GPU) Disable Coordinate Check",
472 "Compatibility mode",
474 { "disabled", NULL },
481 "pcsx_rearmed_gpu_peops_fix_6",
482 "(GPU) Lazy Screen Update",
485 { "disabled", NULL },
492 "pcsx_rearmed_gpu_peops_fix_7",
493 "(GPU) Old Frame Skipping",
494 "Skip every second frame",
496 { "disabled", NULL },
503 "pcsx_rearmed_gpu_peops_fix_8",
504 "(GPU) Repeated Flat Tex Triangles",
505 "Needed by Star Wars: Dark Forces",
507 { "disabled", NULL },
514 "pcsx_rearmed_gpu_peops_fix_9",
515 "(GPU) Draw Quads with Triangles",
516 "Better g-colors, worse textures",
518 { "disabled", NULL },
525 "pcsx_rearmed_gpu_peops_fix_10",
526 "(GPU) Fake 'Gpu Busy' States",
527 "Toggle busy flags after drawing",
529 { "disabled", NULL },
538 "pcsx_rearmed_show_bios_bootlogo",
539 "Show Bios Bootlogo",
540 "When enabled, shows the PlayStation logo when starting or resetting. (Breaks some games).",
542 { "disabled", NULL },
549 "pcsx_rearmed_spu_reverb",
551 "Enables or disables audio reverb effect.",
553 { "disabled", NULL },
560 "pcsx_rearmed_spu_interpolation",
561 "Sound Interpolation",
565 { "gaussian", NULL },
573 "pcsx_rearmed_idiablofix",
577 { "disabled", NULL },
584 "pcsx_rearmed_pe2_fix",
585 "Parasite Eve 2/Vandal Hearts 1/2 Fix",
588 { "disabled", NULL },
595 "pcsx_rearmed_inuyasha_fix",
596 "InuYasha Sengoku Battle Fix",
599 { "disabled", NULL },
606 /* ADVANCED OPTIONS */
608 "pcsx_rearmed_noxadecoding",
612 { "disabled", NULL },
619 "pcsx_rearmed_nocdaudio",
623 { "disabled", NULL },
632 "pcsx_rearmed_nosmccheck",
633 "(Speed Hack) Disable SMC Checks",
634 "Will cause crashes when loading, break memcards.",
636 { "disabled", NULL },
643 "pcsx_rearmed_gteregsunneeded",
644 "(Speed Hack) Assume GTE Regs Unneeded",
645 "May cause graphical glitches.",
647 { "disabled", NULL },
654 "pcsx_rearmed_nogteflags",
655 "(Speed Hack) Disable GTE Flags",
656 "Will cause graphical glitches.",
658 { "disabled", NULL },
664 #endif /* DRC_DISABLE */
666 { NULL, NULL, NULL, { NULL, NULL }, NULL },
669 /* RETRO_LANGUAGE_JAPANESE */
671 /* RETRO_LANGUAGE_FRENCH */
673 /* RETRO_LANGUAGE_SPANISH */
675 /* RETRO_LANGUAGE_GERMAN */
677 /* RETRO_LANGUAGE_ITALIAN */
679 /* RETRO_LANGUAGE_DUTCH */
681 /* RETRO_LANGUAGE_PORTUGUESE_BRAZIL */
683 /* RETRO_LANGUAGE_PORTUGUESE_PORTUGAL */
685 /* RETRO_LANGUAGE_RUSSIAN */
687 /* RETRO_LANGUAGE_KOREAN */
689 /* RETRO_LANGUAGE_CHINESE_TRADITIONAL */
691 /* RETRO_LANGUAGE_CHINESE_SIMPLIFIED */
693 /* RETRO_LANGUAGE_ESPERANTO */
695 /* RETRO_LANGUAGE_POLISH */
697 /* RETRO_LANGUAGE_VIETNAMESE */
699 /* RETRO_LANGUAGE_ARABIC */
701 /* RETRO_LANGUAGE_GREEK */
703 /* RETRO_LANGUAGE_TURKISH */
705 struct retro_core_option_definition option_defs_tr[] = {
707 "pcsx_rearmed_frameskip",
709 "Görsel pürüzsüzlük pahasına performansı artırmak için ne kadar karenin atlanması gerektiğini seçin.",
718 "Gerçek bios dosyasını (varsa) veya öykünmüş bios'u (HLE) kullanmanızı sağlar. Daha iyi uyumluluk için resmi bios dosyasını kullanmanız önerilir.",
720 { "auto", "otomatik" },
727 "pcsx_rearmed_region",
729 "Sistemin hangi bölgeden olduğunu seçin. NTSC için 60 Hz, PAL için 50 Hz.",
731 { "auto", "otomatik" },
739 "pcsx_rearmed_memcard2",
740 "İkinci Bellek Kartını Etkinleştir (Paylaşılan)",
741 "2. Hafıza kartı yuvasını etkinleştirin. Bu hafıza kartı tüm oyunlar arasında paylaşılır.",
748 "pcsx_rearmed_pad1type",
750 "1. Oyuncu için kontrolör tipi",
752 { "standard", NULL },
754 { "dualshock", NULL },
756 { "none", "hiçbiri" },
762 "pcsx_rearmed_pad2type",
764 "2. Oyuncu için kontrolör tipi",
766 { "standard", NULL },
768 { "dualshock", NULL },
770 { "none", "hiçbiri" },
776 "pcsx_rearmed_pad3type",
778 "3. Oyuncu için kontrolör tipi",
780 { "standard", NULL },
782 { "dualshock", NULL },
784 { "none", "hiçbiri" },
790 "pcsx_rearmed_pad4type",
792 "4. Oyuncu için kontrolör tipi",
794 { "standard", NULL },
796 { "dualshock", NULL },
798 { "none", "hiçbiri" },
804 "pcsx_rearmed_pad5type",
806 "5. Oyuncu için kontrolör tipi",
808 { "standard", NULL },
810 { "dualshock", NULL },
812 { "none", "hiçbiri" },
817 "pcsx_rearmed_pad6type",
819 "6. Oyuncu için kontrolör tipi",
821 { "standard", NULL },
823 { "dualshock", NULL },
825 { "none", "hiçbiri" },
830 "pcsx_rearmed_pad7type",
832 "7. Oyuncu için kontrolör tipi",
834 { "standard", NULL },
836 { "dualshock", NULL },
838 { "none", "hiçbiri" },
843 "pcsx_rearmed_pad8type",
845 "8. Oyuncu için kontrolör tipi",
847 { "standard", NULL },
849 { "dualshock", NULL },
851 { "none", "hiçbiri" },
857 "pcsx_rearmed_multitap1",
859 "Bağlantı noktası 1'deki multitap'ı etkinleştirir / devre dışı bırakır ve izin veren oyunlarda 5 oyuncuya kadar izin verir.",
861 { "auto", "otomatik" },
862 { "disabled", NULL },
869 "pcsx_rearmed_multitap2",
871 "Bağlantı noktası 2'deki multitap'ı etkinleştirir/devre dışı bırakır ve izin veren oyunlarda 8 oyuncuya kadar izin verir. Bunun çalışması için Multitap 1'in etkinleştirilmesi gerekir.",
873 { "auto", "otomatik" },
874 { "disabled", NULL },
881 "pcsx_rearmed_negcon_deadzone",
882 "NegCon Twist Deadzone (Yüzdelik)",
883 "Öykünülmüş neGcon kontrolörünün 'büküm' eylemini simüle ederken RetroPad sol analog çubuğunun ölü bölgesini ayarlar. Sürüklenme/istenmeyen girişi ortadan kaldırmak için kullanılır.",
890 "pcsx_rearmed_negcon_response",
891 "NegCon Twist Response",
892 "Öykünülmüş neGcon kontrolörünün 'bükümünü' simule etmek için bir RetroPad sol analog çubuğu kullanırken analog cevabını belirtir.",
899 "pcsx_rearmed_vibration",
900 "Titreşimi Etkinleştir",
901 "Titreşim özelliklerini destekleyen kontrolörler için titreşim geri bildirimini etkinleştirir.",
908 "pcsx_rearmed_dithering",
909 "Dithering Etkinleştir",
910 "Kapalı ise, PSX'in renk bantlarıyla mücadele etmek için uyguladığı renk taklidi düzenini devre dışı bırakır.",
920 "Dinamik Yeniden Derleyici",
921 "Çekirdeğin dinamik yeniden derleyici veya tercüman(daha yavaş) CPU talimatlarını kullanmasını sağlar.",
928 "pcsx_rearmed_psxclock",
936 #endif /* DRC_DISABLE */
940 "pcsx_rearmed_neon_interlace_enable",
941 "Interlacing Mode'u etkinleştir",
942 "Sahte tarama çizgileri efektini etkinleştirir.",
949 "pcsx_rearmed_neon_enhancement_enable",
950 "Geliştirilmiş Çözünürlük (Yavaş)",
951 "Düşük performans pahasına çift çözünürlükte işler.",
958 "pcsx_rearmed_neon_enhancement_no_main",
959 "Geliştirilmiş Çözünürlük (Speed Hack)",
960 "Geliştirilmiş çözünürlük seçeneği için hız aşırtma(bazı oyunlarda sorun çıkartabilir).",
966 #endif /* __ARM_NEON__ */
969 "pcsx_rearmed_duping_enable",
971 "Yeni bir veri yoksa, bir hızlandırma, son kareyi yeniden çizer/yeniden kullanır.",
978 "pcsx_rearmed_display_internal_fps",
979 "Dahili FPS'yi görüntüle",
980 "Etkinleştirildiğinde ekranda saniye başına kareyi gösterir.",
987 /* GPU PEOPS OPTIONS */
990 "pcsx_rearmed_show_gpu_peops_settings",
991 "Gelişmiş GPU Ayarlarını Göster",
992 "Çeşitli GPU düzeltmelerini etkinleştirin veya devre dışı bırakın. Ayarların etkili olması için core'un yeniden başlatılması gerekebilir. NOT: Bu ayarın etkili olabilmesi için Hızlı Menü’nün değiştirilmesi gerekir.",
999 "pcsx_rearmed_gpu_peops_fix_0",
1000 "(GPU) Odd/Even Bit Hack",
1001 "Chrono Cross için gerekli.",
1008 "pcsx_rearmed_gpu_peops_fix_1",
1009 "(GPU) Ekran Genişliğini Genişlet",
1010 "Capcom dövüş oyunları",
1017 "pcsx_rearmed_gpu_peops_fix_2",
1018 "(GPU) Parlaklık Rengini Yoksay",
1019 "Lunar Silver Star Story oyunlarında siyah ekran",
1026 "pcsx_rearmed_gpu_peops_fix_3",
1027 "(GPU) Koordinat Kontrolünü Devre Dışı Bırak",
1035 "pcsx_rearmed_gpu_peops_fix_6",
1036 "(GPU) Tembel Ekran Güncellemesi",
1044 "pcsx_rearmed_gpu_peops_fix_7",
1045 "(GPU) Eski Çerçeve Atlama",
1046 "Her ikinci kareyi atla",
1053 "pcsx_rearmed_gpu_peops_fix_8",
1054 "(GPU) Tekrarlanan Düz Doku Üçgenleri",
1055 "Star Wars: Dark Forces için gerekli",
1062 "pcsx_rearmed_gpu_peops_fix_9",
1063 "(GPU) Üçgenler ile Dörtlü Çiz",
1064 "Daha iyi g renkler, daha kötü dokular",
1071 "pcsx_rearmed_gpu_peops_fix_10",
1072 "(GPU) Sahte 'Gpu Meşgul' Konumları",
1073 "Çizimden sonra meşgul bayraklarını değiştir",
1082 "pcsx_rearmed_show_bios_bootlogo",
1083 "Bios Bootlogo'yu Göster",
1084 "Etkinleştirildiğinde, başlatırken veya sıfırlarken PlayStation logosunu gösterir. (Bazı oyunları bozabilir).",
1091 "pcsx_rearmed_spu_reverb",
1093 "Ses yankı efektini etkinleştirir veya devre dışı bırakır.",
1100 "pcsx_rearmed_spu_interpolation",
1101 "Ses Enterpolasyonu",
1109 "pcsx_rearmed_idiablofix",
1110 "Diablo Müzik Düzeltmesi",
1118 "pcsx_rearmed_pe2_fix",
1119 "Parasite Eve 2/Vandal Hearts 1/2 Düzeltmleri",
1127 "pcsx_rearmed_inuyasha_fix",
1128 "InuYasha Sengoku Battle Düzeltmesi",
1136 /* ADVANCED OPTIONS */
1138 "pcsx_rearmed_noxadecoding",
1147 "pcsx_rearmed_nocdaudio",
1158 "pcsx_rearmed_nosmccheck",
1159 "(Speed Hack) SMC Kontrollerini Devre Dışı Bırak",
1160 "Yükleme sırasında çökmelere neden olabilir, hafıza kartını bozabilir.",
1167 "pcsx_rearmed_gteregsunneeded",
1168 "(Speed Hack) GTE'nin Gereksiz Olduğunu Varsayın",
1169 "Grafiksel bozukluklara neden olabilir.",
1176 "pcsx_rearmed_nogteflags",
1177 "(Speed Hack) GTE Bayraklarını Devredışı Bırakın",
1178 "Grafiksel bozukluklara neden olur.",
1184 #endif /* DRC_DISABLE */
1186 { NULL, NULL, NULL, { NULL, NULL }, NULL },
1191 ********************************
1193 ********************************
1196 struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
1197 option_defs_us, /* RETRO_LANGUAGE_ENGLISH */
1198 NULL, /* RETRO_LANGUAGE_JAPANESE */
1199 NULL, /* RETRO_LANGUAGE_FRENCH */
1200 NULL, /* RETRO_LANGUAGE_SPANISH */
1201 NULL, /* RETRO_LANGUAGE_GERMAN */
1202 NULL, /* RETRO_LANGUAGE_ITALIAN */
1203 NULL, /* RETRO_LANGUAGE_DUTCH */
1204 NULL, /* RETRO_LANGUAGE_PORTUGUESE_BRAZIL */
1205 NULL, /* RETRO_LANGUAGE_PORTUGUESE_PORTUGAL */
1206 NULL, /* RETRO_LANGUAGE_RUSSIAN */
1207 NULL, /* RETRO_LANGUAGE_KOREAN */
1208 NULL, /* RETRO_LANGUAGE_CHINESE_TRADITIONAL */
1209 NULL, /* RETRO_LANGUAGE_CHINESE_SIMPLIFIED */
1210 NULL, /* RETRO_LANGUAGE_ESPERANTO */
1211 NULL, /* RETRO_LANGUAGE_POLISH */
1212 NULL, /* RETRO_LANGUAGE_VIETNAMESE */
1213 NULL, /* RETRO_LANGUAGE_ARABIC */
1214 NULL, /* RETRO_LANGUAGE_GREEK */
1215 option_defs_tr, /* RETRO_LANGUAGE_TURKISH */
1219 ********************************
1221 ********************************
1224 /* Handles configuration/setting of core options.
1225 * Should only be called inside retro_set_environment().
1226 * > We place the function body in the header to avoid the
1227 * necessity of adding more .c files (i.e. want this to
1228 * be as painless as possible for core devs)
1231 static INLINE void libretro_set_core_options(retro_environment_t environ_cb)
1233 unsigned version = 0;
1238 if (environ_cb(RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION, &version) && (version == 1))
1240 struct retro_core_options_intl core_options_intl;
1241 unsigned language = 0;
1243 core_options_intl.us = option_defs_us;
1244 core_options_intl.local = NULL;
1246 if (environ_cb(RETRO_ENVIRONMENT_GET_LANGUAGE, &language) &&
1247 (language < RETRO_LANGUAGE_LAST) && (language != RETRO_LANGUAGE_ENGLISH))
1248 core_options_intl.local = option_defs_intl[language];
1250 environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL, &core_options_intl);
1255 size_t option_index = 0;
1256 size_t num_options = 0;
1257 struct retro_variable *variables = NULL;
1258 char **values_buf = NULL;
1260 /* Determine number of options
1261 * > Note: We are going to skip a number of irrelevant
1262 * core options when building the retro_variable array,
1263 * but we'll allocate space for all of them. The difference
1264 * in resource usage is negligible, and this allows us to
1265 * keep the code 'cleaner' */
1268 if (option_defs_us[num_options].key)
1274 /* Allocate arrays */
1275 variables = (struct retro_variable *)calloc(num_options + 1, sizeof(struct retro_variable));
1276 values_buf = (char **)calloc(num_options, sizeof(char *));
1278 if (!variables || !values_buf)
1281 /* Copy parameters from option_defs_us array */
1282 for (i = 0; i < num_options; i++)
1284 const char *key = option_defs_us[i].key;
1285 const char *desc = option_defs_us[i].desc;
1286 const char *default_value = option_defs_us[i].default_value;
1287 struct retro_core_option_value *values = option_defs_us[i].values;
1289 size_t default_index = 0;
1291 values_buf[i] = NULL;
1293 /* Skip options that are irrelevant when using the
1294 * old style core options interface */
1295 if ((strcmp(key, "pcsx_rearmed_show_gpu_peops_settings") == 0))
1300 size_t num_values = 0;
1302 /* Determine number of values */
1305 if (values[num_values].value)
1307 /* Check if this is the default value */
1309 if (strcmp(values[num_values].value, default_value) == 0)
1310 default_index = num_values;
1312 buf_len += strlen(values[num_values].value);
1319 /* Build values string */
1324 buf_len += num_values - 1;
1325 buf_len += strlen(desc);
1327 values_buf[i] = (char *)calloc(buf_len, sizeof(char));
1331 strcpy(values_buf[i], desc);
1332 strcat(values_buf[i], "; ");
1334 /* Default value goes first */
1335 strcat(values_buf[i], values[default_index].value);
1337 /* Add remaining values */
1338 for (j = 0; j < num_values; j++)
1340 if (j != default_index)
1342 strcat(values_buf[i], "|");
1343 strcat(values_buf[i], values[j].value);
1349 variables[option_index].key = key;
1350 variables[option_index].value = values_buf[i];
1355 environ_cb(RETRO_ENVIRONMENT_SET_VARIABLES, variables);
1362 for (i = 0; i < num_options; i++)
1366 free(values_buf[i]);
1367 values_buf[i] = NULL;