Finish basic kronos integration.
This commit is contained in:
parent
fe865b899b
commit
7fad828278
8 changed files with 180 additions and 54 deletions
|
@ -43,7 +43,7 @@ configure_package() {
|
|||
|
||||
# Wayland support
|
||||
if [ "${DISPLAYSERVER}" = "wl" ]; then
|
||||
PKG_DEPENDS_TARGET+=" wayland xcb-util xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm"
|
||||
PKG_DEPENDS_TARGET+=" wayland xcb-util xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm egl-wayland"
|
||||
fi
|
||||
|
||||
# Vulkan support
|
||||
|
@ -137,10 +137,10 @@ pre_configure_target() {
|
|||
-skip qtx11extras"
|
||||
|
||||
# Build with OpenGL or OpenGLES support
|
||||
if [ "${OPENGL_SUPPORT}" = "yes" ]; then
|
||||
PKG_CONFIGURE_OPTS_TARGET+=" -opengl -no-eglfs"
|
||||
elif [ "${OPENGLES_SUPPORT}" = "yes" ]; then
|
||||
if [ "${OPENGLES_SUPPORT}" = "yes" ]; then
|
||||
PKG_CONFIGURE_OPTS_TARGET+=" -opengl es2"
|
||||
elif [ "${OPENGL_SUPPORT}" = "yes" ]; then
|
||||
PKG_CONFIGURE_OPTS_TARGET+=" -opengl"
|
||||
fi
|
||||
|
||||
# Wayland support
|
||||
|
@ -189,16 +189,8 @@ configure_target() {
|
|||
echo "QMAKE_CFLAGS = ${CFLAGS}" >> ${QMAKE_CONF}
|
||||
echo "QMAKE_CXXFLAGS = ${CXXFLAGS}" >> ${QMAKE_CONF}
|
||||
echo "QMAKE_LFLAGS = ${LDFLAGS}" >> ${QMAKE_CONF}
|
||||
# Set Mesa 3D OpenGL ES based project flags
|
||||
if [ "${OPENGLES_SUPPORT}" = "yes" ]; then
|
||||
if [ ${DISPLAYSERVER} = "no" ]; then
|
||||
echo "QMAKE_LIBS_EGL += -lEGL" >> ${QMAKE_CONF}
|
||||
echo "EGLFS_DEVICE_INTEGRATION = eglfs_kms" >> ${QMAKE_CONF}
|
||||
echo "DEFINES += MESA_EGL_NO_X11_HEADERS" >> ${QMAKE_CONF}
|
||||
fi
|
||||
if [ ! ${DISPLAYSERVER} = "x11" ]; then
|
||||
echo "DEFINES += QT_EGL_NO_X11" >> ${QMAKE_CONF}
|
||||
fi
|
||||
echo "QMAKE_LIBS_EGL += -lEGL" >> ${QMAKE_CONF}
|
||||
fi
|
||||
echo "load(qt_config)" >> ${QMAKE_CONF}
|
||||
echo '#include "../../linux-g++/qplatformdefs.h"' >> ${QMAKE_CONF_DIR}/qplatformdefs.h
|
||||
|
|
|
@ -1,26 +1,25 @@
|
|||
[1.0]
|
||||
Advanced\68kCore=3
|
||||
Advanced\SH2Interpreter=8
|
||||
Advanced\SH2Interpreter=0
|
||||
Cartridge\ModemIP=127.0.0.1
|
||||
Cartridge\ModemPort=1337
|
||||
Cartridge\Path\32MbitDram=
|
||||
Cartridge\STVGame=0
|
||||
Cartridge\Type=7
|
||||
Debug\Addr2Line=
|
||||
Debug\MemoryEditorCaretPosition=0
|
||||
General\Bios=
|
||||
General\BiosSettings=
|
||||
General\CdRom=2
|
||||
General\CdRomISO=
|
||||
General\ClockSync=false
|
||||
General\ClockSync=true
|
||||
General\EnableEmulatedBios=false
|
||||
General\EnableMultiThreading=true
|
||||
General\EnableVSync=true
|
||||
General\FixedBaseTime=1998-01-01T12:00:00
|
||||
General\Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37)
|
||||
General\Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x14\0\0\a\x7f\0\0\x4K\0\0\0\0\0\0\0\x14\0\0\a\x7f\0\0\x4K\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\x14\0\0\a\x7f\0\0\x4K)
|
||||
General\NumThreads=4
|
||||
General\SH2Cache=false
|
||||
General\SaveStates=/storage
|
||||
General\SaveStates=/storage/.config/kronos/
|
||||
General\ScreenshotsDirectory=/storage/screenshots
|
||||
General\ScreenshotsFormat=bmp
|
||||
General\ShowFPS=false
|
||||
|
@ -43,9 +42,10 @@ Input\Port\1\Id\1\Controller\2\Key\7=1
|
|||
Input\Port\1\Id\1\Controller\2\Key\8=2
|
||||
Input\Port\1\Id\1\Controller\2\Key\9=1114117
|
||||
Input\Port\1\Id\1\Type=2
|
||||
Memory\ExtendMemory=false
|
||||
Memory\Path=/storage/bkram.bin
|
||||
Memory\ExtendMemory=true
|
||||
Memory\Path=/storage/.config/kronos/bkram.bin
|
||||
MpegROM\Path=
|
||||
Recents\ISOs=
|
||||
STV\Region=E
|
||||
Shortcuts\%26Backup%20Manager...=Alt+B
|
||||
Shortcuts\%26Cheats%20List...=Alt+L
|
||||
|
@ -66,6 +66,16 @@ Shortcuts\%26Tools=
|
|||
Shortcuts\%26Transfer=Ctrl+T
|
||||
Shortcuts\%26Vertical%20synchronization=F4
|
||||
Shortcuts\%26View=
|
||||
Shortcuts\0%20...%20=Alt+0
|
||||
Shortcuts\1%20...%20=Alt+1
|
||||
Shortcuts\2%20...%20=Alt+2
|
||||
Shortcuts\3%20...%20=Alt+3
|
||||
Shortcuts\4%20...%20=Alt+4
|
||||
Shortcuts\5%20...%20=Alt+5
|
||||
Shortcuts\6%20...%20=Alt+6
|
||||
Shortcuts\7%20...%20=Alt+7
|
||||
Shortcuts\8%20...%20=Alt+8
|
||||
Shortcuts\9%20...%20=Alt+9
|
||||
Shortcuts\Cheat%20%26Search...=Alt+S
|
||||
Shortcuts\Eject\Load%20ISO...=Ctrl+I
|
||||
Shortcuts\F%26PS=F12
|
||||
|
@ -116,19 +126,20 @@ Shortcuts\VDP%262=
|
|||
Shortcuts\Vdp1=1
|
||||
Shortcuts\Video%20Driver=
|
||||
Shortcuts\toolBar=
|
||||
Sound\SoundCore=1
|
||||
Sound\Volume=0
|
||||
Sound\SoundCore=4
|
||||
Sound\Volume=100
|
||||
Video\AspectRatio=0
|
||||
Video\BandingMode=0
|
||||
Video\Fullscreen=true
|
||||
Video\MeshMode=0
|
||||
Video\OSDCore=3
|
||||
Video\VideoCore=2
|
||||
Video\VideoCore=1
|
||||
Video\Wireframe=0
|
||||
Video\compute_shader_mode=1
|
||||
Video\filter_type=0
|
||||
Video\polygon_generation_mode=1
|
||||
Video\polygon_generation_mode=2
|
||||
Video\resolution_mode=1
|
||||
Video\upscale_type=0
|
||||
View\Menubar=3
|
||||
View\Toolbar=1
|
||||
View\Menubar=2
|
||||
View\Toolbar=2
|
||||
autostart=true
|
||||
|
|
|
@ -8,7 +8,7 @@ PKG_ARCH="x86_64"
|
|||
PKG_URL="${PKG_SITE}.git"
|
||||
PKG_VERSION="8e0eade"
|
||||
PKG_GIT_CLONE_BRANCH="extui-align"
|
||||
PKG_DEPENDS_TARGET="toolchain SDL2 boost openal-soft zlib qt5"
|
||||
PKG_DEPENDS_TARGET="toolchain SDL2 boost openal-soft zlib qt5 egl-wayland"
|
||||
PKG_LONGDESC="Kronos is a Sega Saturn emulator forked from yabause."
|
||||
PKG_TOOLCHAIN="cmake-make"
|
||||
GET_HANDLER_SUPPORT="git"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
# Source predefined functions and variables
|
||||
|
@ -10,7 +9,7 @@ jslisten set "-9 kronos"
|
|||
|
||||
ROM_DIR="/storage/roms/saturn/kronos"
|
||||
CONFIG_DIR="/storage/.config/kronos/qt"
|
||||
SOURCE_DIR="/usr/config/kronos"
|
||||
SOURCE_DIR="/usr/config/kronos/qt"
|
||||
BIOS_BACKUP="/storage/roms/bios/kronos"
|
||||
|
||||
if [ ! -d "${ROM_DIR}" ]
|
||||
|
@ -41,31 +40,80 @@ then
|
|||
USE_BIOS=$(get_setting use_hlebios saturn)
|
||||
fi
|
||||
|
||||
if [ "$USE_BIOS" = 1 ]
|
||||
USE_SKIP=$(get_setting use_autoskip saturn "${GAME}")
|
||||
if [ "$USE_SKIP" = 1 ]
|
||||
then
|
||||
for BIOS in saturn_bios.bin sega_101.bin mpr-17933.bin mpr-18811-mx.ic1 mpr-19367-mx.ic1 stvbios.zip
|
||||
do
|
||||
BIOS=$(find /storage/roms/bios -name ${BIOS} -print 2>/dev/null)
|
||||
if [ ! -z "${BIOS}" ]
|
||||
then
|
||||
BIOS="-b ${BIOS}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
AUTOSKIP="-autoframeskip 1"
|
||||
fi
|
||||
|
||||
#Set the cores to use
|
||||
CORES=$(get_setting "cores" "${PLATFORM}" "${ROMNAME##*/}")
|
||||
if [ "${CORES}" = "little" ]
|
||||
then
|
||||
EMUPERF="${SLOW_CORES}"
|
||||
elif [ "${CORES}" = "big" ]
|
||||
then
|
||||
EMUPERF="${FAST_CORES}"
|
||||
else
|
||||
### All..
|
||||
unset EMUPERF
|
||||
fi
|
||||
VIDEO_DRIVER=$(get_setting video_driver saturn "${GAME}")
|
||||
case ${VIDEO_DRIVER} in
|
||||
opengl)
|
||||
sed -i 's~Video\\VideoCore=.*$~Video\\VideoCore=1~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
*)
|
||||
#Software
|
||||
sed -i 's~Video\\VideoCore=.*$~Video\\VideoCore=2~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Command: kronos -r 2 -i "${1}" ${BIOS}" >/var/log/exec.log 2>&1
|
||||
${EMUPERF} kronos -a -f -i "${1}" -b ${BIOS} >>/var/log/exec.log 2>&1 ||:
|
||||
AUDIO_DRIVER=$(get_setting audio_driver saturn "${GAME}")
|
||||
case ${AUDIO_DRIVER} in
|
||||
openal)
|
||||
sed -i 's~Sound\\SoundCore=.*$~Sound\\SoundCore=4~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
*)
|
||||
#SDL
|
||||
sed -i 's~Sound\\SoundCore=.*$~Sound\\SoundCore=1~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
esac
|
||||
|
||||
SHOW_FPS=$(get_setting show_fps saturn "${GAME}")
|
||||
case ${SHOW_FPS} in
|
||||
1)
|
||||
sed -i 's~General\\ShowFPS=.*$~General\\ShowFPS=true~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
*)
|
||||
sed -i 's~General\\ShowFPS=.*$~General\\ShowFPS=false~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
esac
|
||||
|
||||
USE_VSYNC=$(get_setting use_vsync saturn "${GAME}")
|
||||
case ${USE_VSYNC} in
|
||||
1)
|
||||
sed -i 's~General\\EnableVSync=.*$~General\\EnableVSync=true~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
*)
|
||||
sed -i 's~General\\EnableVSync=.*$~General\\EnableVSync=false~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
esac
|
||||
|
||||
COMPUTE_SHADER=$(get_setting gpu_rgb saturn "${GAME}")
|
||||
Video\compute_shader_mode
|
||||
case ${COMPUTE_SHADER} in
|
||||
1)
|
||||
#gpu
|
||||
sed -i 's~Video\\compute_shader_mode=.*$~Video\\compute_shader_mode=1~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
*)
|
||||
#cpu
|
||||
sed -i 's~Video\\compute_shader_mode=.*$~Video\\compute_shader_mode=1~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
esac
|
||||
|
||||
TESSELLATION=$(get_setting tessellation saturn "${GAME}")
|
||||
case ${TESSELLATION} in
|
||||
gpu)
|
||||
sed -i 's~Video\\polygon_generation_mode=.*$~Video\\polygon_generation_mode=2~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
*)
|
||||
#cpu
|
||||
sed -i 's~Video\\polygon_generation_mode=.*$~Video\\polygon_generation_mode=1~g' ${CONFIG_DIR}/kronos.ini
|
||||
;;
|
||||
esac
|
||||
|
||||
#Get the number of active threads
|
||||
ACTIVE_THREADS=$(grep processor /proc/cpuinfo | wc -l)
|
||||
sed -i 's~General\\NumThreads=.*$~General\\NumThreads='${ACTIVE_THREADS}'~g' ${CONFIG_DIR}/kronos.ini
|
||||
|
||||
kronos -a -f -i "${1}" ${BIOS} ${AUTOSKIP} >>/var/log/exec.log 2>&1 ||:
|
||||
|
|
18
packages/graphics/egl-wayland/package.mk
Normal file
18
packages/graphics/egl-wayland/package.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
PKG_NAME="egl-wayland"
|
||||
PKG_VERSION="1.1.13"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/NVIDIA/egl-wayland"
|
||||
PKG_URL=${PKG_SITE}/archive/refs/tags/${PKG_VERSION}.tar.gz
|
||||
PKG_DEPENDS_TARGET="toolchain eglexternalplatform"
|
||||
PKG_LONGDESC="Wayland EGL External Platform library."
|
||||
|
||||
configure_package() {
|
||||
if [ "${DISPLAYSERVER}" = "wl" ]
|
||||
then
|
||||
PKG_DEPENDS_TARGET+=" wayland"
|
||||
fi
|
||||
}
|
||||
|
17
packages/graphics/eglexternalplatform/package.mk
Normal file
17
packages/graphics/eglexternalplatform/package.mk
Normal file
|
@ -0,0 +1,17 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
PKG_NAME="eglexternalplatform"
|
||||
PKG_VERSION="1.1"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/NVIDIA/${PKG_NAME}"
|
||||
PKG_URL=${PKG_SITE}/archive/refs/tags/${PKG_VERSION}.tar.gz
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="Wayland EGL External Platform library."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p ${SYSROOT_PREFIX}/usr/{include,lib/pkgconfig}
|
||||
cp -rf ${PKG_BUILD}/interface/* ${SYSROOT_PREFIX}/usr/include
|
||||
cp -rf ${PKG_BUILD}/eglexternalplatform.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig
|
||||
}
|
|
@ -51,7 +51,7 @@ if [ "${DISPLAYSERVER}" = "x11" ]; then
|
|||
export X11_INCLUDES=
|
||||
PKG_MESON_OPTS_TARGET+=" -Dplatforms=x11 -Ddri3=enabled -Dglx=dri -Dglvnd=true"
|
||||
elif [ "${DISPLAYSERVER}" = "wl" ]; then
|
||||
PKG_DEPENDS_TARGET+=" wayland wayland-protocols libglvnd glfw"
|
||||
PKG_DEPENDS_TARGET+=" wayland wayland-protocols libglvnd glfw egl-wayland"
|
||||
PKG_MESON_OPTS_TARGET+=" -Dplatforms=wayland,x11 -Ddri3=enabled -Dglx=dri -Dglvnd=true"
|
||||
PKG_DEPENDS_TARGET+=" xorgproto libXext libXdamage libXfixes libXxf86vm libxcb libX11 libxshmfence libXrandr libglvnd"
|
||||
export X11_INCLUDES=
|
||||
|
|
|
@ -56,6 +56,46 @@
|
|||
</core>
|
||||
</cores>
|
||||
</emulator>
|
||||
<emulator name="kronos">
|
||||
<cores>
|
||||
<core name="kronos-sa">
|
||||
<features>
|
||||
<feature name="video driver">
|
||||
<choice name="opengl" value="opengl"/>
|
||||
<choice name="software" value="software"/>
|
||||
</feature>
|
||||
<feature name="gpu rgb">
|
||||
<choice name="yes" value="1"/>
|
||||
<choice name="no" value="0"/>
|
||||
</feature>
|
||||
<feature name="tessellation">
|
||||
<choice name="gpu" value="gpu"/>
|
||||
<choice name="cpu" value="cpu"/>
|
||||
</feature>
|
||||
<feature name="audio driver">
|
||||
<choice name="openal" value="openal"/>
|
||||
<choice name="sdl" value="sdl"/>
|
||||
</feature>
|
||||
<feature name="show fps">
|
||||
<choice name="yes" value="1"/>
|
||||
<choice name="no" value="0"/>
|
||||
</feature>
|
||||
<feature name="use vsync">
|
||||
<choice name="yes" value="1"/>
|
||||
<choice name="no" value="0"/>
|
||||
</feature>
|
||||
<feature name="use hlebios">
|
||||
<choice name="yes" value="1"/>
|
||||
<choice name="no" value="0"/>
|
||||
</feature>
|
||||
<feature name="use autoskip">
|
||||
<choice name="yes" value="1"/>
|
||||
<choice name="no" value="0"/>
|
||||
</feature>
|
||||
</features>
|
||||
</core>
|
||||
</cores>
|
||||
</emulator>
|
||||
<emulator name="ppsspp">
|
||||
<cores>
|
||||
<core name="ppsspp-sa">
|
||||
|
|
Loading…
Reference in a new issue