diff options
Diffstat (limited to 'games/sms_sdl')
-rw-r--r-- | games/sms_sdl/README | 10 | ||||
-rw-r--r-- | games/sms_sdl/cflags_and_libz.diff | 25 | ||||
-rw-r--r-- | games/sms_sdl/doinst.sh | 7 | ||||
-rw-r--r-- | games/sms_sdl/japan_and_fm.diff | 29 | ||||
-rw-r--r-- | games/sms_sdl/slack-desc | 19 | ||||
-rw-r--r-- | games/sms_sdl/sms_sdl.1 | 138 | ||||
-rw-r--r-- | games/sms_sdl/sms_sdl.SlackBuild | 101 | ||||
-rw-r--r-- | games/sms_sdl/sms_sdl.desktop | 11 | ||||
-rw-r--r-- | games/sms_sdl/sms_sdl.info | 8 | ||||
-rw-r--r-- | games/sms_sdl/sms_sdl.png | bin | 0 -> 3752 bytes | |||
-rw-r--r-- | games/sms_sdl/sms_sdl.xml | 60 | ||||
-rw-r--r-- | games/sms_sdl/x-sega-game-gear-rom.desktop | 8 | ||||
-rw-r--r-- | games/sms_sdl/x-sega-master-system-rom.desktop | 8 |
13 files changed, 424 insertions, 0 deletions
diff --git a/games/sms_sdl/README b/games/sms_sdl/README new file mode 100644 index 0000000000000..72faf7fed95ea --- /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 0000000000000..cf74397198ce0 --- /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 0000000000000..dd240ff2aee18 --- /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 0000000000000..d33f405e68895 --- /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<argc) { + cfg.frameskip = atoi(argv[i]); diff --git a/games/sms_sdl/slack-desc b/games/sms_sdl/slack-desc new file mode 100644 index 0000000000000..c5662b3502c4a --- /dev/null +++ b/games/sms_sdl/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 ':'. + + |-----handy-ruler------------------------------------------------------| +sms_sdl: sms_sdl (A Sega Master System and Game Emulator) +sms_sdl: +sms_sdl: SMS Plus is a Sega Master System and Game Gear emulator. Originally, +sms_sdl: it was written to run under DOS. Since Charles Mac Donald released +sms_sdl: his emulator under the GPL terms, this emulator has been ported to +sms_sdl: different platforms. +sms_sdl: +sms_sdl: +sms_sdl: +sms_sdl: +sms_sdl: diff --git a/games/sms_sdl/sms_sdl.1 b/games/sms_sdl/sms_sdl.1 new file mode 100644 index 0000000000000..8dd7b1fd356a5 --- /dev/null +++ b/games/sms_sdl/sms_sdl.1 @@ -0,0 +1,138 @@ +.TH SMS_SDL "1" "February 2009" "SMS Plus/SDL v0.9.4aR7" "User Commands" +.SH NAME +sms_sdl \- Sega Master System and Game Gear emulator. +.SH SYNOPSIS +.B sms_sdl +\fI<filename.<SMS|GG>> \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 <n> +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 <mode> +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 0000000000000..c7b4e1b27c159 --- /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 <<EOF +This package can't easily be built on x86_64. Build the 32-bit +package on a 32-bit Slackware system. It should install and run +fine on a multilib x86_64 system such as slamd64, provided you +have 32-bit SDL libraries available. +EOF +exit 1 +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$SRCVER +unzip $CWD/$PRGNAM-$SRCVER-src.zip +cd $PRGNAM-$SRCVER +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +patch -p1 --verbose < $CWD/cflags_and_libz.diff + +# Thanks to Ellington Santos (necropresto) for this patch that makes +# the --fm and --japan options actually work: +patch -p1 --verbose < $CWD/japan_and_fm.diff + +cd sdl +make OPTFLAGS="$SLKCFLAGS" LDFLAGS=$SLKLDFLAGS + +# There's no 'make install' +strip $PRGNAM +mkdir -p $PKG/usr/bin +install -m0755 $PRGNAM $PKG/usr/bin/$PRGNAM + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp README.TXT $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $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 0000000000000..81426fc7d5013 --- /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 0000000000000..9dd5a9da0aa55 --- /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 Binary files differnew file mode 100644 index 0000000000000..bec3123a780cf --- /dev/null +++ b/games/sms_sdl/sms_sdl.png diff --git a/games/sms_sdl/sms_sdl.xml b/games/sms_sdl/sms_sdl.xml new file mode 100644 index 0000000000000..d3176081d2a5e --- /dev/null +++ b/games/sms_sdl/sms_sdl.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- 20080823 bkw: is all this leading cruft really necessary? --> +<!DOCTYPE mime-info [ + <!ELEMENT mime-info (mime-type)+> + <!ATTLIST mime-info xmlns CDATA #FIXED "http://www.freedesktop.org/standards/shared-mime-info"> + + <!ELEMENT mime-type (comment|acronym|expanded-acronym|glob|magic|root-XML|alias|sub-class-of)*> + <!ATTLIST mime-type type CDATA #REQUIRED> + + <!-- a comment describing a document with the respective MIME type. Example: "WMV video" --> + <!ELEMENT comment (#PCDATA)> + <!ATTLIST comment xml:lang CDATA #IMPLIED> + + <!-- a comment describing a the respective unexpanded MIME type acronym. Example: "WMV" --> + <!ELEMENT acronym (#PCDATA)> + <!ATTLIST acronym xml:lang CDATA #IMPLIED> + + <!-- a comment describing a the respective unexpanded MIME type acronym. Example: "Windows Media Video" --> + <!ELEMENT expanded-acronym (#PCDATA)> + <!ATTLIST expanded-acronym xml:lang CDATA #IMPLIED> + + <!ELEMENT glob EMPTY> + <!ATTLIST glob pattern CDATA #REQUIRED> + + <!ELEMENT magic (match)+> + <!ATTLIST magic priority CDATA #IMPLIED> + + <!ELEMENT match (match)*> + <!ATTLIST match offset CDATA #REQUIRED> + <!ATTLIST match type (string|big16|big32|little16|little32|host16|host32|byte) #REQUIRED> + <!ATTLIST match value CDATA #REQUIRED> + <!ATTLIST match mask CDATA #IMPLIED> + + <!ELEMENT root-XML EMPTY> + <!ATTLIST root-XML + namespaceURI CDATA #REQUIRED + localName CDATA #REQUIRED> + + <!ELEMENT alias EMPTY> + <!ATTLIST alias + type CDATA #REQUIRED> + + <!ELEMENT sub-class-of EMPTY> + <!ATTLIST sub-class-of + type CDATA #REQUIRED> +]> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="application/x-sega-master-system-rom"> + <comment>Sega Master System ROM</comment> + <acronym>SMS</acronym> + <expanded-acronym>Sega Master System</expanded-acronym> + <glob pattern="*.sms"/> + </mime-type> + <mime-type type="application/x-sega-game-gear-rom"> + <comment>Sega Game Gear ROM</comment> + <acronym>GG</acronym> + <expanded-acronym>Game Gear</expanded-acronym> + <glob pattern="*.gg"/> + </mime-type> +</mime-info> 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 0000000000000..407aeb34015f9 --- /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 0000000000000..39f0bae9e173c --- /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 |