Merge pull request #1070 from brooksytech/dev

Add Xemu - Xbox Emulator
This commit is contained in:
fewtarius 2023-02-19 15:02:08 -05:00 committed by GitHub
commit d8735b0939
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 166 additions and 1 deletions

View file

@ -0,0 +1,16 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
PKG_NAME="libdatrie"
PKG_VERSION="0.2.13"
PKG_LICENSE="LGPLv2"
PKG_SITE="https://github.com/tlwg/libdatrie"
PKG_URL="${PKG_SITE}/releases/download/v${PKG_VERSION}/libdatrie-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain libtool"
PKG_BUILD_FLAGS="+pic"
PKG_TOOLCHAIN="configure"
pre_configure_target() {
cd ${PKG_BUILD}
./configure
}

View file

@ -0,0 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
PKG_NAME="libthai"
PKG_VERSION="0.1.29"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/tlwg/libthai"
PKG_URL="${PKG_SITE}/releases/download/v${PKG_VERSION}/libthai-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain libtool libdatrie"
PKG_BUILD_FLAGS="+pic"
PKG_TOOLCHAIN="configure"
PKG_CONFIGURE_OPTS_TARGET=" --disable-dict --disable-doxygen-doc"
pre_configure_target() {
cd ${PKG_BUILD}
./configure --disable-dict --disable-doxygen-doc
}

View file

@ -0,0 +1,28 @@
[general]
show_welcome = false
[display.quality]
surface_scale = 1
[display.window]
fullscreen_on_startup = true
[general.misc]
skip_boot_anim = true
[input.bindings]
port1 = '03000000de280000ff11000001000000'
[display.ui]
show_menubar = false
scale = 2
fit = 'stretch'
[sys]
mem_limit = '128'
[sys.files]
bootrom_path = '/storage/roms/bios/xemu/bios/mcpx_1.0.bin'
flashrom_path = '/storage/roms/bios/xemu/bios/Complex_4627v1.03.bin'
eeprom_path = '/storage/roms/bios/xemu/eeprom/eeprom.bin'
hdd_path = '/storage/roms/bios/xemu/hdd/xbox_hdd.qcow2'

View file

