diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2015-02-06 02:02:03 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2015-02-06 02:02:03 +0000 |
commit | 4c219683629fb219b8e2d90e5584aecd1940a056 (patch) | |
tree | 6e50ace32737b873c51e699bc5e3a561c048b9d6 | |
parent | 8ef4f31d3255b033fff43b0e18089f7a2c23fee6 (diff) | |
download | pkgsrc-4c219683629fb219b8e2d90e5584aecd1940a056.tar.gz |
Import gpsp-rpi-20150205 as emulators/gpsp-rpi.
gameplaySP (gpSP for short) is a GBA emulator written completely from
scratch. It is still pretty young (only having started a 3 months prior
to the first release) and thus rather immature, but it does a decent
job of playing a number of games, and is being improved upon somewhat
regularly. It is currently somewhat minimalistic, in the sourcecode,
presentation, and features. Its number one focus is to deliver a GBA
gaming experience in the most playable way that PSP can manage, with
frills being secondary (although still a consideration, at least for
some of them).
This version of gpSP is optimized for the Raspberry Pi.
-rw-r--r-- | emulators/gpsp-rpi/DESCR | 11 | ||||
-rw-r--r-- | emulators/gpsp-rpi/Makefile | 38 | ||||
-rw-r--r-- | emulators/gpsp-rpi/PLIST | 2 | ||||
-rw-r--r-- | emulators/gpsp-rpi/distinfo | 8 | ||||
-rw-r--r-- | emulators/gpsp-rpi/patches/patch-arm_warm.c | 59 | ||||
-rw-r--r-- | emulators/gpsp-rpi/patches/patch-arm_warm.h | 13 | ||||
-rw-r--r-- | emulators/gpsp-rpi/patches/patch-main.c | 22 |
7 files changed, 153 insertions, 0 deletions
diff --git a/emulators/gpsp-rpi/DESCR b/emulators/gpsp-rpi/DESCR new file mode 100644 index 00000000000..88c47970aa7 --- /dev/null +++ b/emulators/gpsp-rpi/DESCR @@ -0,0 +1,11 @@ +gameplaySP (gpSP for short) is a GBA emulator written completely from +scratch. It is still pretty young (only having started a 3 months prior +to the first release) and thus rather immature, but it does a decent +job of playing a number of games, and is being improved upon somewhat +regularly. It is currently somewhat minimalistic, in the sourcecode, +presentation, and features. Its number one focus is to deliver a GBA +gaming experience in the most playable way that PSP can manage, with +frills being secondary (although still a consideration, at least for +some of them). + +This version of gpSP is optimized for the Raspberry Pi. diff --git a/emulators/gpsp-rpi/Makefile b/emulators/gpsp-rpi/Makefile new file mode 100644 index 00000000000..b5d7f6dfdba --- /dev/null +++ b/emulators/gpsp-rpi/Makefile @@ -0,0 +1,38 @@ +# $NetBSD: Makefile,v 1.1 2015/02/06 02:02:03 jmcneill Exp $ + +DISTNAME= gpsp-rpi-20150205 +CATEGORIES= emulators +MASTER_SITES= http://ftp.NetBSD.org/pub/NetBSD/misc/jmcneill/rpi/ +EXTRACT_SUFX= .zip + +MAINTAINER= port-arm@NetBSD.org +HOMEPAGE= https://github.com/DPRCZ/gpsp +COMMENT= Gameboy Advance emulator (Raspberry Pi version) +LICENSE= gnu-gpl-v2 + +ONLY_FOR_PLATFORM= NetBSD-*-*arm* + +WRKSRC= ${WRKDIR}/gpsp-master +USE_TOOLS+= gmake + +SUBST_CLASSES+= vc +SUBST_STAGE.vc= pre-configure +SUBST_MESSAGE.vc= Fixing path to VideoCore libraries. +SUBST_FILES.vc= raspberrypi/Makefile +SUBST_SED.vc+= -e 's;/opt/vc;${PREFIX};g' + +LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib +BUILDLINK_TRANSFORM+= rm:-ldl + +INSTALLATION_DIRS= bin + +do-build: + cd ${WRKSRC}/raspberrypi && gmake + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/raspberrypi/gpsp \ + ${DESTDIR}${PREFIX}/bin + +.include "../../devel/SDL/buildlink3.mk" +.include "../../misc/raspberrypi-userland/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/emulators/gpsp-rpi/PLIST b/emulators/gpsp-rpi/PLIST new file mode 100644 index 00000000000..a98de90b6cf --- /dev/null +++ b/emulators/gpsp-rpi/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1 2015/02/06 02:02:03 jmcneill Exp $ +bin/gpsp diff --git a/emulators/gpsp-rpi/distinfo b/emulators/gpsp-rpi/distinfo new file mode 100644 index 00000000000..ef0a7b885ca --- /dev/null +++ b/emulators/gpsp-rpi/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2015/02/06 02:02:03 jmcneill Exp $ + +SHA1 (gpsp-rpi-20150205.zip) = f7c40cdd9e450d168b0d7cf009977c5f2287012c +RMD160 (gpsp-rpi-20150205.zip) = 5a53e210f30a69f147d5c223a18fd51ea7d47a1e +Size (gpsp-rpi-20150205.zip) = 350074 bytes +SHA1 (patch-arm_warm.c) = b8c4eff30767fa78f54ad4114e00e8559349b10f +SHA1 (patch-arm_warm.h) = 94b534399319a690d0ead735837b283212d80793 +SHA1 (patch-main.c) = bc88bbec2dcdbbc38afd21a13067fbbe805c50c1 diff --git a/emulators/gpsp-rpi/patches/patch-arm_warm.c b/emulators/gpsp-rpi/patches/patch-arm_warm.c new file mode 100644 index 00000000000..b1497f13af0 --- /dev/null +++ b/emulators/gpsp-rpi/patches/patch-arm_warm.c @@ -0,0 +1,59 @@ +$NetBSD: patch-arm_warm.c,v 1.1 2015/02/06 02:02:03 jmcneill Exp $ + +--- arm/warm.c.orig 2015-01-06 20:57:45.000000000 +0000 ++++ arm/warm.c +@@ -42,15 +42,18 @@ + #define WARM_CODE + #include "warm.h" + ++#if defined(__linux__) + /* provided by glibc */ + extern long init_module(void *, unsigned long, const char *); + extern long delete_module(const char *, unsigned int); ++#endif + + static int warm_fd = -1; + static int kernel_version; + + static void sys_cacheflush(void *start, void *end) + { ++#if defined(__linux__) + #ifdef __ARM_EABI__ + /* EABI version */ + int num = __ARM_NR_cacheflush; +@@ -68,12 +71,16 @@ static void sys_cacheflush(void *start, + "swi %2" : : "r" (start), "r" (end), "i" __ARM_NR_cacheflush + : "r0", "r1", "r2", "r3"); + #endif ++#else ++ __clear_cache(start, end); ++#endif + } + + /* Those are here because system() occasionaly fails on Wiz + * with errno 12 for some unknown reason */ + static int manual_insmod_26(const char *fname, const char *opts) + { ++#if defined(__linux__) + unsigned long len, read_len; + int ret = -1; + void *buff; +@@ -104,11 +111,18 @@ fail1: + fail0: + fclose(f); + return ret; ++#else ++ return -1; ++#endif + } + + static int manual_rmmod(const char *name) + { ++#if defined(__linux__) + return delete_module(name, O_NONBLOCK|O_EXCL); ++#else ++ return 0; ++#endif + } + + int warm_init(void) diff --git a/emulators/gpsp-rpi/patches/patch-arm_warm.h b/emulators/gpsp-rpi/patches/patch-arm_warm.h new file mode 100644 index 00000000000..11a94f56e04 --- /dev/null +++ b/emulators/gpsp-rpi/patches/patch-arm_warm.h @@ -0,0 +1,13 @@ +$NetBSD: patch-arm_warm.h,v 1.1 2015/02/06 02:02:03 jmcneill Exp $ + +--- arm/warm.h.orig 2015-01-06 20:57:45.000000000 +0000 ++++ arm/warm.h +@@ -72,7 +72,7 @@ void warm_finish(void); + /* internal */ + #ifdef WARM_CODE + +-#include <linux/ioctl.h> ++#include <sys/ioctl.h> + + #define WARM_IOCTL_BASE 'A' + diff --git a/emulators/gpsp-rpi/patches/patch-main.c b/emulators/gpsp-rpi/patches/patch-main.c new file mode 100644 index 00000000000..341c99af507 --- /dev/null +++ b/emulators/gpsp-rpi/patches/patch-main.c @@ -0,0 +1,22 @@ +$NetBSD: patch-main.c,v 1.1 2015/02/06 02:02:03 jmcneill Exp $ + +--- main.c.orig 2015-01-06 20:57:45.000000000 +0000 ++++ main.c +@@ -257,7 +257,7 @@ int main(int argc, char *argv[]) + + init_video(); + +- sprintf(bios_filename, "%s" PATH_SEPARATOR "%s", main_path, "gba_bios.bin"); ++ sprintf(bios_filename, "%s/.gpsp/gba_bios.bin", getenv("HOME")); + ret = load_bios(bios_filename); + if (ret != 0) + ret = load_bios("gba_bios.bin"); +@@ -278,7 +278,7 @@ int main(int argc, char *argv[]) + #ifdef PND_BUILD + debug_screen_printl("in <SD card>/pandora/appdata/gpsp/ . "); + #else +- debug_screen_printl("in the same directory as gpSP. "); ++ debug_screen_printl("in $HOME/.gpsp/ . "); + #endif + debug_screen_printl(" "); + debug_screen_printl("Press any button to exit. "); |