From 416f1e2c1b0ad5cdae54c0ada35e128ad2518efd Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 12 May 2010 23:29:31 +0200 Subject: games/sms_sdl: Added to 12.2 repository --- games/sms_sdl/README | 10 ++ games/sms_sdl/cflags_and_libz.diff | 25 +++++ games/sms_sdl/doinst.sh | 7 ++ games/sms_sdl/japan_and_fm.diff | 29 ++++++ games/sms_sdl/slack-desc | 19 ++++ games/sms_sdl/sms_sdl.1 | 138 +++++++++++++++++++++++++ games/sms_sdl/sms_sdl.SlackBuild | 101 ++++++++++++++++++ games/sms_sdl/sms_sdl.desktop | 11 ++ games/sms_sdl/sms_sdl.info | 8 ++ games/sms_sdl/sms_sdl.png | Bin 0 -> 3752 bytes games/sms_sdl/sms_sdl.xml | 60 +++++++++++ games/sms_sdl/x-sega-game-gear-rom.desktop | 8 ++ games/sms_sdl/x-sega-master-system-rom.desktop | 8 ++ 13 files changed, 424 insertions(+) create mode 100644 games/sms_sdl/README create mode 100644 games/sms_sdl/cflags_and_libz.diff create mode 100644 games/sms_sdl/doinst.sh create mode 100644 games/sms_sdl/japan_and_fm.diff create mode 100644 games/sms_sdl/slack-desc create mode 100644 games/sms_sdl/sms_sdl.1 create mode 100644 games/sms_sdl/sms_sdl.SlackBuild create mode 100644 games/sms_sdl/sms_sdl.desktop create mode 100644 games/sms_sdl/sms_sdl.info create mode 100644 games/sms_sdl/sms_sdl.png create mode 100644 games/sms_sdl/sms_sdl.xml create mode 100644 games/sms_sdl/x-sega-game-gear-rom.desktop create mode 100644 games/sms_sdl/x-sega-master-system-rom.desktop (limited to 'games') diff --git a/games/sms_sdl/README b/games/sms_sdl/README new file mode 100644 index 0000000000..72faf7fed9 --- /dev/null +++ b/games/sms_sdl/README @@ -0,0 +1,10 @@ +SMS Plus is Sega Master System and Game Gear emulator. Originally, +it was written to run under DOS. Since Charles Mac Donald released +his emulator under the GPL terms, this emulator has been ported to +different platforms. + +This package includes desktop integration for KDE3. IF you do not want +this, specify MIME_TYPES=no on the command-line + +The sms_sdl.png icon is by finite, from +http://www.pixeljoint.com/pixelart/2312.htm diff --git a/games/sms_sdl/cflags_and_libz.diff b/games/sms_sdl/cflags_and_libz.diff new file mode 100644 index 0000000000..cf74397198 --- /dev/null +++ b/games/sms_sdl/cflags_and_libz.diff @@ -0,0 +1,25 @@ +diff -Naur sms_sdl-0.9.4a-r7.1/sdl/Makefile sms_sdl-0.9.4a-r7.1.patched/sdl/Makefile +--- sms_sdl-0.9.4a-r7.1/sdl/Makefile 2003-07-16 23:37:38.000000000 -0400 ++++ sms_sdl-0.9.4a-r7.1.patched/sdl/Makefile 2009-02-05 17:39:28.000000000 -0500 +@@ -12,7 +12,7 @@ + NAME = sms_sdl + + CC = gcc +-CFLAGS = `sdl-config --cflags` -O2 ++CFLAGS = `sdl-config --cflags` $(OPTFLAGS) + DEFINES = -DLSB_FIRST -DX86_ASM + INCLUDES = -I. -I.. -I../cpu -I../sound + LIBS = `sdl-config --libs` +@@ -22,9 +22,9 @@ + ../cpu/z80.o ../sound/emu2413.o ../sound/sn76496.o + + # (un)comment to enable ZIP support +-#DEFINES += -DUSE_ZLIB +-#LIBS += -Lz +-#OBJECTS += unzip.o ++DEFINES += -DUSE_ZLIB ++LIBS += -lz ++OBJECTS += unzip.o + + + all: $(NAME) diff --git a/games/sms_sdl/doinst.sh b/games/sms_sdl/doinst.sh new file mode 100644 index 0000000000..dd240ff2ae --- /dev/null +++ b/games/sms_sdl/doinst.sh @@ -0,0 +1,7 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime > /dev/null 2>&1 +fi diff --git a/games/sms_sdl/japan_and_fm.diff b/games/sms_sdl/japan_and_fm.diff new file mode 100644 index 0000000000..d33f405e68 --- /dev/null +++ b/games/sms_sdl/japan_and_fm.diff @@ -0,0 +1,29 @@ +--- sms_sdl-0.9.4a-r7.1/sdl/main.c 2003-07-21 12:40:56.000000000 -0300 ++++ sms_sdl-0.9.4a-r7.1.patched/sdl/main.c 2009-05-12 17:42:29.362768285 -0300 +@@ -45,21 +45,19 @@ + int i; + + /* default virtual console emulation settings */ +- sms.use_fm = 0; +- sms.country = TYPE_OVERSEAS; ++ cfg.fm = 0; ++ cfg.japan = 0; + + cfg.filter = -1; + strcpy(cfg.game_name, argv[1]); + + for(i = 2; i < argc; ++i) { + if(strcasecmp(argv[i], "--fm") == 0) +- sms.use_fm = 1; ++ cfg.fm = 1; + else if(strcasecmp(argv[i], "--japan") == 0) +- sms.country = TYPE_DOMESTIC; +- else if(strcasecmp(argv[i], "--usesram") == 0) { ++ cfg.japan = 1; ++ else if(strcasecmp(argv[i], "--usesram") == 0) + cfg.usesram = 1; +- sms.save = 1; +- } + else if(strcasecmp(argv[i], "--fskip") == 0) { + if(++i> \fR[\fI--options\fR] +.SH DESCRIPTION +SMS Plus/SDL v0.9.4aR7 +.br +(C) Charles Mac Donald in 1998, 1999, 2000 +.br +SDL Version by Gregory Montoir (cyx@frenchkiss.net) +.SH OPTIONS +.PP +\fINote:\fR Options must come \fIafter\fR the filename. +.TP +\fB\-\-fm\fR +Enable YM2413 sound. +.TP +\fB\-\-japan\fR +Set the machine type as DOMESTIC instead of OVERSEAS. +.TP +\fB\-\-usesram\fR +Load/save SRAM contents before starting/exiting. +.TP +\fB\-\-fskip\fR +Specify the number of frames to skip. +.TP +\fB\-\-fullspeed\fR +Do not limit to 60 frames per second. +.TP +\fB\-\-fullscreen\fR +Start in fullscreen mode. +.TP +\fB\-\-joystick\fR +Use joystick. +.TP +\fB\-\-nosound\fR +Disable sound. +.TP +\fB\-\-filter\fR +Render using a filter. Available modes: +.RS +.IP "2xsai" +.PD 0 +.IP "super2xsai" +.IP "supereagle" +.IP "advmame2x" +.IP "tv2x" +.IP "2x" +.IP "bilinear" +.IP "dotmatrix" +.RE +.PD 1 +.SH KEYBOARD +.TP +\fBF1\fR +Screenshot in BMP format +.TP +\fBF2\fR +Save state +.TP +\fBF3\fR +Load state +.TP +\fBF4/F5\fR +Dec/inc frame skip value +.TP +\fBF6/F7\fR +Dec/inc state slot +.TP +\fB1..8\fR +Switch rendering filter +.TP +\fBC\fR +Button 1 +.TP +\fBV\fR +Button 2 +.TP +\fBENTER\fR +Start (GG) / pause (SMS) +.TP +\fBARROWS\fR +Directional pad +.TP +\fBTAB\fR +Console hard reset +.PP +The key bindings may not be remapped. +.SH FILES +.PP +ROM image files may be in raw dump format, or may have a header (details +are system-specific). Also, ROM images may be zipped (not gzipped), in +which case the first file in the zip file's directory must be the +ROM image (any other files are ignored). +.PP +\fBsms_sdl\fR looks at the filename to determine the type of ROM image +in use. Any file whose name ends in \fI.gg\fR (case-insensitive match) +is considered to be a Game Gear ROM. Any other file is treated as a +Sega Master System ROM. In the case of a zipped image, this refers to the +file inside the zip file; the zip file itself doesn't have any special +naming requirements. +.PP +Screenshot filenames (F1 key) are generated by replacing the filename +extension with \fI-NNN.bmp\fR, where NNN is a 3-digit number (000 for +the first screenshot, 001 for the second, etc). The numbering starts +at 000 every time the emulator is started, and existing files will be +overwritten without confirmation. +.PP +State save filenames (F2 key) are generated by replacing the filename +extension with \fI.stN\fR, where N is the number of the save slot (one +or more digits). Again, existing files are overwritten without confirmation. +.PP +For both types of file, the filename is considered to be the entire +path to the ROM image file. This means that the emulator expects to +be able to write savestate and screenshot files in the directory where +the ROM files reside. If the directory is not writable, no files will +be created. +.SH BUGS +.PP +\fBsms_sdl\fR will segfault if it's given a filename that +contains no . (dot/period) characters (in other words, a filename +without an extension). So don't do that. (This applies to the file +inside the zip file, for zipped images) +.PP +Screenshot and state-save files should really be written in the +current directory, or else a hypothetical ~/.sms_sdl directory. +.PP +There should be a config file, so the user doesn't have to pass his +favorite set of options on the command line every time (of course, +a shell alias, wrapper script, or GUI file manager +can work around this easily enough). +.SH AUTHORS +.PP +(C) Charles Mac Donald in 1998, 1999, 2000 +.br +SDL Version by Gregory Montoir (cyx@frenchkiss.net) diff --git a/games/sms_sdl/sms_sdl.SlackBuild b/games/sms_sdl/sms_sdl.SlackBuild new file mode 100644 index 0000000000..c7b4e1b27c --- /dev/null +++ b/games/sms_sdl/sms_sdl.SlackBuild @@ -0,0 +1,101 @@ +#!/bin/sh + +# Slackware build script for sms_sdl +# Written by B. Watson (yalhcru@gmail.com) + +PRGNAM=sms_sdl +VERSION=${VERSION:-0.9.4a_r7.1} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-2} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +SRCVER=$(echo $VERSION | sed 's/_/-/') + +# If $MIME_TYPES is set to `yes' it will include MIME types for KDE and +# automagically associate *.sms and *.gg files with sms_sdl. +MIME_TYPES=${MIME_TYPES:-"yes"} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + cat < $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# man page is specific to this SlackBuild. If you're packaging for +# some other distribution, feel free to snag it. +mkdir -p $PKG/usr/man/man1 +gzip -9c $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz + +# Desktop integration stuff: Icon and .desktop file always present, +# regardless of $MIME_TYPES +mkdir -p $PKG/usr/share/{applications,pixmaps} +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop +( cd $CWD + for i in *.png; do + cat $i > $PKG/usr/share/pixmaps/$i + done +) + +if [ "$MIME_TYPES" = "yes" ]; then + mkdir -p $PKG/usr/share/mime/packages + cat $CWD/$PRGNAM.xml > $PKG/usr/share/mime/packages/$PRGNAM.xml + + # To make KDE able to use the .desktop and MIME stuff properly, we need + # to define each MIME type in /usr/share/mimelnk. This seems redundant to + # me, but that's how it works... + mkdir -p $PKG/usr/share/mimelnk/application + ( cd $CWD + for i in x-*.desktop; do + cat $i > $PKG/usr/share/mimelnk/application/$i + done + ) +fi + +mkdir -p $PKG/install +cat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/games/sms_sdl/sms_sdl.desktop b/games/sms_sdl/sms_sdl.desktop new file mode 100644 index 0000000000..81426fc7d5 --- /dev/null +++ b/games/sms_sdl/sms_sdl.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=SMS Plus/SDL +GenericName=Sega Master System Emulator +Type=Application +Exec=sms_sdl +Icon=sms_sdl +Terminal=false +StartupNotify=false +Categories=Emulator;System; +MimeType=application/x-sega-master-system-rom;application/x-sega-game-gear-rom; diff --git a/games/sms_sdl/sms_sdl.info b/games/sms_sdl/sms_sdl.info new file mode 100644 index 0000000000..9dd5a9da0a --- /dev/null +++ b/games/sms_sdl/sms_sdl.info @@ -0,0 +1,8 @@ +PRGNAM="sms_sdl" +VERSION="0.9.4a_r7.1" +HOMEPAGE="ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/emulators/sms_sdl/README.html" +DOWNLOAD="ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/sms_sdl-0.9.4a-r7.1-src.zip" +MD5SUM="985e979dbd38336909894a40c42a8e56" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" +APPROVED="dsomero" diff --git a/games/sms_sdl/sms_sdl.png b/games/sms_sdl/sms_sdl.png new file mode 100644 index 0000000000..bec3123a78 Binary files /dev/null and b/games/sms_sdl/sms_sdl.png differ diff --git a/games/sms_sdl/sms_sdl.xml b/games/sms_sdl/sms_sdl.xml new file mode 100644 index 0000000000..d3176081d2 --- /dev/null +++ b/games/sms_sdl/sms_sdl.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + Sega Master System ROM + SMS + Sega Master System + + + + Sega Game Gear ROM + GG + Game Gear + + + diff --git a/games/sms_sdl/x-sega-game-gear-rom.desktop b/games/sms_sdl/x-sega-game-gear-rom.desktop new file mode 100644 index 0000000000..407aeb3401 --- /dev/null +++ b/games/sms_sdl/x-sega-game-gear-rom.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=MimeType +MimeType=application/x-sega-game-gear-rom +Icon=sms_sdl +Patterns=*.gg;*.GG; +#X-KDE-PatternsAccuracy=80 +Comment=Sega Game Gear ROM Image diff --git a/games/sms_sdl/x-sega-master-system-rom.desktop b/games/sms_sdl/x-sega-master-system-rom.desktop new file mode 100644 index 0000000000..39f0bae9e1 --- /dev/null +++ b/games/sms_sdl/x-sega-master-system-rom.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=MimeType +MimeType=application/x-sega-master-system-rom +Icon=sms_sdl +Patterns=*.sms;*.SMS; +#X-KDE-PatternsAccuracy=80 +Comment=Sega Master System ROM Image -- cgit v1.2.3