LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-03-2016, 03:00 PM   #1
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
RetroArch - Libretro (videogame system emulator API)


I have recently been working on libretro core slackbuilds for use with RetroArch in Slackware to play old console emulators so I thought I'd share my slackbuilds here in case others are interested.

Here is the frontend, RetroArch.
https://notabug.org/orbea/Slackbuild...ames/RetroArch

To navigate RetroArch, use the arrow keys, 'z' and 'x' to move down or up in the menu, 'Esc' to close it and 'F1' to get the RetroArch menu while playing a game.

To play any games compile one of the following cores, satisfy any bios requirements if needed in the RetroArch system directory (Its set in RetroArch) and then use:
Code:
retroarch -L /usr/lib${LIBDIRSUFFIX}/libretro/corename_libretro.so /path/to/game
Currently available cores:
beetle-psx-libretro - https://notabug.org/orbea/SlackBuild...e-psx-libretro
bsnes-mercury - https://notabug.org/orbea/SlackBuild.../bsnes-mercury
Genesis-Plus-GX - https://notabug.org/orbea/SlackBuild...enesis-Plus-GX
libretro-desmume - https://notabug.org/orbea/SlackBuild...bretro-desmume
libretro-fceumm - https://notabug.org/orbea/SlackBuild...ibretro-fceumm
libretro-mgba - https://notabug.org/orbea/SlackBuild.../libretro-mgba
libretro-reicast - https://notabug.org/orbea/SlackBuild...bretro-reicast
libretro-yabause - https://notabug.org/orbea/SlackBuild...bretro-yabause
mupen64plus-libretro - https://notabug.org/orbea/SlackBuild...4plus-libretro
pcsx-rearmed - https://notabug.org/orbea/SlackBuild...r/pcsx-rearmed
QuickNES-Core - https://notabug.org/orbea/SlackBuild.../QuickNES-Core

If anyone has issues, please let me know and perhaps make an issue at the relevant github repo if its a problem with RetroArch or one of the libretro cores itself.
More information can be found at their site, wiki and github.

http://www.libretro.com/
http://wiki.libretro.com
https://github.com/libretro
 
Old 02-03-2016, 03:03 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
I have competition!

ANNOUNCE: RetroArch for Slackware

I see that, like me, you decided not to even try the built-on-Ubuntu cores that you can download using the program itself?

Also, why did you choose QuickNES over Nestopia?

Last edited by dugan; 02-03-2016 at 03:08 PM.
 
Old 02-03-2016, 03:11 PM   #3
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Original Poster
Rep: Reputation: Disabled
Cool, I didn't realize anyone else got there first, I think diversity of choice in slackbuilds is great! We also seem to be handling it differently. I didn't know about the built on ubuntu cores yet, they don't seem something I really want to cover anyways.
 
Old 08-10-2016, 11:39 AM   #4
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Original Poster
Rep: Reputation: Disabled
Just a heads up that RetroArch + 49 libretro cores are now available at slackbuilds.org.

https://slackbuilds.org/result/?search=libretro
 
2 members found this post helpful.
Old 03-12-2017, 05:45 PM   #5
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Heads up (to Orbea) that I just submitted a Vulkan SDK SlackBuild to SBo. Building RetroArch against it was specifically what I did to test it.

To get RetroArch to pick it up, my current procedure is check out the git repository, run fetch-submodules.sh from the source directory (it includes "git submodule" operations), then build it.

Last edited by dugan; 03-12-2017 at 05:47 PM.
 
1 members found this post helpful.
Old 03-12-2017, 06:00 PM   #6
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Original Poster
Rep: Reputation: Disabled
Thanks! I'm still not in the position to test it out unfortunately. Do you know if that would be the only dependency required for RetroArch with wulkan support? What gpu and driver have you tested it with? Does it work with mesa (intel or amd) in Slackware-14.2? Did you just test the RetroArch menu or did you try parallel-psx and parallel-n64 too? Sorry for all the questions, but I'd like to document it properly for SBo, but since I can't test it that makes it hard.

You may also want to see how it works with dolphin-emu.
 
Old 03-12-2017, 08:20 PM   #7
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
Quote:
Originally Posted by dugan View Post
To get RetroArch to pick it up, my current procedure is check out the git repository, run fetch-submodules.sh from the source directory (it includes "git submodule" operations), then build it.
Unfortunately we do not allow running git XXX inside SlackBuild script, so the whole operation must be done when creating the sources and host it somewhere or wait until RetroArch support vulkan natively.
 
Old 03-12-2017, 08:47 PM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Submodules are a pain, but it's still doable with SlackBuilds... it just takes more effort.

