ui/overlay: Fix enhanced frame pacing naming and disable frameskip for now. (#99)

Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
swurl 2025-05-10 11:38:06 -04:00
parent bc649965ee
commit be552c37a1
10 changed files with 91 additions and 185 deletions

View file

@ -9,7 +9,6 @@ export NDK_CCACHE=$(which ccache)
export ANDROID_KEYSTORE_FILE=~/android.keystore
export ANDROID_KEYSTORE_PASS=`cat ~/android.pass`
export ANDROID_KEY_ALIAS=`cat ~/android.alias`
export ANDROID_HOME=/opt/android-sdk/
cd src/android
chmod +x ./gradlew

View file

@ -132,7 +132,7 @@ jobs:
echo $GIT_TAG_NAME
- name: Build
run: JAVA_HOME=$JAVA_HOME_21_X64 ./.ci/android/build.sh
run: ANDROID_HOME=/opt/android-sdk ./.ci/android/build.sh
- name: Package Android artifacts
run: ./.ci/android/package.sh

View file

@ -129,7 +129,7 @@ jobs:
echo $GIT_TAG_NAME
- name: Build
run: JAVA_HOME=$JAVA_HOME_21_X64 ./.ci/android/build.sh
run: ANDROID_HOME=/opt/android-sdk ./.ci/android/build.sh
- name: Package Android artifacts
run: ./.ci/android/package.sh

View file

@ -42,7 +42,7 @@ Check out our [website](https://eden-emu.dev) for the latest news on exciting fe
## Development
Most of the development happens on our Git server. It is also where [our central repository](https://git.eden-emu.dev/eden-emu/eden) is hosted. For development discussions, please wait to join us on [Discord](W.I.P) once it is public.
Most of the development happens on our Git server. It is also where [our central repository](https://git.eden-emu.dev/eden-emu/eden) is hosted. For development discussions, please join us on [Discord](https://discord.gg/ynGGJAN4Rx).
If you would like to contribute, we are open to new developers and pull requests. Please ensure that your work is of a high standard and properly documented.
You can also contact any of the developers on Discord to learn more about the current state of the emulator.
@ -55,23 +55,21 @@ You can also contact any of the developers on Discord to learn more about the cu
## Download
You will be able to download the latest releases from [here](https://git.eden-emu.dev/eden-emu/eden/releases) once public.
You will be able to download the latest releases from [here](https://git.eden-emu.dev/eden-emu/eden/releases), or with MEGA links provided on Discord.
## Support
If you enjoy the project and would like to support us financially, please check out Camille's donations page!
<br>
<br>
Donations are not available yet.
If you enjoy the project and would like to support us financially, please check out our developers' donation pages!
- [crueter/Camille](https://liberapay.com/crueter)
Any donations received will go towards things such as:
* Switch consoles to explore and reverse-engineer the hardware
* Switch games for testing, reverse-engineering, and implementing new features
* Web hosting and infrastructure setup
* Software licences (e.g. Visual Studio, IDA Pro, etc.)
* Additional hardware (e.g. GPUs as needed to improve rendering support, other peripherals to add support for, etc.)
* CI Infrastructure
If you would prefer to support us in a different way, please join our [Discord](W.I.P), once public, and talk to Camille.
If you would prefer to support us in a different way, please join our [Discord](https://discord.gg/ynGGJAN4Rx), once public, and talk to Camille.
## License

View file

@ -17,6 +17,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
RENDERER_USE_DISK_SHADER_CACHE("use_disk_shader_cache"),
RENDERER_FORCE_MAX_CLOCK("force_max_clock"),
RENDERER_ASYNCHRONOUS_SHADERS("use_asynchronous_shaders"),
RENDERER_FAST_GPU("use_fast_gpu_time"),
RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"),
RENDERER_DEBUG("debug"),
RENDERER_DYNA_STATE3("dyna_state3"),

View file

@ -52,6 +52,10 @@ abstract class SettingsItem(
val isEditable: Boolean
get() {
if (setting.key == BooleanSetting.FRAME_SKIPPING.key) {
// disabled for now
return false
}
// Can't change docked mode toggle when using handheld mode
if (setting.key == BooleanSetting.USE_DOCKED_MODE.key) {
return NativeInput.getStyleIndex(0) != NpadStyleIndex.Handheld
@ -210,58 +214,6 @@ abstract class SettingsItem(
override fun reset() = BooleanSetting.USE_DOCKED_MODE.reset()
}
val enableInterpolationSetting = object : AbstractBooleanSetting {
override val key = BooleanSetting.FRAME_INTERPOLATION.key
override fun getBoolean(needsGlobal: Boolean): Boolean =
BooleanSetting.FRAME_INTERPOLATION.getBoolean(needsGlobal)
override fun setBoolean(value: Boolean) =
BooleanSetting.FRAME_INTERPOLATION.setBoolean(value)
override val defaultValue = BooleanSetting.FRAME_INTERPOLATION.defaultValue
override fun getValueAsString(needsGlobal: Boolean): String =
BooleanSetting.FRAME_INTERPOLATION.getValueAsString(needsGlobal)
override fun reset() = BooleanSetting.FRAME_INTERPOLATION.reset()
}
val enableFrameSkippingSetting = object : AbstractBooleanSetting {
override val key = BooleanSetting.FRAME_SKIPPING.key
override fun getBoolean(needsGlobal: Boolean): Boolean =
BooleanSetting.FRAME_SKIPPING.getBoolean(needsGlobal)
override fun setBoolean(value: Boolean) =
BooleanSetting.FRAME_SKIPPING.setBoolean(value)
override val defaultValue = BooleanSetting.FRAME_SKIPPING.defaultValue
override fun getValueAsString(needsGlobal: Boolean): String =
BooleanSetting.FRAME_SKIPPING.getValueAsString(needsGlobal)
override fun reset() = BooleanSetting.FRAME_SKIPPING.reset()
}
val syncCoreSpeedSetting = object : AbstractBooleanSetting {
override val key = BooleanSetting.CORE_SYNC_CORE_SPEED.key
override fun getBoolean(needsGlobal: Boolean): Boolean {
return BooleanSetting.CORE_SYNC_CORE_SPEED.getBoolean(needsGlobal)
}
override fun setBoolean(value: Boolean) {
BooleanSetting.CORE_SYNC_CORE_SPEED.setBoolean(value)
}
override val defaultValue = BooleanSetting.CORE_SYNC_CORE_SPEED.defaultValue
override fun getValueAsString(needsGlobal: Boolean): String =
BooleanSetting.CORE_SYNC_CORE_SPEED.getValueAsString(needsGlobal)
override fun reset() = BooleanSetting.CORE_SYNC_CORE_SPEED.reset()
}
put(
SwitchSetting(
@ -288,7 +240,7 @@ abstract class SettingsItem(
)
put(
SwitchSetting(
syncCoreSpeedSetting,
BooleanSetting.CORE_SYNC_CORE_SPEED,
titleId = R.string.use_sync_core,
descriptionId = R.string.use_sync_core_description
)
@ -339,24 +291,27 @@ abstract class SettingsItem(
SingleChoiceSetting(
IntSetting.RENDERER_NVDEC_EMULATION,
titleId = R.string.nvdec_emulation,
descriptionId = R.string.nvdec_emulation_description,
choicesId = R.array.rendererNvdecNames,
valuesId = R.array.rendererNvdecValues
)
)
put(
SingleChoiceSetting(
IntSetting.RENDERER_ASTC_DECODE_METHOD,
titleId = R.string.accelerate_astc,
choicesId = R.array.astcDecodingMethodNames,
valuesId = R.array.astcDecodingMethodValues
IntSetting.RENDERER_ASTC_DECODE_METHOD,
titleId = R.string.accelerate_astc,
descriptionId = R.string.accelerate_astc_description,
choicesId = R.array.astcDecodingMethodNames,
valuesId = R.array.astcDecodingMethodValues
)
)
put(
SingleChoiceSetting(
IntSetting.RENDERER_ASTC_RECOMPRESSION,
titleId = R.string.astc_recompression,
choicesId = R.array.astcRecompressionMethodNames,
valuesId = R.array.astcRecompressionMethodValues
IntSetting.RENDERER_ASTC_RECOMPRESSION,
titleId = R.string.astc_recompression,
descriptionId = R.string.astc_recompression_description,
choicesId = R.array.astcRecompressionMethodNames,
valuesId = R.array.astcRecompressionMethodValues
)
)
put(
@ -517,7 +472,7 @@ abstract class SettingsItem(
SingleChoiceSetting(
IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT,
titleId = R.string.renderer_optimize_spirv_output,
descriptionId = 0,
descriptionId = R.string.renderer_optimize_spirv_output_description,
choicesId = R.array.optimizeSpirvOutputEntries,
valuesId = R.array.optimizeSpirvOutputValues
)
@ -529,6 +484,13 @@ abstract class SettingsItem(
descriptionId = R.string.renderer_asynchronous_shaders_description
)
)
put(
SwitchSetting(
BooleanSetting.RENDERER_FAST_GPU,
titleId = R.string.use_fast_gpu_time,
descriptionId = R.string.use_fast_gpu_time_description
)
)
put(
SwitchSetting(
BooleanSetting.RENDERER_REACTIVE_FLUSHING,

View file

@ -456,92 +456,30 @@ class SettingsFragmentPresenter(
override val isSaveable = true
}
}
private fun addEdenVeilSettings(sl: ArrayList<SettingsItem>) {
sl.apply {
add(
SwitchSetting(
InterpolationSetting, // The interpolation setting object you've created
titleId = R.string.frame_interpolation, // Use appropriate string resources for the title
descriptionId = R.string.frame_interpolation_description // Description resource for the interpolation setting
)
)
add(
SwitchSetting(
frameSkippingSetting,
titleId = R.string.frame_skipping,
descriptionId = R.string.frame_skipping_description
)
)
add(
SwitchSetting(
BooleanSetting.USE_LRU_CACHE,
titleId = R.string.use_lru_cache,
descriptionId = R.string.use_lru_cache_description
)
)
sl.apply {
add(BooleanSetting.FRAME_INTERPOLATION.key)
add(BooleanSetting.FRAME_SKIPPING.key)
add(BooleanSetting.USE_LRU_CACHE.key)
add(BooleanSetting.RENDERER_FAST_GPU.key)
add(ByteSetting.RENDERER_DYNA_STATE.key)
add(BooleanSetting.RENDERER_DYNA_STATE3.key)
add(BooleanSetting.RENDERER_PROVOKING_VERTEX.key)
add(BooleanSetting.RENDERER_DESCRIPTOR_INDEXING.key)
add(ByteSetting.RENDERER_DYNA_STATE.key)
add(
SwitchSetting(
syncCoreSpeedSetting,
titleId = R.string.use_sync_core,
descriptionId = R.string.use_sync_core_description
)
)
add(
SingleChoiceSetting(
IntSetting.RENDERER_SHADER_BACKEND,
titleId = R.string.shader_backend,
choicesId = R.array.rendererShaderNames,
valuesId = R.array.rendererShaderValues
)
)
add(
SingleChoiceSetting(
IntSetting.RENDERER_NVDEC_EMULATION,
titleId = R.string.nvdec_emulation,
choicesId = R.array.rendererNvdecNames,
valuesId = R.array.rendererNvdecValues
)
)
add(
SingleChoiceSetting(
IntSetting.RENDERER_ASTC_DECODE_METHOD,
titleId = R.string.accelerate_astc,
choicesId = R.array.astcDecodingMethodNames,
valuesId = R.array.astcDecodingMethodValues
)
)
add(
SingleChoiceSetting(
IntSetting.RENDERER_ASTC_RECOMPRESSION,
titleId = R.string.astc_recompression,
choicesId = R.array.astcRecompressionMethodNames,
valuesId = R.array.astcRecompressionMethodValues
)
)
add(
SingleChoiceSetting(
IntSetting.RENDERER_VRAM_USAGE_MODE,
titleId = R.string.vram_usage_mode,
choicesId = R.array.vramUsageMethodNames,
valuesId = R.array.vramUsageMethodValues
)
)
add(
SingleChoiceSetting(
IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT,
titleId = R.string.renderer_optimize_spirv_output,
choicesId = R.array.optimizeSpirvOutputEntries,
valuesId = R.array.optimizeSpirvOutputValues
)
)
add(BooleanSetting.RENDERER_DYNA_STATE3.key)
add(BooleanSetting.RENDERER_PROVOKING_VERTEX.key)
add(BooleanSetting.RENDERER_DESCRIPTOR_INDEXING.key)
add(BooleanSetting.CORE_SYNC_CORE_SPEED.key)
add(IntSetting.RENDERER_SHADER_BACKEND.key)
add(IntSetting.RENDERER_NVDEC_EMULATION.key)
add(IntSetting.RENDERER_ASTC_DECODE_METHOD.key)
add(IntSetting.RENDERER_ASTC_RECOMPRESSION.key)
add(IntSetting.RENDERER_VRAM_USAGE_MODE.key)
add(IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT.key)
}
}
}
private fun addInputPlayer(sl: ArrayList<SettingsItem>, playerIndex: Int) {
sl.apply {
val connectedSetting = object : AbstractBooleanSetting {

View file

@ -565,8 +565,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
var fpsText = String.format("FPS: %.1f", actualFps)
if (enableFrameInterpolation) {
val interpolatedFps = actualFps * 2
fpsText += String.format(" (Interp: %.1f)", interpolatedFps)
fpsText += ("(Enhanced)")
}
if (enableFrameSkipping) {

View file

@ -42,14 +42,10 @@
<!-- Eden`s Veil -->
<string name="eden_veil">Edens Veil</string>
<string name="eden_veil_description">Beyond default</string>
<string name="frame_skipping">WIP: Frameskip</string>
<string name="frame_skipping_description">Toggle frame skipping to improve performance by reducing the number of rendered frames.</string>
<string name="frame_interpolation">Enhanced Frame Pacing</string>
<string name="frame_interpolation_description">Ensures smooth and consistent frame delivery by synchronizing the timing between frames, reducing stuttering and uneven animation. Ideal for games that experience frame timing instability or micro-stutter during gameplay</string>
<string name="use_lru_cache">Enable LRU Cache</string>
<string name="use_lru_cache_description">Enable or disable the Least Recently Used (LRU) cache for improved performance, some games have issue with it, e.g TOTK 1.2.1</string>
<string name="frame_interpolation_description">Ensures smooth and consistent frame delivery by synchronizing the timing between frames, reducing stuttering and uneven animation. Ideal for games that experience frame timing instability or micro-stutters during gameplay.</string>
<string name="dyna_state">Extended Dynamic State</string>
<string name="dyna_state_description">Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Set to 0 to use Yuzu emulated formats.</string>
<string name="dyna_state_description">Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Set to 0 to use Legacy emulated formats.</string>
<string name="dyna_state3">EDS3 + VertexInputDynamicState</string>
<string name="dyna_state3_description">Improves performance on newer devices. Only supported on Vulkan 1.3+ GPUs.</string>
<string name="use_sync_core">Synchronize Core Speed</string>
@ -65,26 +61,6 @@
<string name="descriptor_indexing">Descriptor Indexing</string>
<string name="descriptor_indexing_description">Improves texture and buffer handling, as well as the Maxwell translation layer. Supported by some Vulkan 1.1 GPUs and all Vulkan 1.2+ GPUs.</string>
<!-- ASTC Decoding Method -->
<string name="accelerate_astc">ASTC Decoding Method</string>
<string name="accelerate_astc_description">Pick how ASTC-compressed textures are decoded for rendering.</string>
<string name="accelerate_astc_cpu">CPU</string>
<string name="accelerate_astc_gpu">GPU</string>
<string name="accelerate_astc_async">CPU Asynchronously</string>
<!-- ASTC Recompression Method -->
<string name="astc_recompression">ASTC Recompression Method</string>
<string name="astc_recompression_description">Choose how ASTC textures are recompressed to improve compatibility and performance.</string>
<string name="astc_recompression_uncompressed">Uncompressed</string>
<string name="astc_recompression_bc1">BC1 (Low Quality)</string>
<string name="astc_recompression_bc3">BC3 (Medium Quality)</string>
<!-- VRAM Usage Mode -->
<string name="vram_usage_mode">VRAM Usage Mode</string>
<string name="vram_usage_mode_description">Control how aggressively the emulator allocates and frees GPU memory.</string>
<string name="vram_usage_conservative">Conservative</string>
<string name="vram_usage_aggressive">Aggressive</string>
<!-- Shader Backend -->
<string name="shader_backend">Shader Backend</string>
<string name="shader_backend_description">Choose how shaders are compiled and translated for your GPU.</string>
@ -99,7 +75,6 @@
<string name="nvdec_emulation_none">None</string>
<!-- Optimize SPIRV output -->
<string name="renderer_optimize_spirv_output">Optimize SPIRV output</string>
<string name="never">Never</string>
<string name="on_load">On Load</string>
<string name="always">Always</string>
@ -397,6 +372,8 @@
<string name="set_custom_rtc">Set custom RTC</string>
<!-- Graphics settings strings -->
<string name="frame_skipping">WIP: Frameskip</string>
<string name="frame_skipping_description">Toggle frame skipping to improve performance by reducing the number of rendered frames. This feature is still being worked on and will be enabled in future releases.</string>
<string name="renderer_accuracy">Accuracy level</string>
<string name="renderer_resolution">Resolution (Handheld/Docked)</string>
<string name="renderer_vsync">VSync mode</string>
@ -408,8 +385,12 @@
<string name="renderer_anti_aliasing">Anti-aliasing method</string>
<string name="renderer_force_max_clock">Force maximum clocks (Adreno only)</string>
<string name="renderer_force_max_clock_description">Forces the GPU to run at the maximum possible clocks (thermal constraints will still be applied).</string>
<string name="renderer_optimize_spirv_output">Optimize SPIRV output</string>
<string name="renderer_optimize_spirv_output_description">Optimizes compiled shader to improve GPU efficiency.</string>
<string name="renderer_asynchronous_shaders">Use asynchronous shaders</string>
<string name="renderer_asynchronous_shaders_description">Compiles shaders asynchronously, reducing stutter but may introduce glitches.</string>
<string name="use_fast_gpu_time">Use Fast GPU Time</string>
<string name="use_fast_gpu_time_description">Forces most games to run at their highest native resolution. This option is hacky and may cause issues.</string>
<string name="renderer_reactive_flushing">Use reactive flushing</string>
<string name="renderer_reactive_flushing_description">Improves rendering accuracy in some games at the cost of performance.</string>
<string name="use_disk_shader_cache">Disk shader cache</string>
@ -734,6 +715,30 @@
<string name="renderer_accuracy_high">High</string>
<string name="renderer_accuracy_extreme">Extreme (Slow)</string>
<!-- ASTC Decoding Method -->
<string name="accelerate_astc">ASTC Decoding Method</string>
<string name="accelerate_astc_description">Pick how ASTC-compressed textures are decoded for rendering: CPU (slow, safe), GPU (fast, recommended), or CPU Async (no stutters, may cause issues)</string>
<!-- ASTC Decoding Method Choices -->
<string name="accelerate_astc_cpu">CPU</string>
<string name="accelerate_astc_gpu">GPU</string>
<string name="accelerate_astc_async">CPU Asynchronously</string>
<!-- ASTC Recompression Method -->
<string name="astc_recompression">ASTC Recompression Method</string>
<string name="astc_recompression_description">Choose how ASTC textures are recompressed to improve compatibility and performance. Enabling this option saves VRAM but may lower texture quality.</string>
<!-- ASTC Recompression Method Choices -->
<string name="astc_recompression_uncompressed">Uncompressed</string>
<string name="astc_recompression_bc1">BC1 (Low Quality)</string>
<string name="astc_recompression_bc3">BC3 (Medium Quality)</string>
<!-- ASTC Recompression Method Choices -->
<string name="vram_usage_mode">VRAM Usage Mode</string>
<string name="vram_usage_mode_description">Control how aggressively the emulator allocates and frees GPU memory.</string>
<string name="vram_usage_conservative">Conservative</string>
<string name="vram_usage_aggressive">Aggressive</string>
<!-- Resolutions -->
<string name="resolution_half">0.5X (360p/540p)</string>
<string name="resolution_three_quarter">0.75X (540p/810p)</string>
@ -742,6 +747,10 @@
<string name="resolution_three">3X (2160p/3240p) (Slow)</string>
<string name="resolution_four">4X (2880p/4320p) (Slow)</string>
<!-- LRU Cache -->
<string name="use_lru_cache">Enable LRU Cache</string>
<string name="use_lru_cache_description">Enable or disable the Least Recently Used (LRU) cache, increasing performance by saving CPU process usage. Some games have issue with it, notably TotK 1.2.1, so disable if the game doesn\'t boot or crashes randomly.</string>
<!-- Renderer VSync -->
<string name="renderer_vsync_immediate">Immediate (Off)</string>
<string name="renderer_vsync_mailbox">Mailbox</string>

View file

@ -284,7 +284,7 @@ struct Values {
#ifdef __ANDROID__
SwitchableSetting<bool> frame_interpolation{linkage, true, "frame_interpolation", Category::Renderer,
Specialization::RuntimeList};
SwitchableSetting<bool> frame_skipping{linkage, true, "frame_skipping", Category::Renderer,
SwitchableSetting<bool> frame_skipping{linkage, false, "frame_skipping", Category::Renderer,
Specialization::RuntimeList};
#endif
SwitchableSetting<bool> use_disk_shader_cache{linkage, true, "use_disk_shader_cache",