From 9676bbb8058350a0f7b068c6cd52926fea9e6d1a Mon Sep 17 00:00:00 2001 From: mason Date: Mon, 2 Jan 2023 14:18:06 +0000 Subject: [PATCH 01/23] Add X11 QT5 packages for Xwayland --- packages/devel/qt5/package.mk | 4 +++- packages/x11/util/xcb-util-image/package.mk | 13 +++++++++++++ packages/x11/util/xcb-util-keysyms/package.mk | 13 +++++++++++++ packages/x11/util/xcb-util-renderutil/package.mk | 13 +++++++++++++ packages/x11/util/xcb-util-wm/package.mk | 11 +++++++++++ packages/x11/util/xcb-util/package.mk | 13 +++++++++++++ 6 files changed, 66 insertions(+), 1 deletion(-) create mode 100755 packages/x11/util/xcb-util-image/package.mk create mode 100755 packages/x11/util/xcb-util-keysyms/package.mk create mode 100755 packages/x11/util/xcb-util-renderutil/package.mk create mode 100755 packages/x11/util/xcb-util-wm/package.mk create mode 100755 packages/x11/util/xcb-util/package.mk diff --git a/packages/devel/qt5/package.mk b/packages/devel/qt5/package.mk index ecdd3f705..4525f504f 100644 --- a/packages/devel/qt5/package.mk +++ b/packages/devel/qt5/package.mk @@ -42,7 +42,7 @@ configure_package() { # Wayland support if [ "${DISPLAYSERVER}" = "wl" ]; then - PKG_DEPENDS_TARGET+=" wayland" + PKG_DEPENDS_TARGET+=" wayland xcb-util xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm" fi } @@ -246,6 +246,8 @@ post_makeinstall_target() { cp -PR ${PKG_QT5_SYSROOT_PATH}/lib/libQt5XcbQpa.so* ${INSTALL}/usr/lib cp -PR ${PKG_QT5_SYSROOT_PATH}/plugins/xcbglintegrations ${INSTALL}/usr/plugins elif [ ${DISPLAYSERVER} = "wl" ]; then + cp -PR ${PKG_QT5_SYSROOT_PATH}/lib/libQt5XcbQpa.so* ${INSTALL}/usr/lib + cp -PR ${PKG_QT5_SYSROOT_PATH}/plugins/xcbglintegrations ${INSTALL}/usr/plugins cp -PR ${PKG_QT5_SYSROOT_PATH}/lib/libQt5WaylandClient.so* ${INSTALL}/usr/lib cp -PR ${PKG_QT5_SYSROOT_PATH}/lib/libQt5WaylandCompositor.so* ${INSTALL}/usr/lib diff --git a/packages/x11/util/xcb-util-image/package.mk b/packages/x11/util/xcb-util-image/package.mk new file mode 100755 index 000000000..5b0aa9b22 --- /dev/null +++ b/packages/x11/util/xcb-util-image/package.mk @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2019-present Frank Hartung (supervisedthinking (@) gmail.com) + +PKG_NAME="xcb-util-image" +PKG_VERSION="0.4.0" +PKG_SHA256="2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc" +PKG_LICENSE="GPL" +PKG_SITE="https://xcb.freedesktop.org/XcbUtil/" +PKG_URL="https://xcb.freedesktop.org/dist/xcb-util-image-${PKG_VERSION}.tar.bz2" +PKG_DEPENDS_TARGET="toolchain libxcb xcb-util xorgproto util-macros" +PKG_LONGDESC="The xcb-util-image package provides additional extensions to the XCB library." + + diff --git a/packages/x11/util/xcb-util-keysyms/package.mk b/packages/x11/util/xcb-util-keysyms/package.mk new file mode 100755 index 000000000..5cdbe43b0 --- /dev/null +++ b/packages/x11/util/xcb-util-keysyms/package.mk @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2019-present Frank Hartung (supervisedthinking (@) gmail.com) + +PKG_NAME="xcb-util-keysyms" +PKG_VERSION="0.4.0" +PKG_SHA256="0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9" +PKG_LICENSE="GPL" +PKG_SITE="https://xcb.freedesktop.org/XcbUtil/" +PKG_URL="https://xcb.freedesktop.org/dist/xcb-util-keysyms-${PKG_VERSION}.tar.bz2" +PKG_DEPENDS_TARGET="toolchain libxcb xorgproto util-macros" +PKG_LONGDESC="The xcb-util-keysyms package contains a library for handling standard X key constants and conversion to/from keycodes." + + diff --git a/packages/x11/util/xcb-util-renderutil/package.mk b/packages/x11/util/xcb-util-renderutil/package.mk new file mode 100755 index 000000000..ef5b389c0 --- /dev/null +++ b/packages/x11/util/xcb-util-renderutil/package.mk @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2019-present Frank Hartung (supervisedthinking (@) gmail.com) + +PKG_NAME="xcb-util-renderutil" +PKG_VERSION="0.3.9" +PKG_SHA256="c6e97e48fb1286d6394dddb1c1732f00227c70bd1bedb7d1acabefdd340bea5b" +PKG_LICENSE="GPL" +PKG_SITE="https://xcb.freedesktop.org/XcbUtil/" +PKG_URL="https://xcb.freedesktop.org/dist/xcb-util-renderutil-${PKG_VERSION}.tar.bz2" +PKG_DEPENDS_TARGET="toolchain libxcb xorgproto util-macros" +PKG_LONGDESC="The xcb-util-renderutil package provides additional extensions to the XCB library." + + diff --git a/packages/x11/util/xcb-util-wm/package.mk b/packages/x11/util/xcb-util-wm/package.mk new file mode 100755 index 000000000..ebfa9409a --- /dev/null +++ b/packages/x11/util/xcb-util-wm/package.mk @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2019-present Frank Hartung (supervisedthinking (@) gmail.com) + +PKG_NAME="xcb-util-wm" +PKG_VERSION="0.4.1" +PKG_SHA256="28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f" +PKG_LICENSE="GPL" +PKG_SITE="https://xcb.freedesktop.org/XcbUtil/" +PKG_URL="https://xcb.freedesktop.org/dist/xcb-util-wm-${PKG_VERSION}.tar.bz2" +PKG_DEPENDS_TARGET="toolchain libxcb xorgproto util-macros" +PKG_LONGDESC="The xcb-util-wm package contains libraries which provide client and window-manager helpers for EWMH and ICCCM." diff --git a/packages/x11/util/xcb-util/package.mk b/packages/x11/util/xcb-util/package.mk new file mode 100755 index 000000000..2393ed70b --- /dev/null +++ b/packages/x11/util/xcb-util/package.mk @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2019-present Frank Hartung (supervisedthinking (@) gmail.com) + +PKG_NAME="xcb-util" +PKG_VERSION="0.4.0" +PKG_SHA256="46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9" +PKG_LICENSE="GPL" +PKG_SITE="https://xcb.freedesktop.org/XcbUtil/" +PKG_URL="https://xcb.freedesktop.org/dist/xcb-util-${PKG_VERSION}.tar.bz2" +PKG_DEPENDS_TARGET="toolchain libxcb xorgproto util-macros" +PKG_LONGDESC="The xcb-util package provides additional extensions to the XCB library, many that were previously found in Xlib, but are not part of core X protocol." + + From 38ec47bb84db4385a581dc94853ef3d042233cf7 Mon Sep 17 00:00:00 2001 From: mason Date: Mon, 2 Jan 2023 16:49:21 +0000 Subject: [PATCH 02/23] Initial Citra SA support --- .../citrasa/config/handheld/sdl2-config.ini | 342 ++++++++++++++++++ packages/games/emulators/citrasa/package.mk | 45 +++ .../emulators/citrasa/scripts/start_citra.sh | 17 + packages/jelos/sources/scripts/runemu.sh | 7 + .../config/common/es_systems.cfg | 7 +- packages/virtual/emulators/package.mk | 2 +- 6 files changed, 418 insertions(+), 2 deletions(-) create mode 100644 packages/games/emulators/citrasa/config/handheld/sdl2-config.ini create mode 100644 packages/games/emulators/citrasa/package.mk create mode 100644 packages/games/emulators/citrasa/scripts/start_citra.sh diff --git a/packages/games/emulators/citrasa/config/handheld/sdl2-config.ini b/packages/games/emulators/citrasa/config/handheld/sdl2-config.ini new file mode 100644 index 000000000..6faf84401 --- /dev/null +++ b/packages/games/emulators/citrasa/config/handheld/sdl2-config.ini @@ -0,0 +1,342 @@ + +[Controls] +# The input devices and parameters for each 3DS native input +# It should be in the format of "engine:[engine_name],[param1]:[value1],[param2]:[value2]..." +# Escape characters $0 (for ':'), $1 (for ',') and $2 (for '$') can be used in values + +# for button input, the following devices are available: +# - "keyboard" (default) for keyboard input. Required parameters: +# - "code": the code of the key to bind +# - "sdl" for joystick input using SDL. Required parameters: +# - "joystick": the index of the joystick to bind +# - "button"(optional): the index of the button to bind +# - "hat"(optional): the index of the hat to bind as direction buttons +# - "axis"(optional): the index of the axis to bind +# - "direction"(only used for hat): the direction name of the hat to bind. Can be "up", "down", "left" or "right" +# - "threshold"(only used for axis): a float value in (-1.0, 1.0) which the button is +# triggered if the axis value crosses +# - "direction"(only used for axis): "+" means the button is triggered when the axis value +# is greater than the threshold; "-" means the button is triggered when the axis value +# is smaller than the threshold +button_a=button:1,engine:sdl,guid:030003f05e0400008e02000010010000,port:0 +button_b=button:0,engine:sdl,guid:030003f05e0400008e02000010010000,port:0 +button_x=button:3,engine:sdl,guid:030003f05e0400008e02000010010000,port:0 +button_y=button:2,engine:sdl,guid:030003f05e0400008e02000010010000,port:0 +button_up=direction:up,engine:sdl,guid:030003f05e0400008e02000010010000,hat:0,port:0 +button_down=direction:down,engine:sdl,guid:030003f05e0400008e02000010010000,hat:0,port:0 +button_left=direction:left,engine:sdl,guid:030003f05e0400008e02000010010000,hat:0,port:0 +button_right=direction:right,engine:sdl,guid:030003f05e0400008e02000010010000,hat:0,port:0 +button_l=button:4,engine:sdl,guid:030003f05e0400008e02000010010000,port:0 +button_r=button:5,engine:sdl,guid:030003f05e0400008e02000010010000,port:0 +button_start=button:7,engine:sdl,guid:030003f05e0400008e02000010010000,port:0 +button_select=button:6,engine:sdl,guid:030003f05e0400008e02000010010000,port:0 +button_debug= +button_gpio14= +button_zl=axis:2,direction:+,engine:sdl,guid:030003f05e0400008e02000010010000,port:0,threshold:0.5 +button_zr=axis:5,direction:+,engine:sdl,guid:030003f05e0400008e02000010010000,port:0,threshold:0.5 +button_home= + +# for analog input, the following devices are available: +# - "analog_from_button" (default) for emulating analog input from direction buttons. Required parameters: +# - "up", "down", "left", "right": sub-devices for each direction. +# Should be in the format as a button input devices using escape characters, for example, "engine$0keyboard$1code$00" +# - "modifier": sub-devices as a modifier. +# - "modifier_scale": a float number representing the applied modifier scale to the analog input. +# Must be in range of 0.0-1.0. Defaults to 0.5 +# - "sdl" for joystick input using SDL. Required parameters: +# - "joystick": the index of the joystick to bind +# - "axis_x": the index of the axis to bind as x-axis (default to 0) +# - "axis_y": the index of the axis to bind as y-axis (default to 1) + +circle_Pad=axis_x:0,axis_y:1,deadzone:0.100000,engine:sdl,guid:030003f05e0400008e02000010010000,port:0 +c_stick=axis_x:3,axis_y:4,deadzone:0.100000,engine:sdl,guid:030003f05e0400008e02000010010000,port:0 + +# for motion input, the following devices are available: +# - "motion_emu" (default) for emulating motion input from mouse input. Required parameters: +# - "update_period": update period in milliseconds (default to 100) +# - "sensitivity": the coefficient converting mouse movement to tilting angle (default to 0.01) +# - "tilt_clamp": the max value of the tilt angle in degrees (default to 90) +# - "cemuhookudp" reads motion input from a udp server that uses cemuhook's udp protocol +motion_device= + +# for touch input, the following devices are available: +# - "emu_window" (default) for emulating touch input from mouse input to the emulation window. No parameters required +# - "cemuhookudp" reads touch input from a udp server that uses cemuhook's udp protocol +# - "min_x", "min_y", "max_x", "max_y": defines the udp device's touch screen coordinate system +touch_device= + +# Most desktop operating systems do not expose a way to poll the motion state of the controllers +# so as a way around it, cemuhook created a udp client/server protocol to broadcast the data directly +# from a controller device to the client program. Citra has a client that can connect and read +# from any cemuhook compatible motion program. + +# IPv4 address of the udp input server (Default "127.0.0.1") +udp_input_address= + +# Port of the udp input server. (Default 26760) +udp_input_port= + +# The pad to request data on. Should be between 0 (Pad 1) and 3 (Pad 4). (Default 0) +udp_pad_index= + +[Core] +# Whether to use the Just-In-Time (JIT) compiler for CPU emulation +# 0: Interpreter (slow), 1 (default): JIT (fast) +use_cpu_jit = + +# Change the Clock Frequency of the emulated 3DS CPU. +# Underclocking can increase the performance of the game at the risk of freezing. +# Overclocking may fix lag that happens on console, but also comes with the risk of freezing. +# Range is any positive integer (but we suspect 25 - 400 is a good idea) Default is 100 +cpu_clock_percentage = + +[Renderer] +# Whether to render using GLES or OpenGL +# 0 (default): OpenGL, 1: GLES +use_gles = + +# Whether to use software or hardware rendering. +# 0: Software, 1 (default): Hardware +use_hw_renderer = + +# Whether to use hardware shaders to emulate 3DS shaders +# 0: Software, 1 (default): Hardware +use_hw_shader = + +# Whether to use separable shaders to emulate 3DS shaders (macOS only) +# 0: Off (Default), 1 : On +separable_shader = + +# Whether to use accurate multiplication in hardware shaders +# 0: Off (Faster, but causes issues in some games) 1: On (Default. Slower, but correct) +shaders_accurate_mul = 0 + +# Whether to use the Just-In-Time (JIT) compiler for shader emulation +# 0: Interpreter (slow), 1 (default): JIT (fast) +use_shader_jit = + +# Forces VSync on the display thread. Usually doesn't impact performance, but on some drivers it can +# so only turn this off if you notice a speed difference. +# 0: Off, 1 (default): On +use_vsync_new = + +# Reduce stuttering by storing and loading generated shaders to disk +# 0: Off, 1 (default. On) +use_disk_shader_cache = 0 + +# Resolution scale factor +# 0: Auto (scales resolution to window size), 1: Native 3DS screen resolution, Otherwise a scale +# factor for the 3DS resolution +resolution_factor = + +# Texture filter name +texture_filter_name = + +# Limits the speed of the game to run no faster than this value as a percentage of target speed. +# Will not have an effect if unthrottled is enabled. +# 5 - 995: Speed limit as a percentage of target game speed. 0 for unthrottled. 100 (default) +frame_limit = + +# Overrides the frame limiter to use frame_limit_alternate instead of frame_limit. +# 0: Off (default), 1: On +use_frame_limit_alternate = + +# Alternate speed limit to be used instead of frame_limit if use_frame_limit_alternate is enabled +# 5 - 995: Speed limit as a percentage of target game speed. 0 for unthrottled. 200 (default) +frame_limit_alternate = + +# The clear color for the renderer. What shows up on the sides of the bottom screen. +# Must be in range of 0.0-1.0. Defaults to 0.0 for all. +bg_red = +bg_blue = +bg_green = + +# Whether and how Stereoscopic 3D should be rendered +# 0 (default): Off, 1: Side by Side, 2: Anaglyph, 3: Interlaced, 4: Reverse Interlaced +render_3d = + +# Change 3D Intensity +# 0 - 100: Intensity. 0 (default) +factor_3d = + +# The name of the post processing shader to apply. +# Loaded from shaders if render_3d is off or side by side. +# Loaded from shaders/anaglyph if render_3d is anaglyph +pp_shader_name = + +# Whether to enable linear filtering or not +# This is required for some shaders to work correctly +# 0: Nearest, 1 (default): Linear +filter_mode = + +[Layout] +# Layout for the screen inside the render window. +# 0 (default): Default Top Bottom Screen, 1: Single Screen Only, 2: Large Screen Small Screen, 3: Side by Side +layout_option = 2 + +# Toggle custom layout (using the settings below) on or off. +# 0 (default): Off, 1: On +custom_layout = + +# Screen placement when using Custom layout option +# 0x, 0y is the top left corner of the render window. +custom_top_left = +custom_top_top = +custom_top_right = +custom_top_bottom = +custom_bottom_left = +custom_bottom_top = +custom_bottom_right = +custom_bottom_bottom = + +# Swaps the prominent screen with the other screen. +# For example, if Single Screen is chosen, setting this to 1 will display the bottom screen instead of the top screen. +# 0 (default): Top Screen is prominent, 1: Bottom Screen is prominent +swap_screen = + +# Toggle upright orientation, for book style games. +# 0 (default): Off, 1: On +upright_screen = + +# Dumps textures as PNG to dump/textures/[Title ID]/. +# 0 (default): Off, 1: On +dump_textures = + +# Reads PNG files from load/textures/[Title ID]/ and replaces textures. +# 0 (default): Off, 1: On +custom_textures = + +# Loads all custom textures into memory before booting. +# 0 (default): Off, 1: On +preload_textures = + +[Audio] +# Whether or not to enable DSP LLE +# 0 (default): No, 1: Yes +enable_dsp_lle = + +# Whether or not to run DSP LLE on a different thread +# 0 (default): No, 1: Yes +enable_dsp_lle_thread = + + +# Which audio output engine to use. +# auto (default): Auto-select, null: No audio output, sdl2: SDL2 (if available) +output_engine = + +# Whether or not to enable the audio-stretching post-processing effect. +# This effect adjusts audio speed to match emulation speed and helps prevent audio stutter, +# at the cost of increasing audio latency. +# 0: No, 1 (default): Yes +enable_audio_stretching = + +# Which audio device to use. +# auto (default): Auto-select +output_device = + +# Output volume. +# 1.0 (default): 100%, 0.0; mute +volume = + +[Data Storage] +# Whether to create a virtual SD card. +# 1 (default): Yes, 0: No +use_virtual_sd = + +# The path of the virtual SD card directory. +# empty (default) will use the user_path +sdmc_directory = + +# The path of NAND directory. +# empty (default) will use the user_path +nand_directory = + +[System] +# The system model that Citra will try to emulate +# 0: Old 3DS, 1: New 3DS (default) +is_new_3ds = + +# The system region that Citra will use during emulation +# -1: Auto-select (default), 0: Japan, 1: USA, 2: Europe, 3: Australia, 4: China, 5: Korea, 6: Taiwan +region_value = + +# The clock to use when citra starts +# 0: System clock (default), 1: fixed time +init_clock = + +# Time used when init_clock is set to fixed_time in the format %Y-%m-%d %H:%M:%S +# set to fixed time. Default 2000-01-01 00:00:01 +# Note: 3DS can only handle times later then Jan 1 2000 +init_time = + +[Camera] +# Which camera engine to use for the right outer camera +# blank (default): a dummy camera that always returns black image +camera_outer_right_name = + +# A config string for the right outer camera. Its meaning is defined by the camera engine +camera_outer_right_config = + +# The image flip to apply +# 0: None (default), 1: Horizontal, 2: Vertical, 3: Reverse +camera_outer_right_flip = + +# ... for the left outer camera +camera_outer_left_name = +camera_outer_left_config = +camera_outer_left_flip = + +# ... for the inner camera +camera_inner_name = +camera_inner_config = +camera_inner_flip = + +[Miscellaneous] +# A filter which removes logs below a certain logging level. +# Examples: *:Debug Kernel.SVC:Trace Service.*:Critical +log_filter = *:Info + +[Debugging] +# Record frame time data, can be found in the log directory. Boolean value +record_frame_times = +# Port for listening to GDB connections. +use_gdbstub=false +gdbstub_port=24689 +# To LLE a service module add "LLE\=true" + +[WebService] +# Whether or not to enable telemetry +# 0: No, 1 (default): Yes +enable_telemetry = +# URL for Web API +web_api_url = https://api.citra-emu.org +# Username and token for Citra Web Service +# See https://profile.citra-emu.org/ for more info +citra_username = +citra_token = + +[Video Dumping] +# Format of the video to output, default: webm +output_format = + +# Options passed to the muxer (optional) +# This is a param package, format: [key1]:[value1],[key2]:[value2],... +format_options = + +# Video encoder used, default: libvpx-vp9 +video_encoder = + +# Options passed to the video codec (optional) +video_encoder_options = + +# Video bitrate, default: 2500000 +video_bitrate = + +# Audio encoder used, default: libvorbis +audio_encoder = + +# Options passed to the audio codec (optional) +audio_encoder_options = + +# Audio bitrate, default: 64000 +audio_bitrate = diff --git a/packages/games/emulators/citrasa/package.mk b/packages/games/emulators/citrasa/package.mk new file mode 100644 index 000000000..beade76fe --- /dev/null +++ b/packages/games/emulators/citrasa/package.mk @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech) + +PKG_NAME="citrasa" +PKG_VERSION="030ecaa83c825bf4c91915d629adca2dadb9aaac" +PKG_LICENSE="MPLv2" +PKG_SITE="https://github.com/GPUCode/citra" +PKG_URL="${PKG_SITE}.git" +PKG_DEPENDS_TARGET="toolchain ffmpeg mesa SDL2 boost zlib libusb" +PKG_LONGDESC="Citra 3DS emulator" +PKG_TOOLCHAIN="cmake" +GET_HANDLER_SUPPORT="git" +PKG_PATCH_DIRS+="${DEVICE}" + +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" +fi + +if [ "${VULKAN_SUPPORT}" = "yes" ] +then + PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers" +fi + +pre_configure_target() { +PKG_CMAKE_OPTS_TARGET+=" -DENABLE_QT=OFF \ + -DENABLE_QT_TRANSLATION=OFF \ + -DENABLE_SDL2=ON \ + -DUSE_DISCORD_PRESENCE=OFF" + +} + +makeinstall_target() { + mkdir -p ${INSTALL}/usr/bin + cp ${PKG_BUILD}/.${TARGET_NAME}/bin/MinSizeRel/citra ${INSTALL}/usr/bin/citra + cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin + + chmod +x ${INSTALL}/usr/bin/start_citra.sh + + mkdir -p ${INSTALL}/usr/config/citra-emu + cp -rf ${PKG_DIR}/config/${DEVICE}/* ${INSTALL}/usr/config/citra-emu +} diff --git a/packages/games/emulators/citrasa/scripts/start_citra.sh b/packages/games/emulators/citrasa/scripts/start_citra.sh new file mode 100644 index 000000000..1a1e0e57c --- /dev/null +++ b/packages/games/emulators/citrasa/scripts/start_citra.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech) + +. /etc/profile + +if [ ! -d "/storage/.config/citra-emu" ]; then + mkdir -p "/storage/.config/citra-emu" + cp -r "/usr/config/citra-emu" "/storage/.config/" +fi + +rm -rf /storage/.local/share/citra-emu + +ln -sfv /storage/.config/citra-emu /storage/.local/share/citra-emu + +/usr/bin/citra "${1}" diff --git a/packages/jelos/sources/scripts/runemu.sh b/packages/jelos/sources/scripts/runemu.sh index 64b5fe77f..a546b8c44 100755 --- a/packages/jelos/sources/scripts/runemu.sh +++ b/packages/jelos/sources/scripts/runemu.sh @@ -307,6 +307,13 @@ then RUNTHIS='${TBASH} /usr/bin/start_yuzu.sh "${ROMNAME}"' fi ;; + "3ds") + jslisten set "-9 citra" + if [ "$EMU" = "citrasa" ]; then + RUNTHIS='${TBASH} /usr/bin/start_citra.sh "${ROMNAME}"' + fi + + ;; "mplayer") jslisten set "mpv" RUNTHIS='${TBASH} /usr/bin/mpv_video.sh "${ROMNAME}"' diff --git a/packages/ui/emulationstation/config/common/es_systems.cfg b/packages/ui/emulationstation/config/common/es_systems.cfg index 99a09e574..f4b89c0c2 100644 --- a/packages/ui/emulationstation/config/common/es_systems.cfg +++ b/packages/ui/emulationstation/config/common/es_systems.cfg @@ -20,7 +20,7 @@ - 3DS + 3ds Nintendo 3DS Nintendo 2010 @@ -36,6 +36,11 @@ citra + + + citrasa + + diff --git a/packages/virtual/emulators/package.mk b/packages/virtual/emulators/package.mk index 4c98467b7..9778a248a 100644 --- a/packages/virtual/emulators/package.mk +++ b/packages/virtual/emulators/package.mk @@ -32,6 +32,6 @@ PKG_DEPENDS_TARGET="${PKG_EMUS} ${PKG_RETROARCH} ${LIBRETRO_CORES}" ### Emulators or cores for specific devices case "${DEVICE}" in handheld) - PKG_DEPENDS_TARGET+=" duckstationsa dolphinsa dolphin pcsx2sa lrps2 desmume bsnes citra slang-shaders minivmac minivmacsa play beetle-saturn yuzusa primehack" + PKG_DEPENDS_TARGET+=" duckstationsa dolphinsa dolphin pcsx2sa lrps2 desmume bsnes citra slang-shaders minivmac minivmacsa play beetle-saturn yuzusa primehack citrasa" ;; esac From 304ee307b3b7c90340a191d772be5ba2eac53d32 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Mon, 2 Jan 2023 11:57:54 -0500 Subject: [PATCH 03/23] Don't use integer scaling by default, it's not needed. --- .../jelos/config/system/configs/system.cfg | 158 +++++++++--------- tools/burnimage | 10 +- 2 files changed, 83 insertions(+), 85 deletions(-) diff --git a/packages/jelos/config/system/configs/system.cfg b/packages/jelos/config/system/configs/system.cfg index dfec126cd..b9c6be4b6 100644 --- a/packages/jelos/config/system/configs/system.cfg +++ b/packages/jelos/config/system/configs/system.cfg @@ -1,24 +1,24 @@ -3do.integerscale=1 +3do.integerscale=0 3do.cpugovernor=performance 3do.ratio=4/3 3do.rewind=0 advmame_auto_gamepad=0 -amigacd32.integerscale=1 +amigacd32.integerscale=0 amigacd32.ratio=4/3 -amiga.integerscale=1 +amiga.integerscale=0 amiga.ratio=4/3 -amstradcpc.integerscale=1 +amstradcpc.integerscale=0 arcade.autosave=0 arcade.cpugovernor=performance -atari2600.integerscale=1 -atari5200.integerscale=1 -atari7800.integerscale=1 -atari800.integerscale=1 +atari2600.integerscale=0 +atari5200.integerscale=0 +atari7800.integerscale=0 +atari800.integerscale=0 atarijaguar.cpugovernor=performance -atarilynx.integerscale=1 +atarilynx.integerscale=0 atarilynx.ratio=core -atarist.integerscale=1 -atomiswave.integerscale=1 +atarist.integerscale=0 +atomiswave.integerscale=0 atomiswave.cpugovernor=performance atomiswave.ratio=4/3 audio.bgmusic=1 @@ -28,44 +28,44 @@ audio.persystem=0 audio.volume=75 bluetooth.enabled=0 boot=Emulationstation -c128.integerscale=1 -c16.integerscale=1 -c64.integerscale=1 +c128.integerscale=0 +c16.integerscale=0 +c64.integerscale=0 cloud.backup=0 -colecovision.integerscale=1 +colecovision.integerscale=0 colecovision.ratio=4/3 controllers.bluetooth.enabled=1 cooling.profile=quiet -cps1.integerscale=1 -cps2.integerscale=1 -cps3.integerscale=1 -daphne.integerscale=1 +cps1.integerscale=0 +cps2.integerscale=0 +cps3.integerscale=0 +daphne.integerscale=0 daphne.ratio=4/3 desktop.enabled=0 -dreamcast.integerscale=1 +dreamcast.integerscale=0 dreamcast.cpugovernor=performance dreamcast.ratio=4/3 -easyrpg.integerscale=1 -famicom.integerscale=1 +easyrpg.integerscale=0 +famicom.integerscale=0 famicom.ratio=4/3 -fbn.integerscale=1 +fbn.integerscale=0 fbn.ratio=core -fds.integerscale=1 +fds.integerscale=0 fds.ratio=4/3 gamecube.cpugovernor=performance ps2.cpugovernor=performance -gamegear.integerscale=1 +gamegear.integerscale=0 gbah.ratio=3/2 gba.ratio=3/2 -gbch.integerscale=1 -gbc.integerscale=1 -gbh.integerscale=1 -gb.integerscale=1 -genesis.integerscale=1 +gbch.integerscale=0 +gbc.integerscale=0 +gbh.integerscale=0 +gb.integerscale=0 +genesis.integerscale=0 genesis.ratio=4/3 -genh.integerscale=1 +genh.integerscale=0 genh.ratio=4/3 -ggh.integerscale=1 +ggh.integerscale=0 global.analogue=1 global.autosave=2 global.incrementalsavestates=0 @@ -88,26 +88,26 @@ global.retroarch.menu_driver=ozone global.runahead=0 global.secondinstance=0 gpu.powersave=0 -intellivision.integerscale=1 +intellivision.integerscale=0 intellivision.ratio=4/3 wifi.powersave=0 j2me.cpugovernor=performance mame.autosave=0 -mame.integerscale=1 +mame.integerscale=0 mame.cpugovernor=performance -mastersystem.integerscale=1 -megacd.integerscale=1 +mastersystem.integerscale=0 +megacd.integerscale=0 megacd.ratio=4/3 -megadrive.integerscale=1 -megadrive-japan.integerscale=1 +megadrive.integerscale=0 +megadrive-japan.integerscale=0 megadrive-japan.ratio=4/3 megadrive.ratio=4/3 -megaduck.integerscale=1 -msx2.integerscale=1 +megaduck.integerscale=0 +msx2.integerscale=0 msx2.ratio=4/3 -msx.integerscale=1 +msx.integerscale=0 msx.ratio=4/3 -n64.integerscale=1 +n64.integerscale=0 n64.cpugovernor=performance n64.ratio=4/3 n64.game_aspect_ratio=4:3 @@ -120,63 +120,63 @@ n64.parallel_n64_gamespeed=fullspeed n64.parallel_n64_gfx_accuracy=medium n64.parallel_n64_internal_resolution=480p n64.parallel_n64_video_core=glide64 -naomi.integerscale=1 +naomi.integerscale=0 naomi.cpugovernor=performance naomi.ratio=4/3 nds.cpugovernor=performance -neocd.integerscale=1 +neocd.integerscale=0 neocd.ratio=4/3 -neogeo.integerscale=1 +neogeo.integerscale=0 neogeo.ratio=4/3 -nesh.integerscale=1 +nesh.integerscale=0 nesh.ratio=4/3 -nes.integerscale=1 +nes.integerscale=0 nes.ratio=4/3 ngpc.intergerscale=1 -ngp.integerscale=1 -odyssey2.integerscale=1 +ngp.integerscale=0 +odyssey2.integerscale=0 odyssey2.ratio=4/3 pet.ratio=4/3 -pc-9800.integerscale=1 +pc-9800.integerscale=0 pc-9800.ratio=4/3 -pcenginecd.integerscale=1 +pcenginecd.integerscale=0 pcenginecd.ratio=4/3 -pcengine.integerscale=1 +pcengine.integerscale=0 pcengine.ratio=4/3 -pcfx.integerscale=1 +pcfx.integerscale=0 pcfx.cpugovernor=performance pcfx.ratio=4/3 -pc.integerscale=1 +pc.integerscale=0 pc.cpugovernor=performance pc.ratio=4/3 pokemini.ratio=3/2 psp.cpugovernor=performance pspminis.cpugovernor=performance -psx.integerscale=1 +psx.integerscale=0 psx.ratio=4/3 rotate.root.password=1 samba.enabled=0 -saturn.integerscale=1 +saturn.integerscale=0 saturn.ratio=4/3 -sc-3000.integerscale=1 -sega32x.integerscale=1 +sc-3000.integerscale=0 +sega32x.integerscale=0 sega32x.ratio=4/3 -segacd.integerscale=1 +segacd.integerscale=0 segacd.ratio=4/3 -sfc.integerscale=1 +sfc.integerscale=0 sfc.ratio=4/3 -sg-1000.integerscale=1 -snesh.integerscale=1 +sg-1000.integerscale=0 +snesh.integerscale=0 snesh.ratio=4/3 -snes.integerscale=1 -snesmsu1.integerscale=1 +snes.integerscale=0 +snesmsu1.integerscale=0 snesmsu1.ratio=4/3 snes.ratio=4/3 splash.enabled=0 ssh.enabled=0 -supergrafx.integerscale=1 +supergrafx.integerscale=0 supergrafx.ratio=4/3 -supervision.integerscale=1 +supervision.integerscale=0 system.hostname=@DEVICENAME@ system.language=en_US system.overclock=off @@ -185,31 +185,31 @@ system.timezone=America/New_York system.automount=1 system.autohotkeys=1 fstrim.enabled=0 -tg16cd.integerscale=1 +tg16cd.integerscale=0 tg16cd.ratio=4/3 -tg16.integerscale=1 +tg16.integerscale=0 tg16.ratio=4/3 updates.enabled=1 updates.force=0 updates.branch=stable -uzebox.integerscale=1 -uzebox.integerscale=1 -vectrex.integerscale=1 +uzebox.integerscale=0 +uzebox.integerscale=0 +vectrex.integerscale=0 vectrex.ratio=3/4 -vic20.integerscale=1 +vic20.integerscale=0 vic20.ratio=4/3 -videopac.integerscale=1 +videopac.integerscale=0 videopac.ratio=4/3 -virtualboy.integerscale=1 +virtualboy.integerscale=0 virtualboy.cpugovernor=performance wifi.enabled=0 -wonderswancolor.integerscale=1 -wonderswan.integerscale=1 +wonderswancolor.integerscale=0 +wonderswan.integerscale=0 weston.startup=/usr/bin/start_es.sh wts.enabled=1 -x68000.integerscale=1 +x68000.integerscale=0 x68000.ratio=4/3 -zx81.integerscale=1 +zx81.integerscale=0 zx81.ratio=4/3 -zxspectrum.integerscale=1 +zxspectrum.integerscale=0 zxspectrum.ratio=4/3 diff --git a/tools/burnimage b/tools/burnimage index ff0c10e1a..270306c44 100755 --- a/tools/burnimage +++ b/tools/burnimage @@ -17,9 +17,9 @@ then exit 1 fi -MAXSIZE="192000000" +MAXSIZE="128000000" -SDDEVICES=($(awk '/sd*[a-z]$/ {print $3":"$4}' /proc/partitions)) +SDDEVICES=($(awk '/sd*[a-z]$/ {print $3":"$4}' /proc/partitions | sort -r)) for SDDEVICE in ${SDDEVICES[@]} do @@ -39,11 +39,9 @@ then then cd release echo "Extracting ${DISTRO}-${DEVICE}.${ARCH}-${OS_VERSION}.img" - gunzip ${DISTRO}-${DEVICE}.${ARCH}-${OS_VERSION}.img.gz 2>/dev/null - + gunzip ${DISTRO}-${DEVICE}.${ARCH}-${OS_VERSION}.img.gz 2>/dev/null ||: echo "Wiping ${SDDEVICE} partition data" - sudo wipefs -a ${SDDEVICE} 2>/dev/null - + sudo wipefs -a ${SDDEVICE} 2>/dev/null ||: echo "Writing ${DISTRO}-${DEVICE}.${ARCH}-${OS_VERSION}.img to ${SDDEVICE}" sudo dd if=${DISTRO}-${DEVICE}.${ARCH}-${OS_VERSION}.img of=/dev/${SDDEVICE} bs=1M sync From 877635cdf95edee2c90f49358b8f4721af4b2fa2 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Mon, 2 Jan 2023 15:12:49 -0500 Subject: [PATCH 04/23] Making JELOS run a bit better on portable computers. --- .../PPSSPPSDL/sources/handheld/controls.ini | 2 +- .../asound/handheld => config}/asound.conf | 4 +-- .../asound => config}/asound.conf.bluealsa | 0 packages/jelos/package.mk | 7 ----- packages/jelos/sources/scripts/jelos-info | 2 +- packages/sysutils/systemd/package.mk | 2 +- .../config/common/es_input.cfg | 29 ++++++++++--------- .../config/common/es_settings.cfg | 1 + 8 files changed, 21 insertions(+), 26 deletions(-) rename packages/jelos/{sources/asound/handheld => config}/asound.conf (83%) rename packages/jelos/{sources/asound => config}/asound.conf.bluealsa (100%) diff --git a/packages/games/emulators/PPSSPPSDL/sources/handheld/controls.ini b/packages/games/emulators/PPSSPPSDL/sources/handheld/controls.ini index e550ff3aa..1b1a27425 100644 --- a/packages/games/emulators/PPSSPPSDL/sources/handheld/controls.ini +++ b/packages/games/emulators/PPSSPPSDL/sources/handheld/controls.ini @@ -19,5 +19,5 @@ Analog limiter = 1-60 RapidFire = 1-59 Fast-forward = 1-61 SpeedToggle = 1-68 -Pause = 1-111,10-106,10-107 +Pause = 1-111,10-107 Rewind = 1-67 diff --git a/packages/jelos/sources/asound/handheld/asound.conf b/packages/jelos/config/asound.conf similarity index 83% rename from packages/jelos/sources/asound/handheld/asound.conf rename to packages/jelos/config/asound.conf index 6078b59e1..6422d2a57 100644 --- a/packages/jelos/sources/asound/handheld/asound.conf +++ b/packages/jelos/config/asound.conf @@ -10,8 +10,8 @@ pcm.dmixer { pcm "hw:0,0" period_time 0 period_size 1024 - buffer_size 4096 - rate 44100 + buffer_size 8192 + rate 176400 } bindings { 0 0 diff --git a/packages/jelos/sources/asound/asound.conf.bluealsa b/packages/jelos/config/asound.conf.bluealsa similarity index 100% rename from packages/jelos/sources/asound/asound.conf.bluealsa rename to packages/jelos/config/asound.conf.bluealsa diff --git a/packages/jelos/package.mk b/packages/jelos/package.mk index f98635e61..e72a7388e 100644 --- a/packages/jelos/package.mk +++ b/packages/jelos/package.mk @@ -136,13 +136,6 @@ EOF ### Fix and migrate to autostart package enable_service jelos-autostart.service - if [ -d "${PKG_DIR}/sources/asound/${DEVICE}" ] - then - cp ${PKG_DIR}/sources/asound/${DEVICE}/* ${INSTALL}/usr/config/ - fi - - cp ${PKG_DIR}/sources/asound/asound.conf.bluealsa ${INSTALL}/usr/config/ - sed -i "s#@DEVICENAME@#${DEVICE}#g" ${INSTALL}/usr/config/system/configs/system.cfg if [[ "${DEVICE}" =~ handheld ]] diff --git a/packages/jelos/sources/scripts/jelos-info b/packages/jelos/sources/scripts/jelos-info index b1e4e2bd3..71596bf17 100755 --- a/packages/jelos/sources/scripts/jelos-info +++ b/packages/jelos/sources/scripts/jelos-info @@ -102,7 +102,7 @@ then fi if [ "${DEVICE_HAS_FAN}" = "true" ] then - FANSPEED=$(cat ${DEVICE_PWM_FAN}) + FANSPEED=$(cat ${DEVICE_PWM_FAN} 2>/dev/null) if [ "${FANSPEED}" = "0" ] then FANSPEED="OFF" diff --git a/packages/sysutils/systemd/package.mk b/packages/sysutils/systemd/package.mk index 21bfe0599..7a3edb4a0 100644 --- a/packages/sysutils/systemd/package.mk +++ b/packages/sysutils/systemd/package.mk @@ -193,7 +193,7 @@ post_makeinstall_target() { sed -e "s,^.*SystemMaxUse=.*$,SystemMaxUse=10M,g" -i ${INSTALL}/etc/systemd/journald.conf # tune logind.conf - sed -e "s,^.*HandleLidSwitch=.*$,HandleLidSwitch=ignore,g" -i $INSTALL/etc/systemd/logind.conf + sed -e "s,^.*HandleLidSwitch=.*$,HandleLidSwitch=suspend,g" -i $INSTALL/etc/systemd/logind.conf sed -e "s,^.*HandlePowerKey=.*$,HandlePowerKey=suspend,g" -i $INSTALL/etc/systemd/logind.conf # replace systemd-machine-id-setup with ours diff --git a/packages/ui/emulationstation/config/common/es_input.cfg b/packages/ui/emulationstation/config/common/es_input.cfg index 25515db0e..9b6e00002 100644 --- a/packages/ui/emulationstation/config/common/es_input.cfg +++ b/packages/ui/emulationstation/config/common/es_input.cfg @@ -1,19 +1,5 @@ - - - - - - - - - - - - - - @@ -1083,4 +1069,19 @@ + + + + + + + + + + + + + + + diff --git a/packages/ui/emulationstation/config/common/es_settings.cfg b/packages/ui/emulationstation/config/common/es_settings.cfg index 9c1293a63..1a6424128 100644 --- a/packages/ui/emulationstation/config/common/es_settings.cfg +++ b/packages/ui/emulationstation/config/common/es_settings.cfg @@ -11,6 +11,7 @@ + From 868e28abb3a7448eb33c4b441536c1d34ba769f6 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Mon, 2 Jan 2023 15:37:06 -0500 Subject: [PATCH 05/23] Improve how we're managing performance policies now that we're not accounting for ARM. --- packages/jelos/profile.d/99-freqfunctions | 8 ++++---- projects/PC/devices/handheld/device.config | 13 ++----------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/packages/jelos/profile.d/99-freqfunctions b/packages/jelos/profile.d/99-freqfunctions index e08d3719e..03291f354 100644 --- a/packages/jelos/profile.d/99-freqfunctions +++ b/packages/jelos/profile.d/99-freqfunctions @@ -6,7 +6,7 @@ set_cpu_gov() { - for POLICY in ${CPU_FREQ[@]} + for POLICY in $(ls /sys/devices/system/cpu/cpufreq 2>/dev/null | grep policy[0-9]) do if [ -e "${POLICY}/scaling_governor" ] then @@ -30,10 +30,10 @@ set_gpu_gov() { } set_amdgpu_perf() { - if [ -e "${AMDGPU_PERF}" ] - then + for AMDGPU_PERF_DEVICE in $(find /sys/devices -name power_dpm_force_performance_level 2>/dev/null) + do echo $1 >${AMDGPU_PERF} 2>/dev/null - fi + done } performance() { diff --git a/projects/PC/devices/handheld/device.config b/projects/PC/devices/handheld/device.config index 1096ce157..794139e3c 100644 --- a/projects/PC/devices/handheld/device.config +++ b/projects/PC/devices/handheld/device.config @@ -1,18 +1,9 @@ DEVICE_VOLUMECTL=true -DEVICE_AUDIO_MIXER="PCM" +DEVICE_AUDIO_MIXER="Master" DEVICE_PLAYBACK_PATH_SPK="SPK" DEVICE_PLAYBACK_PATH_HP="HP" DEVICE_VOL_MODIFIER="ABS_RZ" UI_SERVICE="weston.service" DEVICE_BRIGHTNESS="128" -SPLASH_LOADER="plymouth" - -# FREQ Governors -CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0" \ - "/sys/devices/system/cpu/cpufreq/policy1" \ - "/sys/devices/system/cpu/cpufreq/policy2" \ - "/sys/devices/system/cpu/cpufreq/policy3") - -AMDGPU_PERF="/sys/class/drm/card0/device/power_dpm_force_performance_level" - +SPLASH_LOADER="imagemagick" From bb0c8ffd47d6d81a010be44a9463357404de8354 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Mon, 2 Jan 2023 15:47:33 -0500 Subject: [PATCH 06/23] Fix path oops. --- packages/jelos/profile.d/99-freqfunctions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jelos/profile.d/99-freqfunctions b/packages/jelos/profile.d/99-freqfunctions index 03291f354..9940c0267 100644 --- a/packages/jelos/profile.d/99-freqfunctions +++ b/packages/jelos/profile.d/99-freqfunctions @@ -10,7 +10,7 @@ set_cpu_gov() { do if [ -e "${POLICY}/scaling_governor" ] then - echo $1 >${POLICY}/scaling_governor 2>/dev/null + echo $1 >/sys/devices/system/cpu/cpufreq/${POLICY}/scaling_governor 2>/dev/null fi done } From 07cb2ffd92c77fa2df7821befa79164306ab4f7b Mon Sep 17 00:00:00 2001 From: fewtarius Date: Mon, 2 Jan 2023 15:48:29 -0500 Subject: [PATCH 07/23] Fix path oops. --- packages/jelos/profile.d/99-freqfunctions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jelos/profile.d/99-freqfunctions b/packages/jelos/profile.d/99-freqfunctions index 9940c0267..0eb171403 100644 --- a/packages/jelos/profile.d/99-freqfunctions +++ b/packages/jelos/profile.d/99-freqfunctions @@ -8,7 +8,7 @@ set_cpu_gov() { for POLICY in $(ls /sys/devices/system/cpu/cpufreq 2>/dev/null | grep policy[0-9]) do - if [ -e "${POLICY}/scaling_governor" ] + if [ -e "/sys/devices/system/cpu/cpufreq/${POLICY}/scaling_governor" ] then echo $1 >/sys/devices/system/cpu/cpufreq/${POLICY}/scaling_governor 2>/dev/null fi From 51513be5e57735a1b97b3e50602027e42e44e7b2 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Mon, 2 Jan 2023 17:47:44 -0500 Subject: [PATCH 08/23] Add ability to offline all but 2 or 4 cores if desired globally or per system/core/game. --- packages/jelos/profile.d/99-freqfunctions | 38 +++++++++++++++++++++++ packages/jelos/sources/scripts/runemu.sh | 16 ++++++++++ packages/ui/emulationstation/package.mk | 2 +- 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/packages/jelos/profile.d/99-freqfunctions b/packages/jelos/profile.d/99-freqfunctions index 0eb171403..459020678 100644 --- a/packages/jelos/profile.d/99-freqfunctions +++ b/packages/jelos/profile.d/99-freqfunctions @@ -4,6 +4,40 @@ . /etc/os-release +set_online_cores() { + AVAILABLE_CPUS=$(($(ls /sys/devices/system/cpu | grep cpu[0-9] | wc -l) - 1)) + MODE=${2} + if [ -z "${MODE}" ] + then + MODE=0 + fi + case ${1} in + all) + CORES=0 + MODE="1" + ;; + *) + CORES=${1} + ;; + esac + + if (( "${1}" < 2 )) && \ + [ "${MODE}" = "0" ] + then + echo "Invalid selection." + exit 1 + fi + + for core in $(seq 0 1 $(( ${1} - 1 ))) + do + echo 1 >/sys/devices/system/cpu/cpu${core}/online 2>/dev/null + done + + for core in $(seq ${CORES} 1 ${AVAILABLE_CPUS}) + do + echo ${MODE} >/sys/devices/system/cpu/cpu${core}/online 2>/dev/null + done +} set_cpu_gov() { for POLICY in $(ls /sys/devices/system/cpu/cpufreq 2>/dev/null | grep policy[0-9]) @@ -36,6 +70,10 @@ set_amdgpu_perf() { done } +onlinecores() { + set_online_cores ${1} ${2} +} + performance() { set_cpu_gov performance set_amdgpu_perf profile_peak diff --git a/packages/jelos/sources/scripts/runemu.sh b/packages/jelos/sources/scripts/runemu.sh index af7db3670..c6f0530b3 100755 --- a/packages/jelos/sources/scripts/runemu.sh +++ b/packages/jelos/sources/scripts/runemu.sh @@ -92,6 +92,13 @@ if [[ "$arguments" == *"--connect"* ]]; then NETPLAY="--connect $NETPLAY --nick" fi +### Offline all but the number of cores we need for this game if configured. +NUMCORES=$(get_setting "cores" "${PLATFORM}" "${ROMNAME##*/}") +if [ -z "${NUMCORES}" ] +then + onlinecores ${NUMCORES} 0 +fi + ### Set the performance mode PERFORMANCE_MODE=$(get_setting "cpugovernor" "${PLATFORM}" "${ROMNAME##*/}") if [ ! "${PERFORMANCE_MODE}" = "auto" ] @@ -474,6 +481,15 @@ fi clear_screen +### Reset the number of cores to use. +NUMCORES=$(get_setting "system.cores") +if [ -z "${NUMCORES}" ] +then + onlinecores ${NUMCORES} 0 +else + onlinecores all 1 +fi + ### Restore the overclock mode if [ -e "/usr/bin/overclock" ] then diff --git a/packages/ui/emulationstation/package.mk b/packages/ui/emulationstation/package.mk index 6d0d56e4c..5f7a69b11 100644 --- a/packages/ui/emulationstation/package.mk +++ b/packages/ui/emulationstation/package.mk @@ -3,7 +3,7 @@ # Copyright (C) 2020-present Fewtarius PKG_NAME="emulationstation" -PKG_VERSION="fe37789" +PKG_VERSION="c0966ea" PKG_GIT_CLONE_BRANCH="main" PKG_REV="1" PKG_ARCH="any" From db0c587985ab1221aed9a2b6ad475fb3b9632a0a Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 05:13:05 -0500 Subject: [PATCH 09/23] CPU core enabler. --- packages/jelos/profile.d/99-freqfunctions | 13 ++++++++----- .../sysutils/autostart/sources/common/001-setup | 9 +++++++++ packages/ui/emulationstation/package.mk | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/jelos/profile.d/99-freqfunctions b/packages/jelos/profile.d/99-freqfunctions index 459020678..443cf1892 100644 --- a/packages/jelos/profile.d/99-freqfunctions +++ b/packages/jelos/profile.d/99-freqfunctions @@ -28,14 +28,17 @@ set_online_cores() { exit 1 fi - for core in $(seq 0 1 $(( ${1} - 1 ))) - do - echo 1 >/sys/devices/system/cpu/cpu${core}/online 2>/dev/null - done + if [ "${CORES}" -gt 0 ] + then + for core in $(seq 0 1 ${1}) + do + echo 1 | tee /sys/devices/system/cpu/cpu${core}/online >/dev/null 2>&1 + done + fi for core in $(seq ${CORES} 1 ${AVAILABLE_CPUS}) do - echo ${MODE} >/sys/devices/system/cpu/cpu${core}/online 2>/dev/null + echo ${MODE} | tee /sys/devices/system/cpu/cpu${core}/online >/dev/null 2>&1 done } diff --git a/packages/sysutils/autostart/sources/common/001-setup b/packages/sysutils/autostart/sources/common/001-setup index a5ebf1af5..efa4f341a 100755 --- a/packages/sysutils/autostart/sources/common/001-setup +++ b/packages/sysutils/autostart/sources/common/001-setup @@ -25,6 +25,15 @@ ln -sf /tmp/cache /storage/cache/.cores ### so we'll reset the mount option to 0. set_setting clouddrive.mounted 0 +### Enable the desired number of cores. +NUMCORES=$(get_setting "system.cores") +if [ -n "${NUMCORES}" ] +then + onlinecores ${NUMCORES} 0 +else + onlinecores all 1 +fi + ### If we don't have a default governor set, set it ### to schedutil. if [ -z "$(get_setting system.cpugovernor)" ] diff --git a/packages/ui/emulationstation/package.mk b/packages/ui/emulationstation/package.mk index 5f7a69b11..0fff1db5d 100644 --- a/packages/ui/emulationstation/package.mk +++ b/packages/ui/emulationstation/package.mk @@ -3,7 +3,7 @@ # Copyright (C) 2020-present Fewtarius PKG_NAME="emulationstation" -PKG_VERSION="c0966ea" +PKG_VERSION="6a41800" PKG_GIT_CLONE_BRANCH="main" PKG_REV="1" PKG_ARCH="any" From 833585b12c3b048ab45a4c2368dd6c2bb389e590 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 05:19:36 -0500 Subject: [PATCH 10/23] Fix runemu oops. --- packages/jelos/sources/scripts/runemu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jelos/sources/scripts/runemu.sh b/packages/jelos/sources/scripts/runemu.sh index c6f0530b3..69b56f84e 100755 --- a/packages/jelos/sources/scripts/runemu.sh +++ b/packages/jelos/sources/scripts/runemu.sh @@ -94,7 +94,7 @@ fi ### Offline all but the number of cores we need for this game if configured. NUMCORES=$(get_setting "cores" "${PLATFORM}" "${ROMNAME##*/}") -if [ -z "${NUMCORES}" ] +if [ -n "${NUMCORES}" ] then onlinecores ${NUMCORES} 0 fi From 22a9843b61ea91504ce1e089b017f6d62132fc5f Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 05:55:36 -0500 Subject: [PATCH 11/23] Cleanup. --- packages/jelos/profile.d/99-freqfunctions | 7 ------- packages/jelos/sources/scripts/runemu.sh | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/jelos/profile.d/99-freqfunctions b/packages/jelos/profile.d/99-freqfunctions index 443cf1892..840da8096 100644 --- a/packages/jelos/profile.d/99-freqfunctions +++ b/packages/jelos/profile.d/99-freqfunctions @@ -21,13 +21,6 @@ set_online_cores() { ;; esac - if (( "${1}" < 2 )) && \ - [ "${MODE}" = "0" ] - then - echo "Invalid selection." - exit 1 - fi - if [ "${CORES}" -gt 0 ] then for core in $(seq 0 1 ${1}) diff --git a/packages/jelos/sources/scripts/runemu.sh b/packages/jelos/sources/scripts/runemu.sh index 69b56f84e..29863a3fa 100755 --- a/packages/jelos/sources/scripts/runemu.sh +++ b/packages/jelos/sources/scripts/runemu.sh @@ -483,7 +483,7 @@ clear_screen ### Reset the number of cores to use. NUMCORES=$(get_setting "system.cores") -if [ -z "${NUMCORES}" ] +if [ -n "${NUMCORES}" ] then onlinecores ${NUMCORES} 0 else From f24b324b172ed24f2d5025c0ec2b62b7499accf0 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 06:14:42 -0500 Subject: [PATCH 12/23] Fix jelos-info reporting CPUFreq info. --- packages/jelos/sources/scripts/jelos-info | 73 +++++++++++++---------- 1 file changed, 41 insertions(+), 32 deletions(-) diff --git a/packages/jelos/sources/scripts/jelos-info b/packages/jelos/sources/scripts/jelos-info index 71596bf17..f29896d85 100755 --- a/packages/jelos/sources/scripts/jelos-info +++ b/packages/jelos/sources/scripts/jelos-info @@ -42,31 +42,36 @@ do fi done -declare -a CF MF -CNTR=0 -for CPUFREQ in /sys/devices/system/cpu/cpufreq/* -do - if [[ "${CPUFREQ}" =~ boost ]] - then - continue - fi - if [ "${CNTR}" -eq 0 ] - then - CF+=("CURRENT FREQUENCY:") - MF+=("MAXIMUM FREQUENCY:") - fi - RELCPUS=$(cat ${CPUFREQ}/related_cpus) - if [ "${#RELCPUS}" -gt 1 ] - then - FIELD="$(cat ${CPUFREQ}/related_cpus 2>/dev/null | awk '{print $1"-"$NF}')" - else - FIELD="$(cat ${CPUFREQ}/related_cpus)" - fi - CF+=("CORES ${FIELD}: $(( $(cat ${CPUFREQ}/scaling_cur_freq | sort | tail -n 1) / 1000))MHz") - MF+=("CORES ${FIELD}: $(( $(cat ${CPUFREQ}/scaling_max_freq | sort | tail -n 1) / 1000))MHz") - CNTR=$(( CNTR + 1 )) -done +case ${HW_ARCH} in + aarch64) + declare -a CF MF + + CNTR=0 + for CPUFREQ in /sys/devices/system/cpu/cpufreq/* + do + if [[ "${CPUFREQ}" =~ boost ]] + then + continue + fi + if [ "${CNTR}" -eq 0 ] + then + CF+=("CURRENT FREQUENCY:") + MF+=("MAXIMUM FREQUENCY:") + fi + RELCPUS=$(cat ${CPUFREQ}/related_cpus) + if [ "${#RELCPUS}" -gt 1 ] + then + FIELD="$(cat ${CPUFREQ}/related_cpus 2>/dev/null | awk '{print $1"-"$NF}')" + else + FIELD="$(cat ${CPUFREQ}/related_cpus)" + fi + CF+=("CORES ${FIELD}: $(( $(cat ${CPUFREQ}/scaling_cur_freq | sort | tail -n 1) / 1000))MHz") + MF+=("CORES ${FIELD}: $(( $(cat ${CPUFREQ}/scaling_max_freq | sort | tail -n 1) / 1000))MHz") + CNTR=$(( CNTR + 1 )) + done + ;; +esac # temperature # Unit: millidegree Celsius @@ -111,11 +116,15 @@ then fi echo "CPU FAN: ${FANSPEED}" fi -for C in "${CF[@]}" -do - echo ${C} -done -for M in "${MF[@]}" -do - echo ${M} -done +case ${HW_ARCH} in + aarch64) + for C in "${CF[@]}" + do + echo ${C} + done + for M in "${MF[@]}" + do + echo ${M} + done + ;; +esac From ec42c8d6a6c24173466ca8d9a676f27e8cc5f41a Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 06:42:44 -0500 Subject: [PATCH 13/23] Re-order network restart/wifi start. --- .../sysutils/autostart/sources/common/008-network | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/sysutils/autostart/sources/common/008-network b/packages/sysutils/autostart/sources/common/008-network index c58ec753d..bf5865a7d 100755 --- a/packages/sysutils/autostart/sources/common/008-network +++ b/packages/sysutils/autostart/sources/common/008-network @@ -8,12 +8,10 @@ HOSTNAME=$(get_setting system.hostname) hostname ${HOSTNAME} avahi-set-host-name ${HOSTNAME} -if [ "$(get_setting internal.wifi)" == 0 ] && [ "${DEVICE_INTERNAL_WIFI}" = true ] +NETCHECK=$(systemctl status connman >/dev/null 2>&1) +if [ "$?" = "0" ] then - nohup rmmod ${DEVICE_WIFI_MODULE} & - exit 0 -else - set_setting internal.wifi 1 + systemctl restart connman fi if [ "$(get_setting wifi.enabled)" == "0" ] || [ "$1" == "disable" ] @@ -23,9 +21,3 @@ elif [ "$(get_setting wifi.enabled)" == "1" ] || [ "$1" == "enable" ] then nohup wifictl enable & fi - -NETCHECK=$(systemctl status connman >/dev/null 2>&1) -if [ "$?" = "0" ] -then - systemctl restart connman -fi From 2669ed1980ef1a99a13a7faf313e93111777724a Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 07:04:57 -0500 Subject: [PATCH 14/23] Add default to runemu. --- packages/jelos/sources/scripts/runemu.sh | 3 ++- packages/ui/emulationstation/package.mk | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/jelos/sources/scripts/runemu.sh b/packages/jelos/sources/scripts/runemu.sh index 29863a3fa..d917474e2 100755 --- a/packages/jelos/sources/scripts/runemu.sh +++ b/packages/jelos/sources/scripts/runemu.sh @@ -94,7 +94,8 @@ fi ### Offline all but the number of cores we need for this game if configured. NUMCORES=$(get_setting "cores" "${PLATFORM}" "${ROMNAME##*/}") -if [ -n "${NUMCORES}" ] +if [ -n "${NUMCORES}" ] && + [ ! ${NUMCORES} = "default" ] then onlinecores ${NUMCORES} 0 fi diff --git a/packages/ui/emulationstation/package.mk b/packages/ui/emulationstation/package.mk index 0fff1db5d..f28f2d9a0 100644 --- a/packages/ui/emulationstation/package.mk +++ b/packages/ui/emulationstation/package.mk @@ -3,7 +3,7 @@ # Copyright (C) 2020-present Fewtarius PKG_NAME="emulationstation" -PKG_VERSION="6a41800" +PKG_VERSION="8acbf3f" PKG_GIT_CLONE_BRANCH="main" PKG_REV="1" PKG_ARCH="any" From 0a728e10d3632c4a2f68358d01a940a6eac6c54f Mon Sep 17 00:00:00 2001 From: mason Date: Tue, 3 Jan 2023 13:54:38 +0000 Subject: [PATCH 15/23] Fix start_yuzu.sh typo --- packages/games/emulators/yuzusa/scripts/start_yuzu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/games/emulators/yuzusa/scripts/start_yuzu.sh b/packages/games/emulators/yuzusa/scripts/start_yuzu.sh index 801be733b..d48b57e3e 100644 --- a/packages/games/emulators/yuzusa/scripts/start_yuzu.sh +++ b/packages/games/emulators/yuzusa/scripts/start_yuzu.sh @@ -18,7 +18,7 @@ fi #Move Nand / Saves to switch roms folder if [ ! -d "/storage/roms/switch/yuzu/nand" ]; then - mkdir -p "/storage/switch/yuzu/nand" + mkdir -p "/storage/roms/switch/yuzu/nand" fi rm -rf /storage/.config/yuzu/nand ln -sf /storage/roms/switch/yuzu/nand /storage/.config/yuzu/nand From 607c42277627e60f8f924e3408ec37220d81f145 Mon Sep 17 00:00:00 2001 From: mason Date: Tue, 3 Jan 2023 14:37:08 +0000 Subject: [PATCH 16/23] Add Citrasa ES features. --- .../emulators/citrasa/scripts/start_citra.sh | 63 +++++++++++++++++++ .../config/common/es_features.cfg | 17 +++++ 2 files changed, 80 insertions(+) diff --git a/packages/games/emulators/citrasa/scripts/start_citra.sh b/packages/games/emulators/citrasa/scripts/start_citra.sh index 1a1e0e57c..19f41b856 100644 --- a/packages/games/emulators/citrasa/scripts/start_citra.sh +++ b/packages/games/emulators/citrasa/scripts/start_citra.sh @@ -10,6 +10,69 @@ if [ ! -d "/storage/.config/citra-emu" ]; then cp -r "/usr/config/citra-emu" "/storage/.config/" fi +#Move sdmc & nand to 3ds roms folder +if [ ! -d "/storage/roms/3ds/citrasa/sdmc" ]; then + mkdir -p "/storage/roms/3ds/citrasa/sdmc" +fi + +rm -rf /storage/.config/citra-emu/sdmc +ln -sf /storage/roms/3ds/citrasa/sdmc /storage/.config/citra-emu/sdmc + +if [ ! -d "/storage/roms/3ds/citrasa/nand" ]; then + mkdir -p "/storage/roms/3ds/citrasa/nand" +fi + +rm -rf /storage/.config/citra-emu/nand +ln -sf /storage/roms/3ds/citrasa/nand /storage/.config/citra-emu/nand + + + #Emulation Station Features + GAME=$(echo "${1}"| sed "s#^/.*/##") + RES=$(get_setting resolution_scale 3ds "${GAME}") + SLAYOUT=$(get_setting screen_layout 3ds "${GAME}") + + #Resolution Scale + if [ "$RES" = "0" ] + then + sed -i '/resolution_factor =/c\resolution_factor = 0' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$RES" = "1" ] + then + sed -i '/resolution_factor =/c\resolution_factor = 1' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$RES" = "2" ] + then + sed -i '/resolution_factor =/c\resolution_factor = 2' /storage/.config/citra-emu/sdl2-config.ini + fi + + #Screen Layout + if [ "$SLAYOUT" = "0" ] + then + sed -i '/layout_option =/c\layout_option = 0' /storage/.config/citra-emu/sdl2-config.ini + sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$SLAYOUT" = "1a" ] + then + sed -i '/layout_option =/c\layout_option = 1' /storage/.config/citra-emu/sdl2-config.ini + sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$SLAYOUT" = "1b" ] + then + sed -i '/layout_option =/c\layout_option = 1' /storage/.config/citra-emu/sdl2-config.ini + sed -i '/swap_screen =/c\swap_screen = 1' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$SLAYOUT" = "2" ] + then + sed -i '/layout_option =/c\layout_option = 2' /storage/.config/citra-emu/sdl2-config.ini + sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/citra-emu/sdl2-config.ini + fi + if [ "$SLAYOUT" = "3" ] + then + sed -i '/layout_option =/c\layout_option = 3' /storage/.config/citra-emu/sdl2-config.ini + sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/citra-emu/sdl2-config.ini + fi + + rm -rf /storage/.local/share/citra-emu ln -sfv /storage/.config/citra-emu /storage/.local/share/citra-emu diff --git a/packages/ui/emulationstation/config/common/es_features.cfg b/packages/ui/emulationstation/config/common/es_features.cfg index 49513a274..18c83f78b 100644 --- a/packages/ui/emulationstation/config/common/es_features.cfg +++ b/packages/ui/emulationstation/config/common/es_features.cfg @@ -200,6 +200,23 @@ + + + + + + + + + + + + + + + + + From c4d0955a32f85513b35c44ab0341a35f54c6c0ca Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 18:08:36 -0500 Subject: [PATCH 17/23] Ayaneo 2 quirks (needs testing). --- .../patches/X86_64/005-ayaneo-ayaneo-2.patch | 16 ++++++++++++++++ .../autostart/sources/quirks/AYANEO AYANEO 2 | 1 + 2 files changed, 17 insertions(+) create mode 100644 packages/kernel/linux/patches/X86_64/005-ayaneo-ayaneo-2.patch create mode 120000 packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2 diff --git a/packages/kernel/linux/patches/X86_64/005-ayaneo-ayaneo-2.patch b/packages/kernel/linux/patches/X86_64/005-ayaneo-ayaneo-2.patch new file mode 100644 index 000000000..be899b381 --- /dev/null +++ b/packages/kernel/linux/patches/X86_64/005-ayaneo-ayaneo-2.patch @@ -0,0 +1,16 @@ +diff -rupN linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c +--- linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c 2022-12-31 16:12:06.802587676 -0500 ++++ linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c 2023-01-03 17:31:39.106353974 -0500 +@@ -164,6 +164,12 @@ static const struct dmi_system_id orient + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"), + }, + .driver_data = (void *)&lcd800x1280_rightside_up, ++ }, { /* AYANEO AYANEO 2 */ ++ .matches = { ++ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"), ++ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYANEO 2"), ++ }, ++ .driver_data = (void *)&lcd1200x1920_rightside_up, + }, { /* AYA NEO 2021 */ + .matches = { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"), diff --git a/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2 b/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2 new file mode 120000 index 000000000..c710375de --- /dev/null +++ b/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2 @@ -0,0 +1 @@ +AYANEO AIR \ No newline at end of file From 2118a2fa5eef5dda89552da68c3829feca116daa Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 21:03:00 -0500 Subject: [PATCH 18/23] Add quirks for AYANEO 2021, 2021 Pro, and 2021 Retro Power. --- ...eo-ayaneo-2.patch => 005-ayaneo-display-quirks.patch} | 9 +++++++-- .../sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 | 1 + .../autostart/sources/quirks/AYANEO AYANEO 2021 Pro | 1 + .../sources/quirks/AYANEO AYANEO 2021 Pro Retro Power | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) rename packages/kernel/linux/patches/X86_64/{005-ayaneo-ayaneo-2.patch => 005-ayaneo-display-quirks.patch} (73%) create mode 120000 packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 create mode 120000 packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 Pro create mode 120000 packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 Pro Retro Power diff --git a/packages/kernel/linux/patches/X86_64/005-ayaneo-ayaneo-2.patch b/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch similarity index 73% rename from packages/kernel/linux/patches/X86_64/005-ayaneo-ayaneo-2.patch rename to packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch index be899b381..b9defaf56 100644 --- a/packages/kernel/linux/patches/X86_64/005-ayaneo-ayaneo-2.patch +++ b/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch @@ -1,7 +1,7 @@ diff -rupN linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c --- linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c 2022-12-31 16:12:06.802587676 -0500 -+++ linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c 2023-01-03 17:31:39.106353974 -0500 -@@ -164,6 +164,12 @@ static const struct dmi_system_id orient ++++ linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c 2023-01-03 21:00:44.235647079 -0500 +@@ -164,10 +164,16 @@ static const struct dmi_system_id orient DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"), }, .driver_data = (void *)&lcd800x1280_rightside_up, @@ -14,3 +14,8 @@ diff -rupN linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux }, { /* AYA NEO 2021 */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"), +- DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"), + }, + .driver_data = (void *)&lcd800x1280_rightside_up, + }, { /* AYA NEO AIR */ diff --git a/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 b/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 new file mode 120000 index 000000000..c710375de --- /dev/null +++ b/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 @@ -0,0 +1 @@ +AYANEO AIR \ No newline at end of file diff --git a/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 Pro b/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 Pro new file mode 120000 index 000000000..c710375de --- /dev/null +++ b/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 Pro @@ -0,0 +1 @@ +AYANEO AIR \ No newline at end of file diff --git a/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 Pro Retro Power b/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 Pro Retro Power new file mode 120000 index 000000000..c710375de --- /dev/null +++ b/packages/sysutils/autostart/sources/quirks/AYANEO AYANEO 2021 Pro Retro Power @@ -0,0 +1 @@ +AYANEO AIR \ No newline at end of file From 784a371383be4cd231ded0b5cf0f48c70cd56d5e Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 21:10:59 -0500 Subject: [PATCH 19/23] Tweak the quirks a bit. --- .../X86_64/005-ayaneo-display-quirks.patch | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch b/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch index b9defaf56..b685c57a9 100644 --- a/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch +++ b/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch @@ -1,7 +1,7 @@ diff -rupN linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c --- linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c 2022-12-31 16:12:06.802587676 -0500 -+++ linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c 2023-01-03 21:00:44.235647079 -0500 -@@ -164,10 +164,16 @@ static const struct dmi_system_id orient ++++ linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c 2023-01-03 21:09:53.165942973 -0500 +@@ -164,11 +164,21 @@ static const struct dmi_system_id orient DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"), }, .driver_data = (void *)&lcd800x1280_rightside_up, @@ -14,8 +14,14 @@ diff -rupN linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux }, { /* AYA NEO 2021 */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"), -- DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"), - }, + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"), +- }, ++ }, { /* AYA NEO 2021 Pro / Pro Retro Power */ ++ .matches = { ++ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "AYANEO 2021 Pro"), ++ }, .driver_data = (void *)&lcd800x1280_rightside_up, }, { /* AYA NEO AIR */ + .matches = { +Binary files linux-6.1.2.orig/drivers/gpu/drm/.drm_panel_orientation_quirks.c.swp and linux-6.1.2/drivers/gpu/drm/.drm_panel_orientation_quirks.c.swp differ From 1c9a1ff316506942e96a340c6eee77eaa4c2875f Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 21:15:18 -0500 Subject: [PATCH 20/23] Drop the changelog, fix broken dev build link. --- .github/workflows/build-dev.yaml | 5 +---- .github/workflows/build-main.yaml | 3 --- .github/workflows/release-dev.yaml | 10 ---------- .github/workflows/release-main.yaml | 11 ----------- 4 files changed, 1 insertion(+), 28 deletions(-) diff --git a/.github/workflows/build-dev.yaml b/.github/workflows/build-dev.yaml index d40b2651f..355f99b94 100644 --- a/.github/workflows/build-dev.yaml +++ b/.github/workflows/build-dev.yaml @@ -100,7 +100,7 @@ jobs: * Decompress the image. * Write the image to an SDCARD using an imaging tool. Common imaging tools include [Balena Etcher](https://www.balena.io/etcher/), [Raspberry Pi Imager](https://www.raspberrypi.com/software/), and [Win32 Disk Imager](https://sourceforge.net/projects/win32diskimager/). If you're skilled with the command line, dd works fine too. - Download: [[Ayaneo Air / Air Pro /Atari VCS/Generic x86_64](https://github.com/JustEnoughLinuxOS/distribution-dev/releases/download/JELOS-handheld.x86_64-${{ steps.version.outputs.version }}.img.gz)] + Download: [[Ayaneo Air / Air Pro /Atari VCS/Generic x86_64](https://github.com/JustEnoughLinuxOS/distribution-dev/releases/download/${{ steps.version.outputs.version }}/JELOS-handheld.x86_64-${{ steps.version.outputs.version }}.img.gz)] ## Upgrading * Download and install the update online via the System Settings menu. @@ -124,9 +124,6 @@ jobs: ## Contributing * [Developing and Building JELOS](https://github.com/JustEnoughLinuxOS/distribution/blob/dev/BUILDING.md) - ## Change Log - ${{ github.event.client_payload.release_notes }} - artifacts: "release/*" prerelease: false draft: true diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 9b8143675..01fda0ca3 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -123,9 +123,6 @@ jobs: ## Contributing * [Developing and Building JELOS](https://github.com/JustEnoughLinuxOS/distribution/blob/dev/BUILDING.md) - ## Change Log - ${{ github.event.client_payload.release_notes }} - artifacts: "release/*" prerelease: false draft: true diff --git a/.github/workflows/release-dev.yaml b/.github/workflows/release-dev.yaml index e70624163..c35a92b62 100644 --- a/.github/workflows/release-dev.yaml +++ b/.github/workflows/release-dev.yaml @@ -35,15 +35,6 @@ jobs: run: | echo "full_name=$(git config --get remote.origin.url | sed 's|^.*github.com/||g' | sed 's/.git$//g')" >> $GITHUB_OUTPUT - - name: changes - id: changes - run: | - release_notes="$(git log --after "$(date -d "yesterday" +%Y-%m-%d)" --pretty=format:"* %h: %s")" - release_notes="${release_notes//'%'/'%25'}" - release_notes="${release_notes//$'\n'/'%0A'}" - release_notes="${release_notes//$'\r'/'%0D'}" - echo "release_notes=${release_notes}" >> $GITHUB_OUTPUT - - name: change_counter id: counter run: | @@ -65,6 +56,5 @@ jobs: { "branch" : "${{ env.BRANCH }}", "release_tag" : "${{steps.date.outputs.date}}", - "release_notes" : ${{toJSON(steps.changes.outputs.release_notes)}} } diff --git a/.github/workflows/release-main.yaml b/.github/workflows/release-main.yaml index 2c983a4f0..bb8ff69db 100644 --- a/.github/workflows/release-main.yaml +++ b/.github/workflows/release-main.yaml @@ -42,16 +42,6 @@ jobs: run: | echo "full_name=$(git config --get remote.origin.url | sed 's|^.*github.com/||g' | sed 's/.git$//g')" >> $GITHUB_OUTPUT - - name: changes - id: changes - run: | - prevrelcommit="$(git rev-list --tags --max-count=1)" - release_notes="$(git log ${prevrelcommit}..HEAD --pretty=format:"* %h: %s")" - release_notes="${release_notes//'%'/'%25'}" - release_notes="${release_notes//$'\n'/'%0A'}" - release_notes="${release_notes//$'\r'/'%0D'}" - echo "changes=$(echo ${release_notes} | wc -l)" >> $GITHUB_OUTPUT - echo "release_notes=${release_notes}" >> $GITHUB_OUTPUT - name: Get date for artifacts id: date run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT @@ -67,6 +57,5 @@ jobs: { "branch" : "${{ env.BRANCH }}", "release_tag" : "${{steps.date.outputs.date}}", - "release_notes" : ${{toJSON(steps.changes.outputs.release_notes)}} } From 4a419bb6b65715e1e50758b8db484d26ac3a27b5 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 21:32:50 -0500 Subject: [PATCH 21/23] Fix quirks oops. --- .../linux/patches/X86_64/005-ayaneo-display-quirks.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch b/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch index b685c57a9..2f86a404b 100644 --- a/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch +++ b/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch @@ -1,7 +1,7 @@ diff -rupN linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c --- linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c 2022-12-31 16:12:06.802587676 -0500 -+++ linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c 2023-01-03 21:09:53.165942973 -0500 -@@ -164,11 +164,21 @@ static const struct dmi_system_id orient ++++ linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c 2023-01-03 21:31:30.114697316 -0500 +@@ -164,11 +164,22 @@ static const struct dmi_system_id orient DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"), }, .driver_data = (void *)&lcd800x1280_rightside_up, @@ -16,6 +16,7 @@ diff -rupN linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"), - }, ++ .driver_data = (void *)&lcd800x1280_rightside_up, + }, { /* AYA NEO 2021 Pro / Pro Retro Power */ + .matches = { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"), @@ -24,4 +25,3 @@ diff -rupN linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux .driver_data = (void *)&lcd800x1280_rightside_up, }, { /* AYA NEO AIR */ .matches = { -Binary files linux-6.1.2.orig/drivers/gpu/drm/.drm_panel_orientation_quirks.c.swp and linux-6.1.2/drivers/gpu/drm/.drm_panel_orientation_quirks.c.swp differ From 0154532fb6b6fae62b14e73d996fda6d71f4ba28 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 3 Jan 2023 21:45:50 -0500 Subject: [PATCH 22/23] Ok, wake up brain. XD --- .../linux/patches/X86_64/005-ayaneo-display-quirks.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch b/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch index 2f86a404b..9894e723c 100644 --- a/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch +++ b/packages/kernel/linux/patches/X86_64/005-ayaneo-display-quirks.patch @@ -1,7 +1,7 @@ diff -rupN linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c --- linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c 2022-12-31 16:12:06.802587676 -0500 -+++ linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c 2023-01-03 21:31:30.114697316 -0500 -@@ -164,11 +164,22 @@ static const struct dmi_system_id orient ++++ linux-6.1.2/drivers/gpu/drm/drm_panel_orientation_quirks.c 2023-01-03 21:41:26.154076595 -0500 +@@ -164,11 +164,23 @@ static const struct dmi_system_id orient DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"), }, .driver_data = (void *)&lcd800x1280_rightside_up, @@ -16,6 +16,7 @@ diff -rupN linux-6.1.2.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"), - }, ++ }, + .driver_data = (void *)&lcd800x1280_rightside_up, + }, { /* AYA NEO 2021 Pro / Pro Retro Power */ + .matches = { From 31153ba77578269229dd0633e734a917f5f19b8c Mon Sep 17 00:00:00 2001 From: mason Date: Wed, 4 Jan 2023 04:27:05 +0000 Subject: [PATCH 23/23] Bump Yuzu & Fix/Add features --- packages/games/emulators/dolphinsa/package.mk | 2 +- .../games/emulators/duckstationsa/package.mk | 2 +- packages/games/emulators/yuzusa/package.mk | 2 +- .../emulators/yuzusa/scripts/start_yuzu.sh | 25 +++++++++++++++++-- .../config/common/es_features.cfg | 7 +++++- 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/packages/games/emulators/dolphinsa/package.mk b/packages/games/emulators/dolphinsa/package.mk index ce60d60b7..029c05e6b 100755 --- a/packages/games/emulators/dolphinsa/package.mk +++ b/packages/games/emulators/dolphinsa/package.mk @@ -10,7 +10,7 @@ case ${DEVICE} in handheld) PKG_SITE="https://github.com/dolphin-emu/dolphin" PKG_URL="${PKG_SITE}.git" - PKG_VERSION="f6fbeaf3554b3af06d9e1584189bcf2274838063" + PKG_VERSION="e4c007e2e1a442dbab620f91ca5f6b9b2b27dd5b" PKG_PATCH_DIRS+=" wayland" ;; *) diff --git a/packages/games/emulators/duckstationsa/package.mk b/packages/games/emulators/duckstationsa/package.mk index f51319b97..87db9d852 100644 --- a/packages/games/emulators/duckstationsa/package.mk +++ b/packages/games/emulators/duckstationsa/package.mk @@ -10,7 +10,7 @@ PKG_SHORTDESC="Fast PlayStation 1 emulator for x86-64/AArch32/AArch64 " case ${DEVICE} in handheld) - PKG_VERSION="928dd0e6656ef76ea54b380ec356f872e5e92c42" + PKG_VERSION="06d6447e59f208f21ba42f4df1665b789db13fb7" PKG_PATCH_DIRS+=" new" ;; *) diff --git a/packages/games/emulators/yuzusa/package.mk b/packages/games/emulators/yuzusa/package.mk index dedacd864..1a737cbd2 100644 --- a/packages/games/emulators/yuzusa/package.mk +++ b/packages/games/emulators/yuzusa/package.mk @@ -2,7 +2,7 @@ # Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech) PKG_NAME="yuzusa" -PKG_VERSION="88f5d38b9349afefd9257a779323531b21001500" +PKG_VERSION="bbeb6e460cf1fd8f796978980e745410bc77ce08" PKG_ARCH="x86_64" PKG_LICENSE="GPLv3" PKG_SITE="https://github.com/yuzu-emu/yuzu" diff --git a/packages/games/emulators/yuzusa/scripts/start_yuzu.sh b/packages/games/emulators/yuzusa/scripts/start_yuzu.sh index d48b57e3e..583974685 100644 --- a/packages/games/emulators/yuzusa/scripts/start_yuzu.sh +++ b/packages/games/emulators/yuzusa/scripts/start_yuzu.sh @@ -35,6 +35,7 @@ ln -sf /storage/roms/bios/yuzu /storage/.config/yuzu/keys AF=$(get_setting anisotropic_filtering switch "${GAME}") AA=$(get_setting anti_aliasing switch "${GAME}") ASPECT=$(get_setting aspect_ratio switch "${GAME}") + GACCURACY=$(get_setting gpu_accuracy switch "${GAME}") GRENDERER=$(get_setting graphics_backend switch "${GAME}") IRES=$(get_setting internal_resolution switch "${GAME}") PFILTER=$(get_setting pixel_filter switch "${GAME}") @@ -78,19 +79,39 @@ ln -sf /storage/roms/bios/yuzu /storage/.config/yuzu/keys then sed -i '/aspect_ratio =/c\aspect_ratio = 0' /storage/.config/yuzu/sdl2-config.ini fi + if [ "$ASPECT" = "1" ] then sed -i '/aspect_ratio =/c\aspect_ratio = 1' /storage/.config/yuzu/sdl2-config.ini fi - if [ "$ASPECT" = "2" ] + + if [ "$ASPECT" = "2" ] then sed -i '/aspect_ratio =/c\aspect_ratio = 2' /storage/.config/yuzu/sdl2-config.ini fi - if [ "$ASPECT" = "3" ] + + if [ "$ASPECT" = "3" ] then sed -i '/aspect_ratio =/c\aspect_ratio = 3' /storage/.config/yuzu/sdl2-config.ini fi + #GPU Accuracy + if [ "$GACCURACY" = "0" ] + then + sed -i '/gpu_accuracy =/c\gpu_accuracy = 0' /storage/.config/yuzu/sdl2-config.ini + fi + + if [ "$GACCURACY" = "1" ] + then + sed -i '/gpu_accuracy =/c\gpu_accuracy = 1' /storage/.config/yuzu/sdl2-config.ini + fi + + if [ "$GACCURACY" = "2" ] + then + sed -i '/gpu_accuracy =/c\gpu_accuracy = 2' /storage/.config/yuzu/sdl2-config.ini + fi + + #Graphics Backend if [ "$GRENDERER" = "0" ] then diff --git a/packages/ui/emulationstation/config/common/es_features.cfg b/packages/ui/emulationstation/config/common/es_features.cfg index 18c83f78b..7f391073a 100644 --- a/packages/ui/emulationstation/config/common/es_features.cfg +++ b/packages/ui/emulationstation/config/common/es_features.cfg @@ -173,6 +173,11 @@ + + + + + @@ -194,7 +199,7 @@ - +