I have two examples of SlackBuilds that I had to do some finessing for submodules. glPortal is a relatively simple one with 4 submodules. But then there's redeclipse with 36 submodules. For that one, I created a separate submodules-list file that is referenced in the SlackBuild (should hopefully make it easier to update if they add more submodules). glPortal's submodules required renaming from the downloaded bits, so they had to be specified manually, but luckily redeclipse's were all the same name, so I was able to easily do a for loop to unpack them and move them to the right directory.
 
Old 03-12-2017, 09:05 PM   #9
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by orbea View Post
Thanks! I'm still not in the position to test it out unfortunately. Do you know if that would be the only dependency required for RetroArch with wulkan support? What gpu and driver have you tested it with? Does it work with mesa (intel or amd) in Slackware-14.2? Did you just test the RetroArch menu or did you try parallel-psx and parallel-n64 too? Sorry for all the questions, but I'd like to document it properly for SBo, but since I can't test it that makes it hard.
What did I test with so far?

NVidia GTK-970 with the 379.39 drivers. I'd tried the bsnes core and slang shaders with the Vulkan video driver on a previous run.

Just those.
 
Old 03-13-2017, 10:58 AM   #10
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Original Poster
Rep: Reputation: Disabled
You should try one of the actual vulkan cores too.
 
Old 03-13-2017, 11:08 AM   #11
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by willysr View Post
Unfortunately we do not allow running git XXX inside SlackBuild script, so the whole operation must be done when creating the sources and host it somewhere or wait until RetroArch support vulkan natively.
RetroArch itself no longer has any submodules, additionally the source for RetroArch at SBo should be entirely complete. The Vulkan support should also be out of the box and automatically detected with their configure script, the problem is that as a nouveau user I can not test it yet. If someone with driver and gpu support could please help out so it can be properly documented with my script I'd appreciate it (Patches welcome). Otherwise it will have to wait till I can afford more hardware...

Here is the very simple script I used to make the RetroArch source tarball since upstream hasn't stepped up to do it.

Code:
#!/bin/sh

# RetroArch packaging script

# Copyright 2016-2017 orbea
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PRGNAM=RetroArch
SRCNAM="$(printf %s $PRGNAM | tr '[:upper:]' '[:lower:]')"
REPO=libretro-super
BRANCH=master
TMP=${TMP:-/tmp}

set -eu

trap "rm -rf $TMP/$REPO" EXIT

mkdir -p "$TMP"
cd "$TMP"
rm -rf "$REPO"
git clone -b "$BRANCH" https://github.com/libretro/$REPO
cd "$REPO"
./libretro-fetch.sh "$SRCNAM" 
cd "$SRCNAM"
COMMIT="$(git describe --abbrev=0 --tags)"
git checkout "$COMMIT"
VERSION="$(printf %s $COMMIT | tr -d v)"
find . -name ".git*" | xargs rm -rf

cd "$TMP/$REPO"
mv retroarch "$PRGNAM-$VERSION"
tar cf - "$PRGNAM-$VERSION" | xz -c9 - > "$TMP/$PRGNAM-$VERSION.tar.xz"

Last edited by orbea; 03-13-2017 at 11:20 AM.
 
Old 03-13-2017, 03:06 PM   #12
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Hmm.... what used to need to be fetched as a submodule (glslang) is part of the source tarball now.

I'll test without fetch_submodules.sh tonight.
 
Old 03-13-2017, 05:56 PM   #13
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Original Poster
Rep: Reputation: Disabled
My script to make tarballs out of the libretro core repos uses this to decide if there are submodules or not as not all of the cores have them.

Code:
if git config --file .gitmodules --name-only --get-regexp path 2>&1 >/dev/null; then
  git submodule update --init
fi
https://notabug.org/orbea/SlackBuild...ripts/retropkg
 
Old 03-13-2017, 09:50 PM   #14
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
I just checked. If you just untar the tarball and ./configure, it picks up the Vulkan dependency. No other steps are needed.

You can just list "vulkansdk" as an optional dependency when the SlackBuild is available.
 
Old 03-14-2017, 08:41 AM   #15
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Original Poster
Rep: Reputation: Disabled
Thanks, I will do that when its on SBo.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ANNOUNCE: RetroArch for Slackware dugan Slackware 15 03-12-2017 04:45 PM
RetroArch 1.0.0.3 released dugan Linux - News 0 10-30-2014 05:21 PM
Retroarch ad infinitum BenCollver Linux - Games 0 08-02-2014 05:45 AM
[SOLVED] Difference between Library API and System Call API ram619 Linux - Kernel 8 12-27-2012 02:40 AM
If you could make your own videogame....... kidashy General 0 11-07-2003 01:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration