Xbox original emulation (PC script)
-
For the past few days i have been working on getting the original Xbox emulation working on Retropie and i have great success under x86/x64 PC under Linux Mint. Using the following old post below i took the script and have been hard working on it to get this fully working through trial and error.
https://retropie.org.uk/forum/topic/35711/running-xbox-original-games-on-retropie-pc-only
Here is the script
#!/usr/bin/env bash # This file is part of The RetroPie Project # # The RetroPie Project is the legal property of its developers, whose names are # too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source. # # See the LICENSE.md file at the top-level directory of this distribution and # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md rp_module_id="xemu" rp_module_desc="Xbox Emulator" rp_module_help="ROM Extensions: .iso .xiso \n\nCopy your Xbox games to $romdir/xbox" rp_module_licence="https://github.com/xemu-project/xemu/blob/master/LICENSE" rp_module_repo="git https://github.com/xemu-project/xemu.git" rp_module_section="exp" rp_module_flags="!all x86" function depends_xemu() { local depends=(build-essential libsdl2-dev libepoxy-dev libpixman-1-dev libgtk-3-dev libssl-dev libsamplerate0-dev libpcap-dev ninja-build python3-yaml libslirp-dev) getDepends "${depends[@]}" } function sources_xemu() { gitPullOrClone } function build_xemu() { ./build.sh || error "Build failed" if [[ ! -f "$md_build/dist/xemu" ]]; then error "xemu binary not found in dist/, build might have failed" fi md_ret_require="$md_build/dist/xemu" } function install_xemu() { md_ret_files=( 'dist/xemu' 'dist/LICENSE.txt' ) cat > "$md_inst/xemu-launch.sh" << '_EOF_' #!/bin/bash # Run Xemu and pass the game file as the dvd-rom /opt/retropie/emulators/xemu/xemu -dvd_path "$1" -full-screen _EOF_ chmod +x "$md_inst/xemu-launch.sh" } function configure_xemu() { mkRomDir "xbox" local launch_prefix isPlatform "kms" && launch_prefix="XINIT-WM:" # Create the Xbox BIOS directory if it doesn't exist if [[ ! -d "$biosdir/xbox" ]]; then mkdir -p "$biosdir/xbox" fi chown -R $user:$user "$biosdir/xbox" # Ensure emulator path exists mkdir -p "/opt/retropie/emulators/xemu" # Create symbolic link to BIOS if [[ ! -L "/opt/retropie/emulators/xemu/xbox" ]]; then ln -sf "$biosdir/xbox" "/opt/retropie/emulators/xemu/xbox" fi if [[ "$md_mode" == "install" ]]; then mkUserDir "$md_conf_root/xbox" mkUserDir "$md_conf_root/xbox/$md_id" moveConfigFile "$home/.$md_id" "$md_conf_root/xbox/$md_id" fi addEmulator 1 "$md_id" "xbox" "$launch_prefix$md_inst/xemu-launch.sh %ROM%" addSystem "xbox" "Xbox" ".iso .xiso" }
To test the emulator just pop into Retropie-Setup >> Scriptmodules >> emulators and copy and past the script into a file called xemu.sh and then open the retropie setup from shell and visit experimental packages and you will find it in the list to install.
This script is still being worked on, needs improving and to automate a few things better. Below there are a few requirements, things you will need to do before gaming, subject to change as and when the script is improved upon
1 - Once installed you will need to head back to the desktop and before you run Retropie the emulator will need configuring the first time so type the following in terminal to bring up the emulator.
/opt/retropie/emulators/xemu/xemu
Once in the configuration just point to your bios files, set up anything else you need then from the menu you can exit. If you jump straight into Retropie and try load a game first time you will need to configure but for some reason i couldn't figure a way out of the configuration screen so had to hard exit which loses configurations. This is why you need to configure bios etc before you start.
After this you can run games like any emulator on Retropie.
2 - I ran this in a vm and even though it installs after finishing i see the following in the terminal
Errors:
git ls-remote https://github.com/xemu-project/xemu.git ^{} failed with return code 1 - please check your internet connection
Not sure if it's because i did this in a vm, if there is an issue of some kind but maybe someone will report back and figure it out.
3 - I use 8bitdo controllers and the emulator just picked them straight up with no configuration needed which is great, not sure about other controllers though so please report back!
4 - When a game has booted if you press the start and hotkey (i chose select as the hot key) it shows a menu for you to navigate down to exit the emulator back to retropie
Would love for you to test it, report back any issues, if you have any recommendations to improve the script please do.
PLEASE NOTE!! THIS SCRIPT IS FOR X86 PC BUT YOUR MORE THAN WELCOME TO TEST ON A RASPBERRY PIE OR ANY OTHER DEVICE OR OS AND REPORT BACK.
The specs i use for my Virtual machine are
8 core
16 GB of ram
GTX 1660TIWill need some testing on bare metal and to work out the best minimum specs for comfortable play.
SEGA CHiHIRO
Xbox can play Sega Chihiro games on the OG console, according to information online you will need a 128mb bios to get any games at least loading (not primarily playable). ISO/XISO format is needed. When loading Xemu i tested with both 64mb & 128mb in settings and using both they gave me the same results with the photos below.
Here are a couple of screenshots for you to show you
SEGA CHiHIRO
-
@fadingrose said in Xbox original emulation (PC script):
rp_module_flags="dispmanx"
Flags should be
!all x86
so that it will only be installable on PC systems. -
@mitu Thanks will get that updated
-
@fadingrose if youll like i can add it to RetroPie-Extra. so that way its somewhere else and it makes it a little easier to install it in the correct location to be ran
-
@ExarKunIv That would be great and hopefully it will eventually become a part of Retropie as pc is more than capable of running the emulator fine just like PS2. Hopefully it gets plenty of testing to improve integration.
-
Dropped a few more screen shots and updated some information. just need a lot more testing by anyone who runs Retropie on a pc. Next few things i am looking to do.
1 - See if i can get the emulator to automatically look in the bios folder created on first run so it can just pick up the bios, hard drive image etc if it's already been added by the user before they run it so that will skip needing to configure the bios
2 - It uses OpenGL as default but you can select Vulcan if you have a newer graphics card for better performance so maybe a way it can check and use Vulcan instead if you have the graphics capable of it?
3 - Added some information about Sega Chihiro games running in Xemu to the guide above and screenshots
-
Currently working on the arguments to better integrate with retropie but the following link will be of help if anyone understands QEMU and has better knowledge.
-
Some news
There is a version for arm processors and i currently have a script created below for the raspberry pi OS to install it on a raspberry Pi 4 (other pi's not tested). It downloads all the necessary dependencies and compiles the emulator from github but towards the end it fails partially downloaded and compiled so the script is non working at the moment.
At the moment i am trying to get it running on the raspberry pi os on a Pi4 so i can test it and actually make sure it runs and can compile, test a game and so on before a Retropie script is created for it like the PC one.
Of course the Pi is certainly going to be a little slow when running games and will struggle but just like the Atari Jaguar, Dreamcast and other such emulators but eventually the newer pi's better power will fix this or improve like the Pi 5 so maybe this will be for developers and testers and maybe even a game or two will run fine if it ain't got much going on.
#!/bin/bash # Exit immediately on any error set -e echo "==> Updating system packages..." sudo apt update && sudo apt upgrade -y echo "==> Installing build dependencies..." sudo apt install -y \ build-essential \ cmake \ git \ libsdl2-dev \ libglib2.0-dev \ libvulkan-dev \ libepoxy-dev \ libpng-dev \ libzstd-dev \ libcurl4-openssl-dev \ libreadline-dev \ ninja-build \ python3 \ python3-pip \ pkg-config \ python3-mako \ libavcodec-dev \ libavformat-dev \ libswscale-dev \ libopusfile-dev \ libxcb1-dev \ libxcb-icccm4-dev \ libxcb-image0-dev \ libxcb-keysyms1-dev \ libxcb-randr0-dev \ libxcb-render-util0-dev \ libxcb-xinerama0-dev \ libxcb-xinput-dev \ libxcb-xfixes0-dev \ libxcb-shape0-dev \ libgtk-3-dev \ libpcap-dev \ meson echo "==> Installing required Python packages..." pip3 install --break-system-packages pyyaml echo "==> Cloning Xemu repository..." git clone --recurse-submodules https://github.com/xemu-project/xemu.git cd xemu echo "==> Starting build process..." ./build.sh echo echo "✅ Build complete! You can now run xemu with:" echo " ./build/xemu"
Currently trying to get it to compile but it throws up one errpr after another and everytime i fix the error it throws another, i feel i'm close though but i'll get there eventually and then can get to testing.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.