aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-25 15:34:41 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-29 17:07:23 +0700
commit6cf20702d0ac8cbcde1836237a4885b57d3a802e (patch)
treecd74dc7491773f5751237d54178803a877e6e9e5 /games
parent9f7c8b6c0dbbbb2d66690ac27da598e0aad1fc27 (diff)
games/sms_sdl: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/sms_sdl/README5
-rw-r--r--games/sms_sdl/sms_sdl.677
-rw-r--r--games/sms_sdl/sms_sdl.SlackBuild24
-rw-r--r--games/sms_sdl/sms_sdl.desktop2
-rw-r--r--games/sms_sdl/sms_sdl.pngbin2898 -> 16332 bytes
-rw-r--r--games/sms_sdl/sms_sdl.pod71
-rw-r--r--games/sms_sdl/sms_sdl.sh9
7 files changed, 131 insertions, 57 deletions
diff --git a/games/sms_sdl/README b/games/sms_sdl/README
index 1ad0ad2e8879..3783beb807b0 100644
--- a/games/sms_sdl/README
+++ b/games/sms_sdl/README
@@ -1,13 +1,10 @@
sms_sdl (Sega Master System and Game Gear emulator)
SMS Plus is Sega Master System and Game Gear emulator. Originally,
-it was written to run under DOS. Since Charles Mac Donald released
+it was written to run under MS-DOS. Since Charles Mac Donald released
his emulator under the GPL terms, this emulator has been ported to
different platforms.
Zipped ROM images are now supported. Only the first ROM image in the
.zip file will be used. Other files (.txt, etc) in the .zip file are
allowed and ignored.
-
-The sms_sdl.png icon is by finite, from
-http://www.pixeljoint.com/pixelart/2312.htm
diff --git a/games/sms_sdl/sms_sdl.6 b/games/sms_sdl/sms_sdl.6
index 83fbf179b229..b570ddcfd0be 100644
--- a/games/sms_sdl/sms_sdl.6
+++ b/games/sms_sdl/sms_sdl.6
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -46,7 +46,7 @@
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
@@ -56,12 +56,12 @@
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
-.if (\n(rF:(\n(.g==0)) \{
-. if \nF \{
+.if (\n(rF:(\n(.g==0)) \{\
+. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
-. if !\nF==2 \{
+. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "SMS_SDL 6"
-.TH SMS_SDL 6 "2014-09-07" "0.9.4a-r7.1" "SlackBuilds.org"
+.TH SMS_SDL 6 "2021-10-25" "0.9.4a-r7.1" "SlackBuilds.org"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -176,7 +176,7 @@ Use joystick.
Disable sound.
.IP "\fB\-\-filter\fR <mode>" 4
.IX Item "--filter <mode>"
-Render using a filter. Available modes:
+Scales the display to 200% size. Available modes:
.RS 4
.IP "2xsai" 4
.IX Item "2xsai"
@@ -197,51 +197,59 @@ Render using a filter. Available modes:
.IX Item "dotmatrix"
.RE
.RS 4
-.RE
.PD
+.Sp
+Note that the \fB1\fR to \fB8\fR keys can be used to change the filter
+while the emulator is running, but \fIonly\fR if it was started
+with the \fB\-\-filter\fR option.
+.RE
.SH "KEYBOARD"
.IX Header "KEYBOARD"
.IP "\fBF1\fR" 4
.IX Item "F1"
-Screenshot in \s-1BMP\s0 format
+Save screenshot in \s-1BMP\s0 format (in \fB~/.sms_sdl\fR).
.IP "\fBF2\fR" 4
.IX Item "F2"
-Save state
+Save state.
.IP "\fBF3\fR" 4
.IX Item "F3"
-Load state
+Load state.
.IP "\fBF4/F5\fR" 4
.IX Item "F4/F5"
-Dec/inc frame skip value
+Decrease/increase frame skip value.
.IP "\fBF6/F7\fR" 4
.IX Item "F6/F7"
-Dec/inc state slot
+Decrease/increase state slot.
.IP "\fB1..8\fR" 4
.IX Item "1..8"
-Switch rendering filter
+Switch rendering filter. Only works if the emulator was started
+with the \fB\-\-filter\fR option.
.IP "\fBC\fR" 4
.IX Item "C"
-Button 1
+Controller button 1.
.IP "\fBV\fR" 4
.IX Item "V"
-Button 2
+Controller button 2.
.IP "\fB\s-1ENTER\s0\fR" 4
.IX Item "ENTER"
-Start (\s-1GG\s0) / pause (\s-1SMS\s0)
+Start (\s-1GG\s0) / pause (\s-1SMS\s0).
.IP "\fB\s-1ARROWS\s0\fR" 4
.IX Item "ARROWS"
-Directional pad
+Directional pad.
.IP "\fB\s-1TAB\s0\fR" 4
.IX Item "TAB"
-Console hard reset
+Console hard reset.
.PP
The key bindings may not be remapped.
.SH "FILES"
.IX Header "FILES"
\&\s-1ROM\s0 image files may be in raw dump format, or may have a header
(details are system-specific). Also, \s-1ROM\s0 images may be zipped (not
-gzipped), in which case the first file in the zip file's directory must
-be the \s-1ROM\s0 image (any other files are ignored).
+gzipped), in which case the first file in the zip file's directory
+that matches \fI*.sms\fR, \fI*.gg\fR, \fI*.rom\fR, \fI*.bin\fR (case-insensitive)
+will be used as the \s-1ROM\s0 image. Other files are ignored. If nothing
+in the zip file matches, the first file in the zip directory will
+be used.
.PP
\&\fBsms_sdl\fR looks at the filename to determine the type of \s-1ROM\s0 image
in use. Any file whose name ends in \fI.gg\fR (case-insensitive match) is
@@ -250,13 +258,13 @@ Master System \s-1ROM.\s0 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
+Screenshot filenames (\fBF1\fR key) are generated by replacing the filename
extension with \fI\-NNN.bmp\fR, where \s-1NNN\s0 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
+State save filenames (\fBF2\fR 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
@@ -264,10 +272,15 @@ Screenshots and savestates are stored in \fI~/.sms_sdl\fR.
.SH "CONFIG FILE"
.IX Header "CONFIG FILE"
\&\fBsms_sdl\fR is launched by a shell script wrapper which reads the file
-\&\fI~/.sms_sdl/config\fR if it exists. Any of the options above may be placed
-in this file (one option per line, with or without the leading \fB\-\-\fR
-characters). These options will be passed as command-line arguments to
-the real \fBsms_sdl\fR binary every time it runs.
+\&\fI~/.sms_sdl/config\fR if it exists. Any of the options above may be
+placed in this file (one option per line, with or without the leading
+\&\fB\-\-\fR characters). These options will be passed as command-line
+arguments to the real \fBsms_sdl\fR binary every time it runs. Any
+arguments passed to the script will appear after the ones read from
+the config file.
+.PP
+If there's no \fI~/.sms_sdl/config\fR, a default one will be created,
+which enables \fB\-\-joystick\fR, \fB\-\-fm\fR, and \fB\-\-filter 2x\fR.
.PP
See \fB/usr/doc/sms_sdl\-VERSION/sample_config\fR for further information.
.SH "PATCHES"
@@ -283,6 +296,16 @@ The emulator no longer segfaults when the \s-1ROM\s0 filename doesn't contain a
\&\s-1ROM\s0 filename can appear anywhere on the command line, before or after options (patch by B. Watson).
.IP "\-" 4
Wrapper script, supports config file and snapshots/savestates in ~/.sms_sdl (script by B. Watson).
+.SH "LIMITATIONS"
+.IX Header "LIMITATIONS"
+.IP "\-" 4
+There are no controls mapped for the player 2 controller. Only one
+joystick is supported, and the keyboard only has player 1 mappings.
+.IP "\-" 4
+The only supported resolutions are tiny, by modern desktop \s-1PC\s0
+standards. By default, \s-1SMS\s0 games run at 256x192 and \s-1GG\s0 games run at
+160x144. With \fB\-\-filter\fR, the window/screen size is doubled: 512x384
+and 320x288.
.SH "AUTHORS"
.IX Header "AUTHORS"
The original \s-1SMS\s0 is (C) Charles Mac Donald in 1998, 1999, 2000.
diff --git a/games/sms_sdl/sms_sdl.SlackBuild b/games/sms_sdl/sms_sdl.SlackBuild
index ef3f3397f3c2..e88784700ed5 100644
--- a/games/sms_sdl/sms_sdl.SlackBuild
+++ b/games/sms_sdl/sms_sdl.SlackBuild
@@ -6,6 +6,12 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211024 bkw: BUILD=4
+# - made a new icon, hopefully better looking.
+# - new-style icons.
+# - wrapper script: create default config if no config found.
+# - expand man page a bit.
+
# 20200104 bkw:
# - Whoops! The sms_sdl.png icon was actually a .gif. Fix & bump BUILD.
@@ -36,9 +42,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -118,10 +121,21 @@ mkdir -p $PKG/usr/man/man6
sed "s/\<VERSION\>/$VERSION/g" < $CWD/$PRGNAM.6 | \
gzip -9c > $PKG/usr/man/man6/$PRGNAM.6.gz
-# icon by finite (see REAME), desktop written for this build.
+# .desktop written for this build.
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+
+# 20211024 bkw: created a new icon, the old one didn't scale down
+# well, plus it was too dark. I'm still not a graphic designer, feel
+# free to send me a better one.
+for px in 16 32 48 64 128; do
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ convert -resize $size $CWD/$PRGNAM.png $dir/$PRGNAM.png
+done
+
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/install
cat $CWD/doinst.sh > $PKG/install/doinst.sh
diff --git a/games/sms_sdl/sms_sdl.desktop b/games/sms_sdl/sms_sdl.desktop
index 47c50e67ed92..d50e94253cbb 100644
--- a/games/sms_sdl/sms_sdl.desktop
+++ b/games/sms_sdl/sms_sdl.desktop
@@ -2,7 +2,7 @@
Type=Application
Name=SMS Plus/SDL
GenericName=Sega Master System Emulator
-Exec=sms_sdl %f
+Exec=/usr/games/sms_sdl %f
Icon=sms_sdl
Terminal=false
StartupNotify=false
diff --git a/games/sms_sdl/sms_sdl.png b/games/sms_sdl/sms_sdl.png
index deddb79802ea..0f77d8d2380b 100644
--- a/games/sms_sdl/sms_sdl.png
+++ b/games/sms_sdl/sms_sdl.png
Binary files differ
diff --git a/games/sms_sdl/sms_sdl.pod b/games/sms_sdl/sms_sdl.pod
index f099cfa82109..6d78dd3f1388 100644
--- a/games/sms_sdl/sms_sdl.pod
+++ b/games/sms_sdl/sms_sdl.pod
@@ -56,7 +56,7 @@ Disable sound.
=item B<--filter> <mode>
-Render using a filter. Available modes:
+Scales the display to 200% size. Available modes:
=over 4
@@ -78,6 +78,10 @@ Render using a filter. Available modes:
=back
+Note that the B<1> to B<8> keys can be used to change the filter
+while the emulator is running, but I<only> if it was started
+with the B<--filter> option.
+
=back
=head1 KEYBOARD
@@ -86,47 +90,48 @@ Render using a filter. Available modes:
=item B<F1>
-Screenshot in BMP format
+Save screenshot in BMP format (in B<~/.sms_sdl>).
=item B<F2>
-Save state
+Save state.
=item B<F3>
-Load state
+Load state.
=item B<F4/F5>
-Dec/inc frame skip value
+Decrease/increase frame skip value.
=item B<F6/F7>
-Dec/inc state slot
+Decrease/increase state slot.
=item B<1..8>
-Switch rendering filter
+Switch rendering filter. Only works if the emulator was started
+with the B<--filter> option.
=item B<C>
-Button 1
+Controller button 1.
=item B<V>
-Button 2
+Controller button 2.
=item B<ENTER>
-Start (GG) / pause (SMS)
+Start (GG) / pause (SMS).
=item B<ARROWS>
-Directional pad
+Directional pad.
=item B<TAB>
-Console hard reset
+Console hard reset.
=back
@@ -136,8 +141,11 @@ The key bindings may not be remapped.
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).
+gzipped), in which case the first file in the zip file's directory
+that matches I<*.sms>, I<*.gg>, I<*.rom>, I<*.bin> (case-insensitive)
+will be used as the ROM image. Other files are ignored. If nothing
+in the zip file matches, the first file in the zip directory will
+be used.
B<sms_sdl> looks at the filename to determine the type of ROM image
in use. Any file whose name ends in I<.gg> (case-insensitive match) is
@@ -146,13 +154,13 @@ 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.
-Screenshot filenames (F1 key) are generated by replacing the filename
+Screenshot filenames (B<F1> key) are generated by replacing the filename
extension with I<-NNN.bmp>, 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.
-State save filenames (F2 key) are generated by replacing the filename
+State save filenames (B<F2> key) are generated by replacing the filename
extension with I<.stN>, where N is the number of the save slot (one or
more digits). Again, existing files are overwritten without confirmation.
@@ -161,10 +169,15 @@ Screenshots and savestates are stored in I<~/.sms_sdl>.
=head1 CONFIG FILE
B<sms_sdl> is launched by a shell script wrapper which reads the file
-I<~/.sms_sdl/config> if it exists. Any of the options above may be placed
-in this file (one option per line, with or without the leading B<-->
-characters). These options will be passed as command-line arguments to
-the real B<sms_sdl> binary every time it runs.
+I<~/.sms_sdl/config> if it exists. Any of the options above may be
+placed in this file (one option per line, with or without the leading
+B<--> characters). These options will be passed as command-line
+arguments to the real B<sms_sdl> binary every time it runs. Any
+arguments passed to the script will appear after the ones read from
+the config file.
+
+If there's no I<~/.sms_sdl/config>, a default one will be created,
+which enables B<--joystick>, B<--fm>, and B<--filter 2x>.
See B</usr/doc/sms_sdl-VERSION/sample_config> for further information.
@@ -196,6 +209,24 @@ Wrapper script, supports config file and snapshots/savestates in ~/.sms_sdl (scr
=back
+=head1 LIMITATIONS
+
+=over 4
+
+=item -
+
+There are no controls mapped for the player 2 controller. Only one
+joystick is supported, and the keyboard only has player 1 mappings.
+
+=item -
+
+The only supported resolutions are tiny, by modern desktop PC
+standards. By default, SMS games run at 256x192 and GG games run at
+160x144. With B<--filter>, the window/screen size is doubled: 512x384
+and 320x288.
+
+=back
+
=head1 AUTHORS
The original SMS is (C) Charles Mac Donald in 1998, 1999, 2000.
diff --git a/games/sms_sdl/sms_sdl.sh b/games/sms_sdl/sms_sdl.sh
index d9a6ff1afdbb..cccfce356301 100644
--- a/games/sms_sdl/sms_sdl.sh
+++ b/games/sms_sdl/sms_sdl.sh
@@ -49,6 +49,15 @@ unzip_rom() {
mkdir -p $sms_userdir
+# 20211025 bkw: if there's no config file, create one.
+if [ ! -e "$conf_file" ]; then
+ cat > "$conf_file" <<EOF
+joystick
+fm
+filter 2x
+EOF
+fi
+
if [ -e "$conf_file" ]; then
while read line; do
# remove comments