summaryrefslogtreecommitdiffstats
path: root/system/gcn64tools
diff options
context:
space:
mode:
Diffstat (limited to 'system/gcn64tools')
-rw-r--r--system/gcn64tools/README61
-rw-r--r--system/gcn64tools/doinst.sh13
-rw-r--r--system/gcn64tools/gcn64tools.SlackBuild133
-rw-r--r--system/gcn64tools/gcn64tools.info10
-rw-r--r--system/gcn64tools/slack-desc19
5 files changed, 236 insertions, 0 deletions
diff --git a/system/gcn64tools/README b/system/gcn64tools/README
new file mode 100644
index 0000000000..266d2af95c
--- /dev/null
+++ b/system/gcn64tools/README
@@ -0,0 +1,61 @@
+The third generation of Raphnet USB adapters has upgradable firmware
+and offers advanced functionalities such as a configurable polling
+frequency and N64 mempak access.
+
+Since this is outside the scope of what a typical USB game controller
+does, operating systems do not support those new functions. Development
+of additional utilities was therefore necessary.
+
+Those tools (both graphical and command-line based) are explained and
+distributed on this page.
+
+Features:
+ * Adapter version display
+ * Adapter firmware update
+ * Displays the type of controller connected
+ * Vibration test (N64 Rumble Pak and Gamecube vibration)
+ * Read/Write N64 Controller Pak ("memory paks"), memory pak editor
+ * N64 Transfer Pak support:
+ * Read ROM from ROM-Only, MBC1, MBC2, MBC3, MBC5 and POCKET
+ CAMERA gameboy cartridges.
+ * Read/Write save RAM for MBC1, MBC2, MBC3, MBC5 and POCKET
+ CAMERA gameboy cartridges.
+ * Gamecube to N64 adapter management (firmware update, version
+ display)
+
+The management tool can perform a vibration/rumble test, can update an
+adapter's firmware and perform read/write operations on N64 mempaks.
+The built-in mempak editor supports common .N64 and .MPK mempak image
+file formats. Downloading cheats from gamefaqs and using them on the
+real N64 system is therefore possible! The editor also supports
+importing and exporting individual saves (notes) in separate files.
+
+The adapter update function asks you to select the firmware .hex file
+and does a few checks to prevent mistakes (ex: Installing an
+incompatible firmware). Once the file is selected, clicking "Start
+update" is all there is to do. If everything goes well (please, do not
+disconnect anything!) after a few moments the Update successful window
+should confirm the update.
+
+The command-line tools are very useful if you appreciate simplicity
+and efficiency. They are available in the tools/ subdirectory of the
+source code.
+
+The mempak tool makes it possible to convert mempak image files (.MPK
+to/from .N64), display and manipulate the content (add/remove/export/
+import notes), etc. Note that these tools operate on files and never
+access a physical mempak. To read/write a real mempak, use gcn64ctl or
+the graphical tool.
+
+If the tool does not detect your adapter despite it being properly
+connected, the most likely cause is that your user does not have the
+required permissions to access it.
+
+Running the tool as root would work, but it is a very bad practise.
+Not recommended. Configuring udev to give your user the appropriate
+permissions is much cleaner. Rules files are provided and installed
+as part of the build script. The plugdev group is used upstream, so
+make sure the user you want to grant access to is part of this group.
+
+Firmware files are included for all supported devices, they are
+located at: /usr/share/gcn64tools/firmwares
diff --git a/system/gcn64tools/doinst.sh b/system/gcn64tools/doinst.sh
new file mode 100644
index 0000000000..9e99c5cd7f
--- /dev/null
+++ b/system/gcn64tools/doinst.sh
@@ -0,0 +1,13 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
+if [ -x /sbin/udevadm ]; then
+ /sbin/udevadm control --reload
+fi
diff --git a/system/gcn64tools/gcn64tools.SlackBuild b/system/gcn64tools/gcn64tools.SlackBuild
new file mode 100644
index 0000000000..c845aee49c
--- /dev/null
+++ b/system/gcn64tools/gcn64tools.SlackBuild
@@ -0,0 +1,133 @@
+#!/bin/bash
+
+# Slackware build script for gcn64tools
+
+# Copyright 2023 Steven Voges <Oregon, USA>
+# 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=gcn64tools
+SRCNAM=raphnet-tech_adapter_manager
+VERSION=${VERSION:-2.1.28}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+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"
+elif [ "$ARCH" = "aarch64" ]; 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 $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$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 {} \;
+
+cd src
+make PLATFORM_CFLAGS="$SLKCFLAGS"
+mkdir -p $PKG/usr/bin
+make install PREFIX=$PKG/usr
+for i in 0 1 2 3 ; do
+ convert icon.ico[${i}] $i.png
+done
+install -vDm0644 0.png $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
+install -vDm0644 1.png $PKG/usr/share/icons/hicolor/31x32/apps/$PRGNAM.png
+install -vDm0644 2.png $PKG/usr/share/icons/hicolor/24x24/apps/$PRGNAM.png
+install -vDm0644 3.png $PKG/usr/share/icons/hicolor/16x16/apps/$PRGNAM.png
+cd ../firmwares
+for i in * ; do
+ cd $i
+ FILES=(*.hex)
+ NAME=${FILES[0]%-*}
+ install -vDm0644 * -t $PKG/usr/share/$PRGNAM/firmwares/$NAME
+ cd ..
+done
+cd ..
+
+cat <<EOF > $PRGNAM.desktop
+[Desktop Entry]
+Type=Application
+Name=Raphnet-Tech Adapter Manager
+Comment=Management GUI for Raphnet adapters
+Exec=gcn64ctl_gui
+Icon=$PRGNAM
+Categories=Utility;
+EOF
+install -vDm0644 $PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
+
+mkdir -p $PKG/etc/udev/rules.d
+install -vDm0644 scripts/99-atmel-dfu.rules.olddebian $PKG/etc/udev/rules.d/99-atmel-dfu.rules
+install -vDm0644 scripts/99-raphnet.rules.olddebian $PKG/etc/udev/rules.d/99-raphnet.rules
+
+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 \
+ LICENSE README.md changelog.txt \
+ $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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/gcn64tools/gcn64tools.info b/system/gcn64tools/gcn64tools.info
new file mode 100644
index 0000000000..eacf0fff9d
--- /dev/null
+++ b/system/gcn64tools/gcn64tools.info
@@ -0,0 +1,10 @@
+PRGNAM="gcn64tools"
+VERSION="2.1.28"
+HOMEPAGE="https://www.raphnet.net/programmation/gcn64tools/index_en.php"
+DOWNLOAD="https://www.raphnet.net/programmation/gcn64tools/raphnet-tech_adapter_manager-2.1.28.tar.gz"
+MD5SUM="e2ecba646448b0b22ca600a8fa9d8eca"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="hidapi dfu-programmer"
+MAINTAINER="Steven Voges"
+EMAIL="svoges.sbo@gmail.com"
diff --git a/system/gcn64tools/slack-desc b/system/gcn64tools/slack-desc
new file mode 100644
index 0000000000..9e1c5e8e75
--- /dev/null
+++ b/system/gcn64tools/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------------------------------------------------------|
+gcn64tools: gcn64tools (USB adapter manager)
+gcn64tools:
+gcn64tools: Raphnet USB adapter management tools.
+gcn64tools:
+gcn64tools: Homepage: https://www.raphnet.net/programmation/gcn64tools/
+gcn64tools: index_en.php
+gcn64tools:
+gcn64tools:
+gcn64tools:
+gcn64tools:
+gcn64tools: