Refactor emulator configurations and optimize performance settings for RK3326

This commit is contained in:
Douglas Teles
2026-04-02 16:11:48 -03:00
parent 66c946377a
commit 0ea34a97fc
10 changed files with 79 additions and 25 deletions
@@ -435,7 +435,7 @@ memory_show = "false"
memory_update_interval = "256"
menu_battery_level_enable = "true"
menu_core_enable = "true"
menu_driver = "xmb"
menu_driver = "ozone"
menu_dynamic_wallpaper_enable = "false"
menu_enable_widgets = "true"
menu_font_color_blue = "255"
@@ -734,7 +734,7 @@ video_context_driver = "wayland"
video_crop_overscan = "true"
video_ctx_scaling = "false"
video_disable_composition = "false"
video_driver = "glcore"
video_driver = "gl"
video_filter = ""
video_filter_dir = "~/.config/retroarch/filters/video"
video_font_enable = "true"
@@ -742,8 +742,8 @@ video_font_path = "/usr/share/retroarch-assets/xmb/monochrome/font.ttf"
video_font_size = "32.000000"
video_force_aspect = "true"
video_force_srgb_disable = "false"
video_frame_delay = "0"
video_frame_delay_auto = "false"
video_frame_delay = "4"
video_frame_delay_auto = "true"
video_fullscreen = "true"
video_fullscreen_x = "0"
video_fullscreen_y = "0"
@@ -760,7 +760,7 @@ video_layout_directory = "~/.config/retroarch/layouts"
video_layout_enable = "true"
video_layout_path = ""
video_layout_selected_view = "0"
video_max_swapchain_images = "3"
video_max_swapchain_images = "2"
video_message_color = "ffff00"
video_message_pos_x = "0.049999"
video_message_pos_y = "0.049999"
@@ -33,7 +33,7 @@ PatchFastBoot = true
[GPU]
Renderer = Software
Renderer = OpenGL
Adapter =
ResolutionScale = 1
Multisamples = 1
@@ -81,7 +81,7 @@ ShowSpeed = false
ShowResolution = false
ShowStatusIndicators = true
ShowEnhancements = false
DisplayAllFrames = true
DisplayAllFrames = false
VSync = false
MaxFPS = 0.000000
@@ -157,12 +157,12 @@ FastmemMode = MMap
[CDROM]
ReadaheadSectors = 8
ReadaheadSectors = 16
RegionCheck = false
LoadImageToRAM = false
MuteCDAudio = false
ReadSpeedup = 1
SeekSpeedup = 1
ReadSpeedup = 2
SeekSpeedup = 2
[Audio]
@@ -125,5 +125,9 @@ fi
sed -i '/\[Cheevos\]/,/^\s*$/s/Enabled =.*/Enabled = false/' ${CONF_FILE}
# Panfrost optimization for Mali-G31
export PAN_MESA_DEBUG=forcepack
export MESA_NO_ERROR=1
#Run Duckstation
${EMUPERF} duckstation-sa -fullscreen -bigpicture -nogui -- "${1}" > /dev/null 2>&1
@@ -2,7 +2,22 @@
backend = pulse
[config]
rend.Resolution = 240
rend.Resolution = 480
pvr.rend = 0
pvr.AutoSkipFrame = 1
pvr.RenderToTextureBuffer = 0
rend.TextureUpscale = 1
rend.Fog = 1
rend.FloatVMUs = 0
rend.ShowFPS = no
rend.WideScreen = no
rend.SuperWideScreen = no
rend.vsync = yes
ta_skip = 0
rend.ThreadedRendering = 1
aica.NoBatch = 0
Dynarec.Enabled = 1
Dynarec.idleskip = 1
[input]
maple_sdl_joystick_0 = 0
@@ -143,6 +143,10 @@ fi
echo "VSYNC set to: ${VSYNC}"
echo "Launching /usr/bin/flycast ${1}"
# Panfrost optimization for Mali-G31
export PAN_MESA_DEBUG=forcepack
export MESA_NO_ERROR=1
#Run flycast emulator
$GPTOKEYB "flycast" -c "${CONF_DIR}/flycast.gptk" &
${EMUPERF} /usr/bin/flycast "${1}"
@@ -18,11 +18,11 @@ DEFAULT_FREQUENCY = 33600
# Swaps left and right channels
SWAP_CHANNELS = False
# Size of primary buffer in output samples. This is where audio is loaded after it's extracted from n64's memory.
PRIMARY_BUFFER_SIZE = 16384
PRIMARY_BUFFER_SIZE = 8192
# Fullness level target for Primary audio buffer, in equivalent output samples. This value must be larger than the SECONDARY_BUFFER_SIZE. Decreasing this value will reduce audio latency but requires a faster PC to avoid choppiness. Increasing this will increase audio latency but reduce the chance of drop-outs.
PRIMARY_BUFFER_TARGET = 2048
PRIMARY_BUFFER_TARGET = 4096
# Size of secondary buffer in output samples. This is SDL's hardware buffer. The SDL documentation states that this should be a power of two between 512 and 8192.
SECONDARY_BUFFER_SIZE = 1024
SECONDARY_BUFFER_SIZE = 2048
# Audio resampling algorithm. src-sinc-best-quality, src-sinc-medium-quality, src-sinc-fastest, src-zero-order-hold, src-linear, speex-fixed-{10-0}, trivial
RESAMPLE = "trivial"
# Volume control type: 1 = SDL (only affects Mupen64Plus output) 2 = OSS mixer (adjusts master PC volume)
@@ -418,16 +418,29 @@ FXAA = 0
# Max level of Anisotropic Filtering, 0 for off
anisotropy = 0
# Bilinear filtering mode (0=N64 3point, 1=standard)
# @rishooty: best to use this at 1x native res, any higher turn it off.
bilinearMode = 1
# Hybrid texture filter (reduces texture aliasing, costs GPU)
EnableHybridFilter = 0
# Inaccurate texture coords (faster but less precise)
EnableInaccurateTextureCoordinates = 1
###### Compatibility ######
# Make texrect coordinates continuous to avoid black lines between them. (0=Off/default, 1=Auto, 2=Force)
CorrectTexrectCoords = 1
CorrectTexrectCoords = 0
# Copy auxiliary buffers to RDRAM (default: 0)
EnableCopyAuxiliaryToRDRAM = 1
EnableCopyAuxiliaryToRDRAM = 0
# Render 2D texrects in native resolution to fix misalignment between parts of 2D image. (0=Off/default, 1=Optimized, 2=Unoptimized)")
EnableNativeResTexrects = 1
# Copy color buffer to RDRAM (0=off, 1=sync, 2=async)
EnableCopyColorToRDRAM = 0
# Copy depth buffer to RDRAM (0=off, 1=from video, 2=software)
EnableCopyDepthToRDRAM = 0
# Enable legacy blending (faster on low-end GPUs)
EnableLegacyBlending = 1
# LOD emulation (costly, disable for performance)
EnableLOD = 0
# Background rendering mode (0=onepiece, 1=stripped)
BackgroundsMode = 0
###### Other ######
# Enable threaded video backend at the cost of input lag
@@ -602,7 +615,7 @@ ScreenUpdateSetting = 4
# Force to use normal alpha blender
NormalAlphaBlender = False
# Use a faster algorithm to speed up texture loading and CRC computation
FastTextureLoading = False
FastTextureLoading = True
# Use different texture coordinate clamping code
AccurateTextureMapping = True
# Force emulated frame buffers to be in N64 native resolution
@@ -186,4 +186,8 @@ SET_PARAMS+=" --audio mupen64plus-audio-sdl${SIMPLESUFFIX}.so"
# Echo the command line options to the log for debugging
echo ${SET_PARAMS}
# Panfrost optimization: forcepack reduces draw call overhead on Mali-G31
export PAN_MESA_DEBUG=forcepack
export MESA_NO_ERROR=1
${EMUPERF} /usr/local/bin/mupen64plus${SIMPLESUFFIX} --configdir ${TMP} ${SET_PARAMS} "${TMP}/${ROM}"
@@ -117,4 +117,8 @@ ARG=${1//[\\]/}
echo "VSYNC set to: ${VSYNC}"
echo "Launching /usr/bin/ppsspp ${ARG}"
# Panfrost optimization: forcepack reduces draw call overhead on Mali-G31
export PAN_MESA_DEBUG=forcepack
export MESA_NO_ERROR=1
${EMUPERF} ppsspp --pause-menu-exit "${ARG}"
@@ -101,15 +101,15 @@ TextureFiltering = 1
BufferFiltering = 1
InternalResolution = 1
AndroidHwScale = 1
HighQualityDepth = 1
FrameSkip = 3
HighQualityDepth = 0
FrameSkip = 2
FrameSkipType = 0
AutoFrameSkip = True
FrameRate = -1
FrameRate2 = -1
FrameSkipUnthrottle = True
ForceMaxEmulatedFPS = 30
AnisotropyLevel = 4
AnisotropyLevel = 0
VertexDecCache = True
TextureBackoffCache = True
TextureSecondaryCache = False
@@ -130,7 +130,7 @@ TexScalingType = 0
TexDeposterize = False
VSyncInterval = True
DisableStencilTest = False
BloomHack = 2
BloomHack = 0
TimerHack = False
SplineBezierQuality = 0
HardwareTessellation = False
@@ -146,8 +146,8 @@ UnthrottleMode = CONTINUOUS
IgnoreScreenInsets = True
TexHardwareScaling = False
TextureShader = Off
InflightFrames = 3
RenderDuplicateFrames = True
InflightFrames = 2
RenderDuplicateFrames = False
ShaderChainRequires60FPS = False
ClearFramebuffersOnFirstUseHack = False
SoftwareRendererJit = True
@@ -179,7 +179,7 @@ UberShaderFragment = True
[Sound]
Enable = True
AudioBackend = 0
AudioLatency = 1
AudioLatency = 2
ExtraAudioBuffering = False
SoundSpeedHack = False
AudioResampler = False
@@ -0,0 +1,10 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024-present ArchR (https://github.com/archr-linux/Arch-R)
# Panfrost optimization for Mali-G31 (Bifrost)
# forcepack: reduces draw call overhead by packing vertex attributes
export PAN_MESA_DEBUG=forcepack
# Skip GL error checking for better performance in emulators
export MESA_NO_ERROR=1