summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgouchi <gouchi@free.fr>2022-05-07 20:46:03 +0200
committerLinus Groh <mail@linusgroh.de>2022-05-25 23:19:25 +0100
commit74226a6cb3abbd903f01628551b3c98ddd1ace5d (patch)
treeb2c8a4fb1f0e2ff363a81facff10864abe19dd08
parent78dc77f7e40fb7a0aaa17306c08fb8424e302608 (diff)
downloadserenity-74226a6cb3abbd903f01628551b3c98ddd1ace5d.zip
Ports: Add RetroArch
-rw-r--r--Ports/AvailablePorts.md1
-rwxr-xr-xPorts/RetroArch/package.sh35
-rwxr-xr-xPorts/RetroArch/patches/0001-Add-SerenityOS-platform.patch32
-rwxr-xr-xPorts/RetroArch/patches/0002-Find-libgl.patch25
-rwxr-xr-xPorts/RetroArch/patches/0003-Add-strlcat.patch27
-rwxr-xr-xPorts/RetroArch/patches/0004-Disable-pthread_attr_setschedpolicy.patch25
-rwxr-xr-xPorts/RetroArch/patches/0005-Use-SDL-software-instead-of-hardware-rendering.patch25
-rwxr-xr-xPorts/RetroArch/patches/0006-Set-default-options-for-SerenityOS.patch1060
-rw-r--r--Ports/RetroArch/patches/ReadMe.md38
9 files changed, 1268 insertions, 0 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md
index fbb0e38337..86c9720687 100644
--- a/Ports/AvailablePorts.md
+++ b/Ports/AvailablePorts.md
@@ -189,6 +189,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`vlang`](vlang/) | V programming language | weekly.2021.31 | https://github.com/vlang/v |
| [`radare2`](radare2/) | radare2 reverse engineering framework | 5.4.0-git | https://github.com/radareorg/radare2 |
| [`readline`](readline/) | GNU Readline Library | 8.1.2 | https://tiswww.case.edu/php/chet/readline/rltop.html |
+| [`RetroArch`](RetroArch/) | RetroArch | 1.10.3 | https://www.retroarch.com |
| [`RISCVEmu`](RISCVEmu/) | A Basic C++ RISC-V Emulator | ad8ad6a | https://github.com/IdanHo/RISCVEmu |
| [`rsync`](rsync/) | rsync | 3.1.3 | https://rsync.samba.org/ |
| [`ruby`](ruby/) | Ruby | 3.0.4 | https://www.ruby-lang.org/ |
diff --git a/Ports/RetroArch/package.sh b/Ports/RetroArch/package.sh
new file mode 100755
index 0000000000..e820259730
--- /dev/null
+++ b/Ports/RetroArch/package.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port=RetroArch
+useconfigure="true"
+version="1.10.3"
+archive_hash="2af44294e55f5636262284d650cb5fff55c9070ac3a700d4fa55c1f152dcb3f2"
+files="https://github.com/libretro/${port}/archive/refs/tags/v${version}.tar.gz ${port}-${version}.tar.gz $archive_hash"
+auth_type=sha256
+depends=("freetype" "SDL2" "zlib")
+
+configopts=(
+ "--disable-builtinglslang"
+ "--disable-discord"
+ "--disable-glsl"
+ "--disable-glslang"
+ "--disable-opengl"
+ "--disable-slang"
+ "--disable-spirv_cross"
+ "--disable-systemmbedtls"
+ "--disable-update_cores"
+)
+
+launcher_name=RetroArch
+launcher_category=Games
+launcher_command=/usr/local/bin/retroarch
+icon_file=media/retroarch.ico
+
+export CFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/include/LibGL -I${SERENITY_INSTALL_ROOT}/usr/local/include/SDL2"
+
+post_install() {
+echo "==== Post installation instructions ===="
+echo "Please remember to use the online updater"
+echo "to install cores info files using main menu"
+echo "online updater > update core info files"
+echo "before installing libretro cores from the port"
+}
diff --git a/Ports/RetroArch/patches/0001-Add-SerenityOS-platform.patch b/Ports/RetroArch/patches/0001-Add-SerenityOS-platform.patch
new file mode 100755
index 0000000000..82d07e47e7
--- /dev/null
+++ b/Ports/RetroArch/patches/0001-Add-SerenityOS-platform.patch
@@ -0,0 +1,32 @@
+From 53eae76554d4e4629fc1568cec785b644bde1f86 Mon Sep 17 00:00:00 2001
+From: gouchi <gouchi@free.fr>
+Date: Sat, 7 May 2022 18:19:42 +0200
+Subject: [PATCH 1/6] Add SerenityOS platform
+
+---
+ qb/qb.system.sh | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/qb/qb.system.sh b/qb/qb.system.sh
+index c7ac141..f7f198d 100644
+--- a/qb/qb.system.sh
++++ b/qb/qb.system.sh
+@@ -1,5 +1,5 @@
+-PLATFORM_NAME="$(uname -s)"
+-ARCHITECTURE_NAME="$(uname -m)"
++PLATFORM_NAME="SerenityOS"
++ARCHITECTURE_NAME="${SERENITY_ARCH}"
+
+ if [ -n "${CROSS_COMPILE:=}" ]; then
+ case "$CROSS_COMPILE" in
+@@ -18,6 +18,7 @@ if [ -z "$CROSS_COMPILE" ] || [ -z "$OS" ]; then
+ 'Haiku') OS='Haiku';;
+ 'MINGW'*) OS='Win32';;
+ 'SunOS') OS='SunOS';;
++ 'SerenityOS') OS='SerenityOS';;
+ *) OS="Win32";;
+ esac
+ fi
+--
+2.36.0
+
diff --git a/Ports/RetroArch/patches/0002-Find-libgl.patch b/Ports/RetroArch/patches/0002-Find-libgl.patch
new file mode 100755
index 0000000000..b91d692ce7
--- /dev/null
+++ b/Ports/RetroArch/patches/0002-Find-libgl.patch
@@ -0,0 +1,25 @@
+From d65b301e331c52fd78a1b0205e4b3630a6200950 Mon Sep 17 00:00:00 2001
+From: gouchi <gouchi@free.fr>
+Date: Sat, 7 May 2022 18:20:09 +0200
+Subject: [PATCH 2/6] Find libgl
+
+---
+ qb/config.libs.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qb/config.libs.sh b/qb/config.libs.sh
+index 19cd2a6..672fb02 100644
+--- a/qb/config.libs.sh
++++ b/qb/config.libs.sh
+@@ -402,7 +402,7 @@ if [ "$HAVE_OPENGL" != 'no' ] && [ "$HAVE_OPENGLES" != 'yes' ]; then
+ check_lib '' OPENGL -lopengl32
+ else
+ check_header '' OPENGL "GL/gl.h"
+- check_lib '' OPENGL -lGL
++ check_lib '' OPENGL -lgl
+ fi
+
+ if [ "$HAVE_OPENGL" = 'yes' ]; then
+--
+2.36.0
+
diff --git a/Ports/RetroArch/patches/0003-Add-strlcat.patch b/Ports/RetroArch/patches/0003-Add-strlcat.patch
new file mode 100755
index 0000000000..a9a7e6339e
--- /dev/null
+++ b/Ports/RetroArch/patches/0003-Add-strlcat.patch
@@ -0,0 +1,27 @@
+From 05fc282bdbe985fb77d746003ce213012a0292f8 Mon Sep 17 00:00:00 2001
+From: gouchi <gouchi@free.fr>
+Date: Sat, 7 May 2022 18:20:35 +0200
+Subject: [PATCH 3/6] Add strlcat()
+
+---
+ Makefile.common | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Makefile.common b/Makefile.common
+index 580beba..dbfbd39 100644
+--- a/Makefile.common
++++ b/Makefile.common
+@@ -186,6 +186,10 @@ ifneq ($(findstring Linux,$(OS)),)
+ HAVE_UNIX = 1
+ endif
+
++ifneq ($(findstring SerenityOS,$(OS)),)
++ OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_strl.o
++endif
++
+ ifeq ($(HAVE_UNIX), 1)
+ OBJ += frontend/drivers/platform_unix.o
+
+--
+2.36.0
+
diff --git a/Ports/RetroArch/patches/0004-Disable-pthread_attr_setschedpolicy.patch b/Ports/RetroArch/patches/0004-Disable-pthread_attr_setschedpolicy.patch
new file mode 100755
index 0000000000..aefc3cad3c
--- /dev/null
+++ b/Ports/RetroArch/patches/0004-Disable-pthread_attr_setschedpolicy.patch
@@ -0,0 +1,25 @@
+From 365f17fb8bb303608d351f3a91219256746cdc60 Mon Sep 17 00:00:00 2001
+From: gouchi <gouchi@free.fr>
+Date: Sat, 7 May 2022 18:20:52 +0200
+Subject: [PATCH 4/6] Disable pthread_attr_setschedpolicy()
+
+---
+ libretro-common/rthreads/rthreads.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libretro-common/rthreads/rthreads.c b/libretro-common/rthreads/rthreads.c
+index 30ec6ff..08c8a96 100644
+--- a/libretro-common/rthreads/rthreads.c
++++ b/libretro-common/rthreads/rthreads.c
+@@ -161,7 +161,7 @@ sthread_t *sthread_create(void (*thread_func)(void*), void *userdata)
+ }
+
+ /* TODO/FIXME - this needs to be implemented for Switch/3DS */
+-#if !defined(SWITCH) && !defined(USE_WIN32_THREADS) && !defined(_3DS) && !defined(GEKKO) && !defined(__HAIKU__) && !defined(EMSCRIPTEN)
++#if !defined(SWITCH) && !defined(USE_WIN32_THREADS) && !defined(_3DS) && !defined(GEKKO) && !defined(__HAIKU__) && !defined(EMSCRIPTEN) && !defined(__serenity__)
+ #define HAVE_THREAD_ATTR
+ #endif
+
+--
+2.36.0
+
diff --git a/Ports/RetroArch/patches/0005-Use-SDL-software-instead-of-hardware-rendering.patch b/Ports/RetroArch/patches/0005-Use-SDL-software-instead-of-hardware-rendering.patch
new file mode 100755
index 0000000000..ba99681b23
--- /dev/null
+++ b/Ports/RetroArch/patches/0005-Use-SDL-software-instead-of-hardware-rendering.patch
@@ -0,0 +1,25 @@
+From 8494fc6dbd6abc799a2eb02933103361ea0202b0 Mon Sep 17 00:00:00 2001
+From: gouchi <gouchi@free.fr>
+Date: Sat, 7 May 2022 18:21:50 +0200
+Subject: [PATCH 5/6] Use SDL software instead of hardware rendering
+
+---
+ gfx/drivers/sdl2_gfx.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c
+index 4dbe33f..dd67b4a 100644
+--- a/gfx/drivers/sdl2_gfx.c
++++ b/gfx/drivers/sdl2_gfx.c
+@@ -182,7 +182,7 @@ static void sdl2_render_msg(sdl2_video_t *vid, const char *msg)
+
+ static void sdl2_init_renderer(sdl2_video_t *vid)
+ {
+- unsigned flags = SDL_RENDERER_ACCELERATED;
++ unsigned flags = SDL_RENDERER_SOFTWARE;
+
+ if (vid->video.vsync)
+ flags |= SDL_RENDERER_PRESENTVSYNC;
+--
+2.36.0
+
diff --git a/Ports/RetroArch/patches/0006-Set-default-options-for-SerenityOS.patch b/Ports/RetroArch/patches/0006-Set-default-options-for-SerenityOS.patch
new file mode 100755
index 0000000000..9ecb27663b
--- /dev/null
+++ b/Ports/RetroArch/patches/0006-Set-default-options-for-SerenityOS.patch
@@ -0,0 +1,1060 @@
+From 53b20c98eed2b0ac68ad733c18b45da1bcbc771e Mon Sep 17 00:00:00 2001
+From: gouchi <gouchi@free.fr>
+Date: Sat, 7 May 2022 18:26:21 +0200
+Subject: [PATCH 6/6] Set default options for SerenityOS
+
+Set Libretro cores path to `/usr/lib/libretro`
+Set video and audio driver to sdl2
+Disable vsync
+The libretro core won't keep running in the background when we are in the menu.
+Don't pause gameplay when window focus is lost
+Set some config paths to home directory
+---
+ Makefile | 2 +-
+ pkg/serenityos/retroarch.cfg | 1021 ++++++++++++++++++++++++++++++++++
+ 2 files changed, 1022 insertions(+), 1 deletion(-)
+ create mode 100644 pkg/serenityos/retroarch.cfg
+
+diff --git a/Makefile b/Makefile
+index 63c7eda..2aed29f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -235,7 +235,7 @@ install: $(TARGET)
+ mkdir -p $(DESTDIR)$(DATA_DIR)/pixmaps 2>/dev/null || /bin/true
+ cp $(TARGET) $(DESTDIR)$(BIN_DIR)
+ cp tools/cg2glsl.py $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
+- cp retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)
++ cp pkg/serenityos/retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)
+ cp com.libretro.RetroArch.appdata.xml $(DESTDIR)$(DATA_DIR)/metainfo
+ cp retroarch.desktop $(DESTDIR)$(DATA_DIR)/applications
+ cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
+diff --git a/pkg/serenityos/retroarch.cfg b/pkg/serenityos/retroarch.cfg
+new file mode 100644
+index 0000000..088e883
+--- /dev/null
++++ b/pkg/serenityos/retroarch.cfg
+@@ -0,0 +1,1021 @@
++## Skeleton config file for RetroArch
++
++# If set to a directory, the content history playlist will be saved
++# to this directory.
++# content_history_dir =
++
++# Automatically saves a savestate at the end of RetroArch's lifetime.
++# The path is $SRAM_PATH.auto.
++# RetroArch will automatically load any savestate with this path on startup if savestate_auto_load is set.
++# savestate_auto_save = false
++# savestate_auto_load = true
++
++# Load libretro from a dynamic location for dynamically built RetroArch.
++# This option is mandatory.
++
++# Path to a libretro implementation.
++# libretro_path = "/path/to/libretro.so"
++
++# Sets log level for libretro cores (GET_LOG_INTERFACE).
++# If a log level issued by a libretro core is below libretro_log_level, it is ignored.
++# DEBUG logs are always ignored unless verbose mode is activated (--verbose).
++# DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3.
++# libretro_log_level = 0
++
++# Enable or disable verbosity level of frontend.
++# log_verbosity = false
++
++# If this option is enabled, every content file loaded in RetroArch will be
++# automatically added to a history list.
++# history_list_enable = true
++
++# Enable performance counters
++# perfcnt_enable = false
++
++# Path to core options config file.
++# This config file is used to expose core-specific options.
++# It will be written to by RetroArch.
++# A default path will be assigned if not set.
++# core_options_path =
++
++# Path to content history file.
++# RetroArch keeps track of all content loaded in the menu and from CLI directly for convenient quick loading.
++# A default path will be assigned if not set.
++content_history_path = "~/.config/retroarch/content_history.lpl"
++
++# Path to music content history file (optional).
++# RetroArch keeps track of all music content loaded in the menu and from CLI directly for convenient quick loading.
++# A default path will be assigned if not set.
++content_music_history_path = "~/.config/retroarch/content_music_history.lpl"
++
++# Path to image content history file (optional).
++# RetroArch keeps track of all image content loaded in the menu and from CLI directly for convenient quick loading.
++# A default path will be assigned if not set.
++content_image_history_path = "~/.config/retroarch/content_image_history.lpl"
++
++# Path to video content history file (optional).
++# RetroArch keeps track of all video content loaded in the menu and from CLI directly for convenient quick loading.
++# A default path will be assigned if not set.
++content_video_history_path = "~/.config/retroarch/content_video_history.lpl"
++
++# Number of entries that will be kept in content history file.
++# content_history_size = 200
++
++# Content directory. Interacts with RETRO_ENVIRONMENT_GET_CONTENT_DIRECTORY.
++# Usually set by developers who bundle libretro/RetroArch apps to point to assets.
++# content_directory =
++
++# Sets start directory for menu config browser.
++rgui_config_directory = "~/.config/retroarch/config"
++
++# Show startup screen in menu.
++# Is automatically set to false when seen for the first time.
++# This is only updated in config if config_save_on_exit is set to true, however.
++# rgui_show_start_screen = true
++
++# Flushes config to disk on exit. Useful for menu as settings can be modified.
++# Overwrites the config. #include's and comments are not preserved.
++# config_save_on_exit = true
++
++# Shows hidden files and folders in directory listings.
++# show_hidden_files = false
++
++#### Driver
++
++# Input driver. Depending on video driver, it might force a different input driver.
++# input_driver = sdl
++
++# Joypad driver. ("udev", "linuxraw", "paraport", "sdl2", "hid", "dinput")
++# input_joypad_driver =
++
++# Video driver to use. "gl", "xvideo", "sdl", "d3d"
++video_driver = "sdl2"
++
++# Which context implementation to use.
++# Possible ones for desktop are: glx, x-egl, kms-egl, sdl-gl, wgl.
++# By default, tries to use first suitable driver.
++# video_context_driver =
++
++# Audio driver backend. Depending on configuration possible candidates are: alsa, pulse, oss, jack, rsound, roar, openal, sdl, xaudio.
++audio_driver = "sdl2"
++
++# Audio resampler driver backend. Which audio resampler to use.
++# Default will use "sinc".
++# audio_resampler =
++
++# Camera driver.
++# camera_driver =
++
++# Location driver.
++# location_driver =
++
++# Menu driver to use. ("rgui", "xmb", "glui")
++# menu_driver = "rgui"
++
++# Record driver. Used when recording video.
++# record_driver =
++
++#### Video
++
++# Suspends the screensaver if set to true. Is a hint that does not necessarily have to be honored
++# by video driver.
++# suspend_screensaver_enable = true
++
++# Display framerate.
++# fps_show = false
++
++# Display memory.
++# memory_show = false
++
++# Display total number of frames rendered. (only displays if fps_show is enabled)
++# framecount_show =
++
++# Which monitor to prefer. 0 (default) means no particular monitor is preferred, 1 and up (1 being first monitor),
++# suggests RetroArch to use that particular monitor.
++# video_monitor_index = 0
++
++# Start in fullscreen. Can be changed at runtime.
++# video_fullscreen = false
++
++# If fullscreen, prefer using a windowed fullscreen mode.
++# video_windowed_fullscreen = true
++
++# Fullscreen resolution. Resolution of 0 uses the resolution of the desktop.
++# video_fullscreen_x = 0
++# video_fullscreen_y = 0
++
++# Video refresh rate of your CRT monitor.
++# Used to calculate a suitable audio input rate.
++# crt_video_refresh_rate = 59.94
++
++# Video refresh rate of your monitor.
++# Used to calculate a suitable audio input rate.
++# video_refresh_rate = 59.94
++
++# Forcibly disable sRGB FBO support. Some Intel OpenGL drivers on Windows
++# have video problems with sRGB FBO support enabled.
++# video_force_srgb_disable = false
++
++# If this is true and video_aspect_ratio is not set,
++# aspect ratio is decided by libretro implementation.
++# If this is false, 1:1 PAR will always be assumed if video_aspect_ratio is not set.
++# video_aspect_ratio_auto = false
++
++# A floating point value for video aspect ratio (width / height).
++# If this is not set, aspect ratio is assumed to be automatic.
++# Behavior then is defined by video_aspect_ratio_auto.
++# video_aspect_ratio =
++
++# Windowed x resolution scale and y resolution scale
++# (Real x res: base_size * xscale * aspect_ratio, real y res: base_size * yscale)
++# video_scale = 3.0
++
++# Percentage of opacity to use for the window (100 is completely opaque).
++# video_window_opacity = 100
++
++# Whether to enable the default window decorations like border, titlebar etc.
++# video_window_show_decorations = true
++
++# Forcibly disable composition. Only works in Windows Vista/7 for now.
++# video_disable_composition = false
++
++# Video vsync.
++video_vsync = false
++
++# Interval at which a Vsync swap is performed.
++# 1 is normal, 2 is doubled frames, 3 is tripled frames, etc.
++# video_swap_interval = 1
++
++# Max amount of swapchain images.
++# Single buffering = 1, Double buffering = 2, 3 = Triple buffering
++# video_max_swapchain_images = 3
++
++# Attempts to hard-synchronize CPU and GPU. Can reduce latency at cost of performance.
++# video_hard_sync = false
++
++# Sets how many frames CPU can run ahead of GPU when using video_hard_sync.
++# Maximum is 3.
++# video_hard_sync_frames = 0
++
++# Sets how many milliseconds to delay after VSync before running the core.
++# Can reduce latency at cost of higher risk of stuttering.
++# Maximum is 15.
++# video_frame_delay = 0
++
++# Inserts a black frame inbetween frames.
++# Useful for 120 Hz monitors who want to play 60 Hz material with eliminated ghosting.
++# video_refresh_rate should still be configured as if it is a 60 Hz monitor (divide refresh rate by 2).
++# video_black_frame_insertion = false
++
++# Use threaded video driver. Using this might improve performance at possible cost of latency and more video stuttering.
++# video_threaded = false
++
++# Use a shared context for HW rendered libretro cores.
++# Avoids having to assume HW state changes inbetween frames.
++# video_shared_context = false
++
++# Smoothens picture with bilinear filtering. Should be disabled if using pixel shaders.
++# video_smooth = true
++
++# Forces rendering area to stay equal to content aspect ratio or as defined in video_aspect_ratio.
++# video_force_aspect = true
++
++# Only scales video in integer steps.
++# The base size depends on system-reported geometry and aspect ratio.
++# If video_force_aspect is not set, X/Y will be integer scaled independently.
++# video_scale_integer = false
++
++# Index of the aspect ratio selection in the menu.
++# 20 = Config, 21 = 1:1 PAR, 22 = Core Provided, 23 = Custom Aspect Ratio
++# aspect_ratio_index = 20
++
++# Forces cropping of overscanned frames.
++# Exact behavior of this option is implementation specific.
++# video_crop_overscan = true
++
++# Path to shader. Shader can be either Cg, CGP (Cg preset) or GLSL, GLSLP (GLSL preset)
++# video_shader = "/path/to/shader.{cg,cgp,glsl,glslp}"
++
++# Load video_shader on startup.
++# Other shaders can still be loaded later in runtime.
++# video_shader_enable = false
++
++# CPU-based video filter. Path to a dynamic library.
++# video_filter =
++
++# Path to a font used for rendering messages. This path must be defined to enable fonts.
++# Do note that the _full_ path of the font is necessary!
++# video_font_path =
++
++# Size of the font rendered in points.
++# video_font_size = 32
++
++# Enable usage of OSD messages.
++# video_font_enable = true
++
++# Offset for where messages will be placed on screen. Values are in range 0.0 to 1.0 for both x and y values.
++# [0.0, 0.0] maps to the lower left corner of the screen.
++# video_message_pos_x = 0.05
++# video_message_pos_y = 0.05
++
++# Color for message. The value is treated as a hexadecimal value.
++# It is a regular RGB hex number, i.e. red is "ff0000".
++# video_message_color = ffffff
++
++# Background color for OSD messages. Red/Green/Blue values are from 0 to 255 and opacity is 0.0 to 1.0.
++# video_message_bgcolor_enable = false
++# video_message_bgcolor_red = 0
++# video_message_bgcolor_green = 0
++# video_message_bgcolor_blue = 0
++# video_message_bgcolor_opacity = 1.0
++
++# Allows libretro cores to set rotation modes.
++# Setting this to false will honor, but ignore this request.
++# This is useful for vertically oriented content where one manually rotates the monitor.
++# video_allow_rotate = true
++
++# Forces a certain rotation of the video.
++# The rotation is added to rotations which the libretro core sets (see video_allow_rotate).
++# The angle is <value> * 90 degrees counter-clockwise.
++# video_rotation = 0
++
++# Forces a certain orientation of the screen from the operating system.
++# The angle is <value> * 90 degrees counter-clockwise.
++# screen_orientation = 0
++
++# HDR settings
++# video_hdr_enable = false
++# video_hdr_max_nits = 1000.0f
++# video_hdr_paper_white_nits = 200.0f
++# video_hdr_contrast = 1.0f
++# video_hdr_expand_gamut = true
++
++#### Audio
++
++# Enable audio.
++# audio_enable = true
++
++# Enable menu audio sounds.
++# audio_enable_menu = false
++# audio_enable_menu_ok = false
++# audio_enable_menu_cancel = false
++# audio_enable_menu_notice = false
++# audio_enable_menu_bgm = false
++
++# Mutes audio.
++# audio_mute_enable = false
++
++# Mutes audio mixer volume globally.
++# audio_mixer_mute_enable = false
++
++# Audio output samplerate.
++# audio_out_rate = 48000
++
++# Override the default audio device the audio_driver uses. This is driver dependant. E.g. ALSA wants a PCM device, OSS wants a path (e.g. /dev/dsp), Jack wants portnames (e.g. system:playback1,system:playback_2), and so on ...
++# audio_device =
++
++# Audio DSP plugin that processes audio before it's sent to the driver. Path to a dynamic library.
++# audio_dsp_plugin =
++
++# Will sync (block) on audio. Recommended.
++# audio_sync = true
++
++# Desired audio latency in milliseconds. Might not be honored if driver can't provide given latency.
++# audio_latency = 64
++
++# Enable audio rate control.
++# audio_rate_control = true
++
++# Controls audio rate control delta. Defines how much input rate can be adjusted dynamically.
++# Input rate = in_rate * (1.0 +/- audio_rate_control_delta)
++# audio_rate_control_delta = 0.005
++
++# Controls maximum audio timing skew. Defines the maximum change in input rate.
++# Input rate = in_rate * (1.0 +/- max_timing_skew)
++# audio_max_timing_skew = 0.05
++
++# Audio volume. Volume is expressed in dB.
++# 0 dB is normal volume. No gain will be applied.
++# Gain can be controlled in runtime with input_volume_up/input_volume_down.
++# audio_volume = 0.0
++
++# Audio mixer volume. Volume is expressed in dB.
++# 0 dB is normal volume. No gain will be applied.
++# audio_mixer_volume = 0.0
++
++#### Overlay
++
++# Enable the overlay.
++# input_overlay_enable = true
++
++# Show the overlay behind the menu instead of in front.
++# input_overlay_behind_menu = "false"
++
++# Hide the current overlay from appearing inside the menu.
++# input_overlay_hide_in_menu = true
++
++# Path to input overlay.
++# input_overlay =
++
++# Opacity of all the UI elements of the overlay.
++# input_overlay_opacity = 1.0
++
++# Scale of all UI elements of the overlay.
++# input_overlay_scale = 1.0
++
++# Center of all UI elements of the overlay.
++# input_overlay_center_x = 0.5
++# input_overlay_center_y = 0.5
++
++#### Input
++
++# Path to input remapping file.
++# input_remapping_path =
++
++# Input bind timer timeout.
++# Amount of seconds to wait until proceeding to the next bind. Default: 5, minimum: 1
++# input_bind_timeout = 1
++
++# If enabled, overrides the input binds with the remapped binds set for the current core.
++# input_remap_binds_enable = true
++
++# Maximum amount of users supported by RetroArch.
++# input_max_users = 16
++
++# Keyboard layout for input driver if applicable (udev/evdev for now).
++# Syntax is either just layout (e.g. "no"), or a layout and variant separated with colon ("no:nodeadkeys").
++# input_keyboard_layout =
++
++# Defines axis threshold. Possible values are [0.0, 1.0]
++# input_axis_threshold = 0.5
++
++# input_analog_deadzone = 0.0
++
++# input_analog_sensitivity = 1.0
++
++# Enable input auto-detection. Will attempt to autoconfigure
++# joypads, Plug-and-Play style.
++# input_autodetect_enable = true
++
++# Show the input descriptors set by the core instead of the
++# default ones.
++# input_descriptor_label_show = true
++
++# Hide input descriptors that were not set by the core.
++# input_descriptor_hide_unbound = false
++
++# Influence how input polling is done inside RetroArch.
++# 0 : Early - Input polling is performed before call to retro_run.
++# 1 : Normal - Input polling is performed when retro_input_poll is
++# requested.
++# 2 : Late - Input polling is performed on first call to retro_input_state
++# per frame
++#
++# Setting it to 0 or 2 can result in less latency depending on
++# your configuration.
++#
++# When netplay is enabled, the default polling behavior (1) will
++# be used regardless of the value set here.
++# input_poll_type_behavior = 1
++
++# Sets which libretro device is used for a user.
++# Devices are indentified with a number.
++# This is normally saved by the menu.
++# Device IDs are found in libretro.h.
++# These settings are overridden by explicit command-line arguments which refer to input devices.
++# None: 0
++# Joypad (RetroPad): 1
++# Mouse: 2
++# Keyboard: 3
++# Generic Lightgun: 4
++# Joypad w/ Analog (RetroPad + Analog sticks): 5
++# Multitap (SNES specific): 257
++# Super Scope (SNES specific): 260
++# Justifier (SNES specific): 516
++# Justifiers (SNES specific): 772
++
++# input_libretro_device_p1 =
++# input_libretro_device_p2 =
++# input_libretro_device_p3 =
++# input_libretro_device_p4 =
++# input_libretro_device_p5 =
++# input_libretro_device_p6 =
++# input_libretro_device_p7 =
++# input_libretro_device_p8 =
++
++# Keyboard input. Will recognize letters ("a" to "z") and the following special keys (where "kp_"
++# is for keypad keys):
++#
++# left, right, up, down, enter, kp_enter, tab, insert, del, end, home,
++# rshift, shift, ctrl, alt, space, escape, add, subtract, kp_plus, kp_minus,
++# f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12,
++# num0, num1, num2, num3, num4, num5, num6, num7, num8, num9, pageup, pagedown,
++# keypad0, keypad1, keypad2, keypad3, keypad4, keypad5, keypad6, keypad7, keypad8, keypad9,
++# period, capslock, numlock, backspace, multiply, divide, print_screen, scroll_lock,
++# tilde, backquote, pause, quote, comma, minus, slash, semicolon, equals, leftbracket,
++# backslash, rightbracket, kp_period, kp_equals, rctrl, ralt
++#
++# Keyboard input, Joypad and Joyaxis will all obey the "nul" bind, which disables the bind completely,
++# rather than relying on a default.
++# input_player1_a = "x"
++# input_player1_b = "z"
++# input_player1_y = "a"
++# input_player1_x = "s"
++# input_player1_start = "enter"
++# input_player1_select = "rshift"
++# input_player1_l = "q"
++# input_player1_r = "w"
++# input_player1_left = "left"
++# input_player1_right = "right"
++# input_player1_up = "up"
++# input_player1_down = "down"
++# input_player1_l2 =
++# input_player1_r2 =
++# input_player1_l3 =
++# input_player1_r3 =
++
++# Two analog sticks (DualShock-esque).
++# Bound as usual, however, if a real analog axis is bound,
++# it can be read as a true analog.
++# Positive X axis is right, Positive Y axis is down.
++# input_player1_l_x_plus =
++# input_player1_l_x_minus =
++# input_player1_l_y_plus =
++# input_player1_l_y_minus =
++# input_player1_r_x_plus =
++# input_player1_r_x_minus =
++# input_player1_r_y_plus =
++# input_player1_r_y_minus =
++
++# If desired, it is possible to override which joypads are being used for user 1 through 8.
++# First joypad available is 0.
++# input_player1_joypad_index = 0
++# input_player2_joypad_index = 1
++# input_player3_joypad_index = 2
++# input_player4_joypad_index = 3
++# input_player5_joypad_index = 4
++# input_player6_joypad_index = 5
++# input_player7_joypad_index = 6
++# input_player8_joypad_index = 7
++
++# Input device buttons.
++# Figure these out by using RetroArch-Phoenix or retroarch-joyconfig.
++# You can use joypad hats with hnxx, where n is the hat, and xx is a string representing direction.
++# E.g. "h0up"
++# input_player1_a_btn =
++# input_player1_b_btn =
++# input_player1_y_btn =
++# input_player1_x_btn =
++# input_player1_start_btn =
++# input_player1_select_btn =
++# input_player1_l_btn =
++# input_player1_r_btn =
++# input_player1_left_btn =
++# input_player1_right_btn =
++# input_player1_up_btn =
++# input_player1_down_btn =
++# input_player1_l2_btn =
++# input_player1_r2_btn =
++# input_player1_l3_btn =
++# input_player1_r3_btn =
++
++# Menu buttons.
++# menu_search_btn =
++# menu_info_btn =
++# menu_default_btn =
++# menu_scroll_down_btn =
++# menu_scroll_up_btn =
++
++# Swap buttons for OK/Cancel
++# menu_swap_ok_cancel_buttons = false
++
++# Axis for RetroArch D-Pad.
++# Needs to be either '+' or '-' in the first character signaling either positive or negative direction of the axis, then the axis number.
++# Do note that every other input option has the corresponding _btn and _axis binds as well; they are omitted here for clarity.
++# input_player1_left_axis =
++# input_player1_right_axis =
++# input_player1_up_axis =
++# input_player1_down_axis =
++
++# Holding the turbo while pressing another button will let the button enter a turbo mode
++# where the button state is modulated with a periodic signal.
++# The modulation stops when the button itself (not turbo button) is released.
++# input_player1_turbo =
++
++# Describes the period and how long of that period a turbo-enabled button should behave.
++# Numbers are described in frames.
++# input_turbo_period = 6
++# input_turbo_duty_cycle = 3
++
++# This goes all the way to user 8 (*_player2_*, *_player3_*, etc), but omitted for clarity.
++# All input binds have corresponding binds for keyboard (none), joykeys (_btn) and joyaxes (_axis) as well.
++
++# Toggles fullscreen.
++# input_toggle_fullscreen = f
++
++# Saves state.
++# input_save_state = f2
++# Loads state.
++# input_load_state = f4
++
++# State slots. With slot set to 0, save state name is *.state (or whatever defined on commandline).
++# When slot is != 0, path will be $path%d, where %d is slot number.
++# input_state_slot_increase = f7
++# input_state_slot_decrease = f6
++
++# Toggles between fast-forwarding and normal speed.
++# input_toggle_fast_forward = space
++
++# Hold for fast-forward. Releasing button disables fast-forward.
++# input_hold_fast_forward = l
++
++# Key to exit RetroArch cleanly.
++# Killing it in any hard way (SIGKILL, etc) will terminate RetroArch without saving RAM, etc.
++# On Unix-likes, SIGINT/SIGTERM allows a clean deinitialization.
++# input_exit_emulator = escape
++
++# Applies next and previous shader in directory.
++# input_shader_next = m
++# input_shader_prev = n
++
++# Hold button down to rewind. Rewinding must be enabled.
++# input_rewind = r
++
++# Toggle between recording and not.
++# input_movie_record_toggle = o
++
++# Toggle between paused and non-paused state
++# input_pause_toggle = p
++
++# Frame advance when content is paused
++# input_frame_advance = k
++
++# Reset the content.
++# input_reset = h
++
++# Cheats.
++# input_cheat_index_plus = y
++# input_cheat_index_minus = t
++# input_cheat_toggle = u
++
++# Mute/unmute audio
++# input_audio_mute = f9
++
++# Take screenshot
++# input_screenshot = f8
++
++# Netplay flip users.
++# input_netplay_flip_players = i
++
++# Hold for slowmotion.
++# input_slowmotion = e
++
++# Toggles sync to exact content framerate.
++# input_toggle_vrr_runloop =
++
++# Enable other hotkeys.
++# If this hotkey is bound to either keyboard, joybutton or joyaxis,
++# all other hotkeys will be disabled unless this hotkey is also held at the same time.
++# This is useful for RETRO_KEYBOARD centric implementations
++# which query a large area of the keyboard, where it is not desirable
++# that hotkeys get in the way.
++
++# Alternatively, all hotkeys for keyboard could be disabled by the user.
++# input_enable_hotkey_btn =
++
++# Adds a delay in frames before the assigned hotkey blocks input. Useful if the the
++# hotkey input is mapped to another action.
++# input_hotkey_block_delay = "5"
++
++# Increases audio volume.
++# input_volume_up = kp_plus
++# Decreases audio volume.
++# input_volume_down = kp_minus
++
++# Toggles to next overlay. Wraps around.
++# input_overlay_next =
++
++# Toggles eject for disks. Used for multiple-disk content.
++# input_disk_eject_toggle =
++
++# Cycles through disk images. Use after ejecting.
++# Complete by toggling eject again.
++# input_disk_next =
++
++# Toggles menu.
++# input_menu_toggle = f1
++
++# Toggles display of on-screen technical statistics.
++# input_toggle_statistics =
++
++# RetroPad button combination to toggle menu
++# 0: None
++# 1: Down + Y + L1 + R1
++# 2: L3 + R3
++# 3: L1 + R1 + Start + Select
++# 4: Start + Select
++# 5: L3 + R1
++# 6: L1 + R1
++# 7: Hold Start (2 seconds)
++# 8: Hold Select (2 seconds)
++# 9: Down + Select
++# 10: L2 + R2
++# input_menu_toggle_gamepad_combo = 0
++
++# RetroPad button combination to quit
++# 0: None
++# 1: Down + Y + L1 + R1
++# 2: L3 + R3
++# 3: L1 + R1 + Start + Select
++# 4: Start + Select
++# 5: L3 + R1
++# 6: L1 + R1
++# 7: Hold Start (2 seconds)
++# 8: Hold Select (2 seconds)
++# 9: Down + Select
++# 10: L2 + R2
++# input_quit_gamepad_combo = 0
++
++# allow any RetroPad to control the menu
++# all_users_control_menu = false
++
++# Toggles mouse grab. When mouse is grabbed, RetroArch hides the mouse,
++# and keeps the mouse pointer inside the window to allow relative mouse input
++# to work better.
++# input_grab_mouse_toggle = f11
++
++#### Menu
++
++# If disabled, will hide 'Online Updater' inside the menu.
++# menu_show_online_updater = true
++
++# If disabled, will hide the ability to update cores (and core info files) inside the menu.
++# menu_show_core_updater = true
++
++# If disabled, the libretro core will keep running in the background when we
++# are in the menu.
++menu_pause_libretro = true
++
++# If disabled, we use separate controls for menu operation.
++# menu_unified_controls = false
++
++# Enable mouse controls inside the menu.
++# menu_mouse_enable = false
++
++# Enable touch controls inside the menu.
++# menu_pointer_enable = false
++
++# Shows current date and/or time inside menu.
++# menu_timedate_enable = true
++
++# Shows current battery level inside menu.
++# menu_battery_level_enable = true
++
++# Shows current core inside menu.
++# menu_core_enable = true
++
++# Path to an image to set as menu wallpaper.
++# menu_wallpaper =
++
++# Dynamically load a new wallpaper depending on context.
++# menu_dynamic_wallpaper_enable = false
++
++# Type of thumbnail to display. 0 = none, 1 = snaps, 2 = titles, 3 = boxarts
++# menu_thumbnails = 0
++# menu_left_thumbnails = 0
++
++# Wrap-around to beginning and/or end if boundary of list is reached horizontally or vertically.
++# menu_navigation_wraparound_enable = false
++
++# Filter files being shown in filebrowser by supported extensions.
++# menu_navigation_browser_filter_supported_extensions_enable = true
++
++# Collapse subgroup settings into main group to create one big listing of settings
++# per category.
++# menu_collapse_subgroups_enable = false
++
++#### Core
++#
++# Prevent libretro cores from closing RetroArch on exit by loading a dummy core.
++# load_dummy_on_core_shutdown = "true"
++
++# Check for firmware requirement(s) before loading a content.
++# check_firmware_before_loading = "false"
++
++#### User Interface
++
++# Start UI companion driver's interface on boot (if available).
++# ui_companion_start_on_boot = true
++
++# Toggle companion UI on startup (currently only used to show the WIMP UI)
++# ui_companion_toggle = false
++
++# Only init the WIMP UI for this session if this is enabled
++# desktop_menu_enable = true
++
++#### Camera
++
++# Override the default camera device the camera driver uses. This is driver dependant.
++# camera_device =
++
++# Override the default privacy permission for cores that want to access camera services. Is "false" by default.
++# camera_allow = false
++
++#### Location
++
++# Override the default privacy permission for cores that want to access location services. Is "false" by default.
++# location_allow = false
++
++#### Core Updater
++
++# URL to core update directory on buildbot.
++# core_updater_buildbot_url = "http://buildbot.libretro.com"
++
++# URL to assets update directory on buildbot.
++# core_updater_buildbot_assets_url = "http://buildbot.libretro.com/assets/"
++
++# After downloading, automatically extract archives that the downloads are contained inside.
++# core_updater_auto_extract_archive = true
++
++#### Network
++
++# When being client over netplay, use keybinds for user 1.
++# netplay_client_swap_input = false
++
++# The username of the person running RetroArch. This will be used for playing online, for instance.
++# netplay_nickname =
++
++# The amount of delay frames to use for netplay. Increasing this value will increase
++# performance, but introduce more latency.
++# netplay_delay_frames = 0
++
++# Netplay mode for the current user.
++# false is Server, true is Client.
++# netplay_mode = false
++
++# Enable or disable spectator mode for the user during netplay.
++# netplay_spectator_mode_enable = false
++
++# The IP Address of the host to connect to.
++# netplay_ip_address =
++
++# The port of the host IP Address. Can be either a TCP or UDP port.
++# netplay_ip_port = 55435
++
++# Force game hosting to go through a man-in-the-middle server to get around firewalls and NAT/UPnP problems.
++# netplay_use_mitm_server = false
++
++# The requested MITM server to use.
++# netplay_mitm_server = "nyc"
++
++#### Directory
++
++# Sets the System/BIOS directory.
++# Implementations can query for this directory to load BIOSes, system-specific configs, etc.
++system_directory = "~/.config/retroarch/system"
++
++# Save all downloaded files to this directory.
++core_assets_directory = "~/.config/retroarch/downloads"
++
++# Assets directory. This location is queried by default when menu interfaces try to look for
++# loadable assets, etc.
++assets_directory = "~/.config/retroarch/assets"
++
++# Dynamic wallpapers directory. The place to store the wallpapers dynamically
++# loaded by the menu depending on context.
++# dynamic_wallpapers_directory =
++
++# Thumbnails directory. To store thumbnail files.
++thumbnails_directory = "~/.config/retroarch/thumbnails"
++
++# File browser directory. Sets start directory for menu file browser.
++rgui_browser_directory = "~/.config/retroarch/downloads"
++
++# Core directory for libretro core implementations.
++libretro_directory = "/usr/lib/libretro"
++
++# Core info directory for libretro core information.
++libretro_info_path = "~/.config/retroarch/cores"
++
++# Path to content database directory.
++content_database_path = "~/.config/retroarch/database/rdb"
++
++# Saved queries are stored to this directory.
++cursor_directory = "~/.config/retroarch/database/cursors"
++
++# Path to cheat database directory.
++cheat_database_path = "~/.config/retroarch/cheats"
++
++# Defines a directory where CPU-based video filters are kept.
++video_filter_dir = "~/.config/retroarch/filters/video"
++
++# Directory where DSP plugins are kept.
++audio_filter_dir = "~/.config/retroarch/filters/audio"
++
++# Defines a directory where shaders (Cg, CGP, GLSL) are kept for easy access.
++video_shader_dir = "~/.config/retroarch/shaders"
++
++# Recording output directory. Where recordings are saved.
++recording_output_directory = "~/.config/retroarch/records"
++
++# Recording config directory. Where recording settings are kept.
++recording_config_directory = "~/.config/retroarch/records_config"
++
++# Overlay directory. Where overlays are kept for easy access.
++overlay_directory = "~/.config/retroarch/overlay"
++
++# Directory to dump screenshots to.
++screenshot_directory = "~/.config/retroarch/screenshots"
++
++# Directory for joypad autoconfigs.
++# If a joypad is plugged in, that joypad will be autoconfigured if a config file
++# corresponding to that joypad is present in joypad_autoconfig_dir.
++# Input binds which are made explicit (input_playerN_*_btn/axis) will take priority over autoconfigs.
++# Autoconfigs can be created with retroarch-joyconfig, manually, or with a frontend.
++# Requires input_autodetect_enable to be enabled.
++joypad_autoconfig_dir = "~/.config/retroarch/autoconfig"
++
++# Save all remapped controls to this directory.
++input_remapping_directory = "~/.config/retroarch/config/remaps"
++
++# Save all playlists/collections to this directory.
++playlist_directory = "~/.config/retroarch/playlists"
++
++# Save all save files (*.srm) to this directory. This includes related files like .bsv, .rtc, .psrm, etc ...
++# This will be overridden by explicit command line options.
++savefile_directory = "~/.config/retroarch/saves"
++
++# Save all save states (*.state) to this directory.
++# This will be overridden by explicit command line options.
++savestate_directory = "~/.config/retroarch/states"
++
++# If set to a directory, content which is temporarily extracted
++# will be extracted to this directory.
++# cache_directory =
++
++#### RetroAchievements
++
++# Enable the RetroAchievements feature.
++# cheevos_enable = false
++
++# RetroAchievements.org credentials.
++# cheevos_username =
++# cheevos_password =
++
++# The hardcore mode disables savestates and cheating features, but it
++# makes the achievements points double.
++# cheevos_hardcore_mode_enable = false
++
++# Play the 'unlock' audio sound when an achievement is unlocked.
++# cheevos_unlock_sound_enable = false
++
++# Show RetroAchievements related messages right after loading a game, such as
++# successfull login and the number of cheevos you have unlocked for the game.
++# cheevos_verbose_enable = false
++
++# Show achievements' badges in Quick Menu > Achievements List.
++# (note: has no effect if menu_driver = rgui).
++# cheevos_badges_enable = false
++
++# Take a screenshot when an achievement is triggered.
++# cheevos_auto_screenshot = false
++
++# Besides achievements, some games also have leaderboards, where you can
++# compete for high-scores, speedruns, etc.
++# cheevos_leaderboards_enable = false
++
++# Show an on-screen indicator when attempting challenging achievements
++# to provide feedback when the attempt has failed (for achievements that
++# support it)
++# cheevos_challenge_indicators = true
++
++# Send some messages to the RetroAchievements.org saying, for example,
++# where you are in the game, how many lives you have, your score, etc.
++# cheevos_richpresence_enable = true
++
++# Even after unlocking achievements in previous sessions, you may still want
++# to see them triggering in the current session.
++# cheevos_start_active = false
++
++# Unnoficial achievements are used only for achievement creators and testers.
++# cheevos_test_unofficial = false
++
++#### Misc
++
++# Enable rewinding. This will take a performance hit when playing, so it is disabled by default.
++# rewind_enable = false
++
++# Rewinding buffer size in megabytes. Bigger rewinding buffer means you can rewind longer.
++# The buffer should be approx. 20MB per minute of buffer time.
++# rewind_buffer_size = 20
++
++# Rewind granularity. When rewinding defined number of frames, you can rewind several frames at a time, increasing the rewinding speed.
++# rewind_granularity = 1
++
++# Pause gameplay when window focus is lost.
++pause_nonactive = false
++
++# Autosaves the non-volatile SRAM at a regular interval. This is disabled by default unless set otherwise.
++# The interval is measured in seconds. A value of 0 disables autosave.
++# autosave_interval =
++
++# Records video after CPU video filter.
++# video_post_filter_record = false
++
++# Records output of GPU shaded material if available.
++# video_gpu_record = false
++
++# Screenshots output of GPU shaded material if available.
++# video_gpu_screenshot = true
++
++# Watch content shader files for changes and auto-apply as necessary.
++# video_shader_watch_files = false
++
++# Block SRAM from being overwritten when loading save states.
++# Might potentially lead to buggy games.
++# block_sram_overwrite = false
++
++# When saving a savestate, save state index is automatically increased before
++# it is saved.
++# Also, when loading content, the index will be set to the highest existing index.
++# There is no upper bound on the index.
++# savestate_auto_index = false
++
++# Slowmotion ratio. When slowmotion, content will slow down by factor.
++# slowmotion_ratio = 3.0
++
++# The maximum rate at which content will be run when using fast forward. (E.g. 5.0 for 60 fps content => 300 fps cap).
++# RetroArch will go to sleep to ensure that the maximum rate will not be exceeded.
++# Do not rely on this cap to be perfectly accurate.
++# If this is set at 0, then fastforward ratio is unlimited (no FPS cap)
++# fastforward_ratio = 0.0
++
++# Enable stdin/network command interface.
++# network_cmd_enable = false
++# network_cmd_port = 55355
++# stdin_cmd_enable = false
++
++# Enable Sustained Performance Mode in Android 7.0+
++# sustained_performance_mode = true
++
++# File format to use when writing playlists to disk
++# playlist_use_old_format = false
++
++# Keep track of how long each core+content has been running for over time
++# content_runtime_log = false
++
++# vibrate_on_keypress = false
++
++# Enable device vibration for supported cores
++# enable_device_vibration = false
++
++# Enable game mode on supported platforms.
++# Depending on the system, it can result in more stable frame times, less audio
++# crackling, better performance and lower latency. On Linux, Feral GameMode
++# needs to be installed (https://github.com/FeralInteractive/gamemode).
++#
++# gamemode_enable = true
++
++content_favorites_path = "~/.config/retroarch/content_favorites.lpl"
++log_dir = "~/.config/retroarch/logs"
++video_layout_directory = "~/.config/retroarch/layouts"
+--
+2.36.0
+
diff --git a/Ports/RetroArch/patches/ReadMe.md b/Ports/RetroArch/patches/ReadMe.md
new file mode 100644
index 0000000000..ccb290681c
--- /dev/null
+++ b/Ports/RetroArch/patches/ReadMe.md
@@ -0,0 +1,38 @@
+# Patches for RetroArch on SerenityOS
+
+## `0001-Add-SerenityOS-platform.patch`
+
+Add SerenityOS platform
+
+
+## `0002-Find-libgl.patch`
+
+Find libgl
+
+
+## `0003-Add-strlcat.patch`
+
+Add strlcat()
+
+
+## `0004-Disable-pthread_attr_setschedpolicy.patch`
+
+Disable pthread_attr_setschedpolicy()
+
+
+## `0005-Use-SDL-software-instead-of-hardware-rendering.patch`
+
+Use SDL software instead of hardware rendering
+
+
+## `0006-Set-default-options-for-SerenityOS.patch`
+
+Set default options for SerenityOS
+
+Set libretro cores path to `/usr/lib/libretro`
+Set video and audio driver to sdl2
+Disable vsync
+The libretro core won't keep running in the background when we are in the menu.
+Don't pause gameplay when window focus is lost
+Set some config paths to home directory
+