@ -0,0 +1,28 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech)
PKG_NAME="xemu"
PKG_VERSION="v0.7.84"
PKG_ARCH="x86_64"
PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/xemu-project/xemu"
PKG_URL="${PKG_SITE}/releases/download/${PKG_VERSION}/xemu-${PKG_VERSION}-x86_64.AppImage"
PKG_DEPENDS_TARGET="toolchain libthai"
PKG_LONGDESC="Xbox Emulator appimage"
PKG_TOOLCHAIN="manual"
PKG_HDD_IMAGE="https://github.com/xqemu/xqemu-hdd-image/releases/download/v1.0/xbox_hdd.qcow2.zip"
makeinstall_target() {
# Redefine strip or the AppImage will be stripped rendering it unusable.
export STRIP=true
mkdir -p ${INSTALL}/usr/bin
cp ${PKG_BUILD}/${PKG_NAME}-${PKG_VERSION}.AppImage ${INSTALL}/usr/bin/${PKG_NAME}
cp -rf ${PKG_DIR}/scripts/start_xemu.sh ${INSTALL}/usr/bin
sed -e "s/@APPIMAGE@/${PKG_NAME}/g" -i ${INSTALL}/usr/bin/start_xemu.sh
chmod 755 ${INSTALL}/usr/bin/*
mkdir -p ${INSTALL}/usr/config
cp -rf ${PKG_DIR}/config/xemu ${INSTALL}/usr/config
#Download HDD IMAGE
curl -Lo ${INSTALL}/usr/config/xemu/hdd.zip ${PKG_HDD_IMAGE}
}

View file

@ -0,0 +1,40 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
. /etc/profile
#Check if xemu exists in .config
if [ ! -d "/storage/.config/xemu" ]; then
mkdir -p "/storage/.config/xemu"
cp -r "/usr/config/xemu" "/storage/.config/"
fi
#Check if xemu.toml exists in .config
if [ ! -f "/storage/.config/xemu/xemu.toml" ]; then
cp -r "/usr/config/xemu/xemu.toml" "/storage/.config/xemu/xemu.toml"
fi
#Make xemu bios folder
if [ ! -d "/storage/roms/bios/xemu/bios" ]; then
mkdir -p "/storage/roms/bios/xemu/bios"
fi
#Make xemu eeprom folder
if [ ! -d "/storage/roms/bios/xemu/eeprom" ]; then
mkdir -p "/storage/roms/bios/xemu/eeprom"
fi
#Make xemu hdd folder
if [ ! -d "/storage/roms/bios/xemu/hdd" ]; then
mkdir -p "/storage/roms/bios/xemu/hdd"
fi
#Check if HDD image exists
if [ ! -f "/storage/roms/bios/xemu/hdd/xbox_hdd.qcow2" ]; then
unzip -o /usr/config/xemu/hdd.zip -d /storage/roms/bios/xemu/hdd/
fi
CONFIG=/storage/.config/xemu/xemu.toml
@APPIMAGE@ -full-screen -config_path $CONFIG -dvd_path "${1}"

View file

@ -330,6 +330,12 @@ then
RUNTHIS='${TBASH} /usr/bin/start_yuzu.sh "${ROMNAME}"'
fi
;;
"xbox")
jslisten set "-9 xemu"
if [ "$EMU" = "xemu" ]; then
RUNTHIS='${TBASH} /usr/bin/start_xemu.sh "${ROMNAME}"'
fi
;;
"3ds")
jslisten set "-9 citra"
if [ "$EMU" = "citrasa" ]; then

View file

@ -256,6 +256,13 @@
</feature>
</features>
</emulator>
<emulator name="xemu">
<features>
<feature name="internal resolution">
<choice name="1x" value="1"/>
</feature>
</features>
</emulator>
<emulator name="retroarch" features="ratio, smooth, shaders, pixel_perfect, latency_reduction, game_translation">
<cores>
<core name="2048" features="netplay, rewind, autosave" />

View file

@ -1918,6 +1918,25 @@
</emulator>
</emulators>
</system>
<system>
<name>xbox</name>
<fullname>Xbox</fullname>
<manufacturer>Microsoft</manufacturer>
<release>2001</release>
<hardware>console</hardware>
<path>/storage/roms/xbox</path>
<extension>.iso .ISO</extension>
<command>/usr/bin/runemu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers="%CONTROLLERSCONFIG%"</command>
<platform>xbox</platform>
<theme>xbox</theme>
<emulators>
<emulator name="xemu">
<cores>
<core default="true">xemu</core>
</cores>
</emulator>
</emulators>
</system>
<system>
<name>zxspectrum</name>
<fullname>ZX Spectrum</fullname>

View file

@ -30,7 +30,7 @@ LIBRETRO_CORES="2048 81 a5200 atari800 beetle-gba beetle-lynx beetle-ngp beetle-
case "${DEVICE}" in
handheld)
PKG_DEPENDS_TARGET+=" dolphin dolphinsa cemu citra citrasa desmume lrps2 mame melondssa minivmac minivmacsa \
pcsx2sa play primehack rpcs3sa yuzusa"
pcsx2sa play primehack rpcs3sa xemu yuzusa"
;;
RK3588)
PKG_DEPENDS_TARGET+=" dolphin dolphinsa aethersx2 mame"

View file

@ -109,6 +109,7 @@ d /storage/roms/wonderswan 0777 root root - -
d /storage/roms/wonderswancolor 0777 root root - -
d /storage/roms/x1 0777 root root - -
d /storage/roms/x68000 0777 root root - -
d /storage/roms/xbox 0777 root root - -
d /storage/roms/zx81 0777 root root - -
d /storage/roms/zxspectrum 0777 root root - -
d /storage/roms/ports 0777 root root - -