aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/bsnes-libretro/README58
-rw-r--r--games/bsnes-libretro/bsnes-libretro.SlackBuild103
-rw-r--r--games/bsnes-libretro/bsnes-libretro.info10
-rw-r--r--games/bsnes-libretro/slack-desc19
4 files changed, 190 insertions, 0 deletions
diff --git a/games/bsnes-libretro/README b/games/bsnes-libretro/README
new file mode 100644
index 0000000000000..4604d7deaaf7d
--- /dev/null
+++ b/games/bsnes-libretro/README
@@ -0,0 +1,58 @@
+Libretro fork of bsnes. As close to upstream as possible.
+
+bsnes is a Super Nintendo emulator that began development on 2004-10-14. It
+focuses on accuracy and clean code above all else. It never uses speed or
+compatibilty hacks. As a result, the minimum system requirements are greater
+than with other emulators. bsnes comes in three different profiles (accuracy,
+balance and performance) which contain minor differences in the PPU (graphics)
+emulation.
+
+bsnes requires the following BIOS image files under the system directory for
+operation:
+
+* dsp1.data.rom (DSP1 DATA) (CRC: c8347cbd)
+* dsp1.program.rom (DSP1 PROGRAM) (CRC: db9a4c92)
+* dsp1b.data.rom (DSP1B DATA) (CRC: 37a252c6)
+* dsp1b.program.rom (DSP1B PROGRAM)) (CRC: 66a73998)
+* dsp2.data.rom (DSP2 DATA) (CRC: b3893c70)
+* dsp2.program.rom (DSP2 PROGRAM) (CRC: 0c1cf838)
+* dsp3.data.rom (DSP3 DATA) (CRC: 8b41a2bd)
+* dsp3.program.rom (DSP3 PROGRAM) (CRC: f29be51c)
+* dsp4.data.rom (DSP4 DATA) (CRC: efa8b9b2)
+* dsp4.program.rom (DSP4 PROGRAM) (CRC: 14b77ae3)
+* cx4.data.rom (Cx4 DATA) (CRC: b6e76a6a)
+* st010.data.rom (ST-0010 DATA) (CRC: 216081b2)
+* st010.program.rom (ST-0010 PROGRAM) (CRC: 691cbb4f)
+* st011.data.rom (ST-0011 DATA) (CRC: 803256a7)
+* st011.program.rom (ST-0011 PROGRAM) (CRC: a741e9fb)
+* st018.data.rom (ST-0018 DATA) (CRC: b5255459)
+* st018.program.rom (ST-0018 PROGRAM) (CRC: f73d5e10)
+* sgb.boot.rom (SGB BOOT PROGRAM) (CRC: ec8a83b9 [1])
+
+[1] This is the boot rom only, you need the correct cart image to load SGB
+games.
+
+=====
+
+Super Gameboy is supported via the subsystem API. In RetroArch the API is
+already implemented but only available via CLI. For SGB support you need both
+sgb.boot.rom and the SGB rom. To launch SGB games launch RetroArch like this:
+
+ retroarch -L {path to bsnes core} {path to snes rom} --subsystem sgb {path to gb rom}
+
+Tested snes roms [2]:
+* Super Game Boy (Japan, USA) (Rev 1).sfc (CRC: 27a03c98)[3]
+* Super Game Boy (World) (Rev 2).sfc (CRC: 8a4a174f)
+* Super Game Boy 2 (Japan).sfc (CRC: cb176e45)
+
+[2] Savestates are broken in this implementation.
+[3] Some games don't work with this rom, try version SGB v2 for best results.
+
+=====
+
+By default, this SlackBuild will build the bsnes accuracy core.
+To build the balanced or performance cores, choose any desired cores:
+ CORE="accuracy balanced performance" ./bsnes-libretro.SlackBuild
+
+Or to build all three cores, "all" can be used:
+ CORE="all" ./bsnes-libretro.SlackBuild
diff --git a/games/bsnes-libretro/bsnes-libretro.SlackBuild b/games/bsnes-libretro/bsnes-libretro.SlackBuild
new file mode 100644
index 0000000000000..521152f015835
--- /dev/null
+++ b/games/bsnes-libretro/bsnes-libretro.SlackBuild
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+# Slackware build script for bsnes-libretro
+
+# Copyright 2016 Hunter Sezen
+# 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=bsnes-libretro
+LIBNAM=$(echo $PRGNAM | cut -f1 -d"-")
+VERSION=${VERSION:-2016.07.17_8a5ce25}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+# requires patching the Makefile to properly use
+# the default CFLAGS and CXXFLAGS are probably fine
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+if [ "$ARCH" = "arm" ]; then
+ CORE="${CORE:-performance}"
+else
+ CORE="${CORE:-accuracy}"
+fi
+if [ "$CORE" = "all" ]; then
+ CORE="accuracy balanced performance"
+fi
+
+for PROFILE in $CORE; do
+ CORENAM=${LIBNAM}_${PROFILE}_libretro
+ make profile=$PROFILE
+ install -Dm0644 out/$CORENAM.so $PKG/usr/lib${LIBDIRSUFFIX}/libretro/$CORENAM.so
+ install -Dm0644 $CORENAM.info $PKG/usr/lib${LIBDIRSUFFIX}/libretro/info/$CORENAM.info
+ make clean
+done
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/games/bsnes-libretro/bsnes-libretro.info b/games/bsnes-libretro/bsnes-libretro.info
new file mode 100644
index 0000000000000..36b750d79f7cc
--- /dev/null
+++ b/games/bsnes-libretro/bsnes-libretro.info
@@ -0,0 +1,10 @@
+PRGNAM="bsnes-libretro"
+VERSION="2016.07.17_8a5ce25"
+HOMEPAGE="http://www.libretro.com/"
+DOWNLOAD="http://ks392457.kimsufi.com/orbea/stuff/slackbuilds/src/libretro/bsnes-libretro-2016.07.17_8a5ce25.tar.xz"
+MD5SUM="4a5cdc0e3a1e858ddc7c1c790de8ad02"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="RetroArch"
+MAINTAINER="Hunter Sezen"
+EMAIL="ovariegata@yahoo.com"
diff --git a/games/bsnes-libretro/slack-desc b/games/bsnes-libretro/slack-desc
new file mode 100644
index 0000000000000..9c90d9acccf4d
--- /dev/null
+++ b/games/bsnes-libretro/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+bsnes-libretro: bsnes-libretro (libretro fork of bsnes)
+bsnes-libretro:
+bsnes-libretro: bsnes is a Super Nintendo video game system emulator that can be
+bsnes-libretro: used as a libretro core.
+bsnes-libretro:
+bsnes-libretro: Homepage: http://www.libretro.com/
+bsnes-libretro:
+bsnes-libretro:
+bsnes-libretro:
+bsnes-libretro:
+bsnes-libretro: