diff --git a/Assets/dll/melonDS.wbx.zst b/Assets/dll/melonDS.wbx.zst index 3576676b02..aa442b4496 100644 Binary files a/Assets/dll/melonDS.wbx.zst and b/Assets/dll/melonDS.wbx.zst differ diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs index 0f8d76e0c5..0961d43d33 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs @@ -37,6 +37,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS public byte MicVolume; public byte GBALightSensor; public byte ConsiderAltLag; + public byte UseTouchInterpolation; } [StructLayout(LayoutKind.Sequential)] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.ISettable.cs index 563ec856c2..e4ec3d2f5c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.ISettable.cs @@ -225,6 +225,11 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS [DefaultValue(true)] public bool UseRealTime { get; set; } + [DisplayName("Touch Interpolation")] + [Description("If true, touch inputs will be interpolated, creating smoother touch movements. Required to progress in some games. May be undesirable when TASing.")] + [DefaultValue(true)] + public bool UseTouchInterpolation { get; set; } + [DisplayName("DSi Mode")] [Description("If true, DSi mode will be used. Forced true if a DSiWare rom is detected.")] [DefaultValue(false)] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs index a5106563a5..a7b177d0af 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs @@ -503,6 +503,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS MicVolume = (byte)(controller.IsPressed("Microphone") ? controller.AxisValue("Mic Volume") : 0), GBALightSensor = (byte)controller.AxisValue("GBA Light Sensor"), ConsiderAltLag = (byte)(_settings.ConsiderAltLag ? 1 : 0), + UseTouchInterpolation = (byte)(_activeSyncSettings.UseTouchInterpolation ? 1 : 0), }; } diff --git a/waterbox/melon/BizInterface.cpp b/waterbox/melon/BizInterface.cpp index 5bfc4895ca..77b00b2b6f 100644 --- a/waterbox/melon/BizInterface.cpp +++ b/waterbox/melon/BizInterface.cpp @@ -44,6 +44,7 @@ struct MyFrameInfo : public FrameInfo u8 MicVolume; u8 GBALightSensor; bool ConsiderAltLag; + bool UseTouchInterpolation; }; static s16 biz_mic_input[735]; @@ -71,8 +72,15 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f) if (f->Keys & 0x1000) { - // move touch coords incrementally to our new touch point - f->NDS->MoveTouch(f->TouchX, f->TouchY); + if (f->UseTouchInterpolation) + { + // move touch coords incrementally to our new touch point + f->NDS->MoveTouch(f->TouchX, f->TouchY); + } + else + { + f->NDS->TouchScreen(f->TouchX, f->TouchY); + } } else { @@ -113,8 +121,11 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f) if (f->Keys & 0x1000) { - // finalize touch after emulation finishes - f->NDS->TouchScreen(f->TouchX, f->TouchY); + if (f->UseTouchInterpolation) + { + // finalize touch after emulation finishes + f->NDS->TouchScreen(f->TouchX, f->TouchY); + } } auto& renderer3d = f->NDS->GetRenderer3D();