/* Copyright 2021 flyinghead This file is part of Flycast. Flycast is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. Flycast is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Flycast. If not, see . */ #include "option.h" #include "network/naomi_network.h" #include "debug/gdb_server.h" namespace config { // Dynarec Option DynarecEnabled("Dynarec.Enabled", true); Option Sh4Clock("Sh4Clock", 200); // General Option Cable("Dreamcast.Cable", 3); // TV Composite Option Region("Dreamcast.Region", 1); // USA Option Broadcast("Dreamcast.Broadcast", 0); // NTSC Option Language("Dreamcast.Language", 1); // English Option AutoLoadState("Dreamcast.AutoLoadState"); Option AutoSaveState("Dreamcast.AutoSaveState"); Option SavestateSlot("Dreamcast.SavestateSlot"); Option ForceFreePlay("ForceFreePlay", true); Option FetchBoxart("FetchBoxart", true); Option BoxartDisplayMode("BoxartDisplayMode", true); Option UIScaling("UIScaling", 100); Option UITheme("UITheme", 0); // Sound Option DSPEnabled("aica.DSPEnabled", false); #if HOST_CPU == CPU_ARM Option AudioBufferSize("aica.BufferSize", 5644); // 128 ms #else Option AudioBufferSize("aica.BufferSize", 2822); // 64 ms #endif Option AutoLatency("aica.AutoLatency", #ifdef __ANDROID__ true #else false #endif ); OptionString AudioBackend("backend", "auto", "audio"); AudioVolumeOption AudioVolume; Option VmuSound("VmuSound", false, "audio"); // Rendering RendererOption RendererType; Option UseMipmaps("rend.UseMipmaps", true); Option Widescreen("rend.WideScreen"); Option SuperWidescreen("rend.SuperWideScreen"); Option ShowFPS("rend.ShowFPS"); Option RenderToTextureBuffer("rend.RenderToTextureBuffer"); Option TranslucentPolygonDepthMask("rend.TranslucentPolygonDepthMask"); Option ModifierVolumes("rend.ModifierVolumes", true); Option TextureUpscale("rend.TextureUpscale", 1); Option MaxFilteredTextureSize("rend.MaxFilteredTextureSize", 256); Option ExtraDepthScale("rend.ExtraDepthScale", 1.f); Option CustomTextures("rend.CustomTextures"); Option DumpTextures("rend.DumpTextures"); Option ScreenStretching("rend.ScreenStretching", 100); Option Fog("rend.Fog", true); Option FloatVMUs("rend.FloatVMUs"); Option Rotate90("rend.Rotate90"); Option PerStripSorting("rend.PerStripSorting"); #ifdef __APPLE__ Option DelayFrameSwapping("rend.DelayFrameSwapping", false); #else Option DelayFrameSwapping("rend.DelayFrameSwapping", true); #endif Option WidescreenGameHacks("rend.WidescreenGameHacks"); std::array, 4> CrosshairColor { Option("rend.CrossHairColor1"), Option("rend.CrossHairColor2"), Option("rend.CrossHairColor3"), Option("rend.CrossHairColor4"), }; Option CrosshairSize("rend.CrosshairSize", 40); Option SkipFrame("ta.skip"); Option MaxThreads("pvr.MaxThreads", 3); Option AutoSkipFrame("pvr.AutoSkipFrame", 0); Option RenderResolution("rend.Resolution", 480); Option IntegerScale("rend.IntegerScale", false); Option LinearInterpolation("rend.LinearInterpolation", true); Option VSync("rend.vsync", true); Option PixelBufferSize("rend.PixelBufferSize", 512_MB); Option AnisotropicFiltering("rend.AnisotropicFiltering", 1); Option TextureFiltering("rend.TextureFiltering", 0); // Default Option ThreadedRendering("rend.ThreadedRendering", true); Option DupeFrames("rend.DupeFrames", false); Option PerPixelLayers("rend.PerPixelLayers", 32); #ifdef TARGET_UWP Option NativeDepthInterpolation("rend.NativeDepthInterpolation", true); #else Option NativeDepthInterpolation("rend.NativeDepthInterpolation", false); #endif Option EmulateFramebuffer("rend.EmulateFramebuffer", false); Option FixUpscaleBleedingEdge("rend.FixUpscaleBleedingEdge", true); Option CustomGpuDriver("rend.CustomGpuDriver", false); #ifdef VIDEO_ROUTING Option VideoRouting("rend.VideoRouting", false); Option VideoRoutingScale("rend.VideoRoutingScale", false); Option VideoRoutingVRes("rend.VideoRoutingVRes", 720); #endif // Misc Option SerialConsole("Debug.SerialConsoleEnabled"); Option SerialPTY("Debug.SerialPTY"); Option GDB("Debug.GDBEnabled"); Option GDBPort("Debug.GDBPort", debugger::DEFAULT_PORT); Option GDBWaitForConnection("Debug.GDBWaitForConnection"); Option UseReios("UseReios"); Option FastGDRomLoad("FastGDRomLoad", false); Option RamMod32MB("Dreamcast.RamMod32MB", false); Option OpenGlChecks("OpenGlChecks", false, "validate"); Option, false> ContentPath("Dreamcast.ContentPath"); Option HideLegacyNaomiRoms("Dreamcast.HideLegacyNaomiRoms", true); Option UploadCrashLogs("UploadCrashLogs", true); Option DiscordPresence("DiscordPresence", true); #if defined(__ANDROID__) && !defined(LIBRETRO) Option UseSafFilePicker("UseSafFilePicker", true); #endif OptionString LogServer("LogServer", "", "log"); // Profiler Option ProfilerEnabled("Profiler.Enabled"); Option ProfilerDrawToGUI("Profiler.DrawGUI"); Option ProfilerOutputTTY("Profiler.OutputTTY"); Option ProfilerFrameWarningTime("Profiler.FrameWarningTime", 1.0f / 55.0f); // Network Option NetworkEnable("Enable", false, "network"); Option ActAsServer("ActAsServer", false, "network"); OptionString DNS("DNS", "dns.flyca.st", "network"); OptionString NetworkServer("server", "", "network"); Option LocalPort("LocalPort", NaomiNetwork::SERVER_PORT, "network"); Option EmulateBBA("EmulateBBA", false, "network"); Option EnableUPnP("EnableUPnP", true, "network"); Option GGPOEnable("GGPO", false, "network"); Option GGPODelay("GGPODelay", 0, "network"); Option NetworkStats("Stats", true, "network"); Option GGPOAnalogAxes("GGPOAnalogAxes", 0, "network"); Option GGPOChat("GGPOChat", true, "network"); Option GGPOChatTimeoutToggle("GGPOChatTimeoutToggle", true, "network"); Option GGPOChatTimeout("GGPOChatTimeout", 10, "network"); Option NetworkOutput("NetworkOutput", false, "network"); Option MultiboardSlaves("MultiboardSlaves", 1, "network"); Option BattleCableEnable("BattleCable", false, "network"); Option UseDCNet("DCNet", false, "network"); OptionString ISPUsername("ISPUsername", "flycast1", "network"); #ifdef USE_OMX Option OmxAudioLatency("audio_latency", 100, "omx"); Option OmxAudioHdmi("audio_hdmi", true, "omx"); #endif // Maple Option MouseSensitivity("MouseSensitivity", 100, "input"); Option VirtualGamepadVibration("VirtualGamepadVibration", 20, "input"); Option VirtualGamepadTransparency("VirtualGamepadTransparency", 37, "input"); std::array, 4> MapleMainDevices { Option("device1", MDT_SegaController, "input"), Option("device2", MDT_None, "input"), Option("device3", MDT_None, "input"), Option("device4", MDT_None, "input"), }; std::array, 2>, 4> MapleExpansionDevices {{ {{Option("device1.1", MDT_SegaVMU, "input"), Option("device1.2", MDT_SegaVMU, "input")}}, {{Option("device2.1", MDT_None, "input"), Option("device2.2", MDT_None, "input")}}, {{Option("device3.1", MDT_None, "input"), Option("device3.2", MDT_None, "input")}}, {{Option("device4.1", MDT_None, "input"), Option("device4.2", MDT_None, "input")}}, }}; Option PerGameVmu("PerGameVmu", false, "config"); #ifdef _WIN32 Option UseRawInput("RawInput", false, "input"); #endif Option UsePhysicalVmuMemory("UsePhysicalVmuMemory", true); #ifdef USE_LUA Option LuaFileName("LuaFileName", "flycast.lua"); #endif // RetroAchievements Option EnableAchievements("Enabled", false, "achievements"); Option AchievementsHardcoreMode("HardcoreMode", false, "achievements"); OptionString AchievementsUserName("UserName", "", "achievements"); OptionString AchievementsToken("Token", "", "achievements"); } // namespace config