mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
games/yae: Fix audio, X close button.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
e1ae146a04
commit
8d93bcfabe
13 changed files with 124 additions and 55 deletions
|
@ -5,5 +5,3 @@ Emulates the 8-bit Apple II, II+, and //e computers.
|
|||
This is an older emulator without a lot of fancy features.
|
||||
|
||||
The package includes the ROM images and an Apple DOS 3.3 disk image.
|
||||
|
||||
Audio is supported, but only if OSS modules are loaded.
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
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 usr/share/icons/hicolor >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
|
BIN
games/yae/icons/128.png
Normal file
BIN
games/yae/icons/128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
games/yae/icons/16.png
Normal file
BIN
games/yae/icons/16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
games/yae/icons/32.png
Normal file
BIN
games/yae/icons/32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
games/yae/icons/48.png
Normal file
BIN
games/yae/icons/48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
games/yae/icons/64.png
Normal file
BIN
games/yae/icons/64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
33
games/yae/patches/allow_x_window_close.diff
Normal file
33
games/yae/patches/allow_x_window_close.diff
Normal file
|
@ -0,0 +1,33 @@
|
|||
diff -Naur -Naur yae-0.7/x_window.c yae-0.7.patched/x_window.c
|
||||
--- yae-0.7/x_window.c 2007-04-03 17:47:59.000000000 -0400
|
||||
+++ yae-0.7.patched/x_window.c 2021-10-12 00:23:48.765550342 -0400
|
||||
@@ -57,6 +57,8 @@
|
||||
|
||||
static Cursor InvisibleCursor;
|
||||
|
||||
+static Atom delete_atom;
|
||||
+
|
||||
Visual *getVisual( Display *dpy, int screen, int depth, int class )
|
||||
{
|
||||
XVisualInfo vinfo, *vinfoList;
|
||||
@@ -219,6 +221,9 @@
|
||||
XFlush( dc->display );
|
||||
#endif
|
||||
|
||||
+ delete_atom = XInternAtom(dc->display, "WM_DELETE_WINDOW", False);
|
||||
+ XSetWMProtocols(dc->display, dc->window, &delete_atom, 1);
|
||||
+
|
||||
/*
|
||||
* startup micro job for X window
|
||||
*/
|
||||
@@ -313,6 +318,10 @@
|
||||
#endif
|
||||
refreshScreen();
|
||||
break;
|
||||
+ case ClientMessage:
|
||||
+ if(event.xclient.data.l[0] == delete_atom)
|
||||
+ shutdown_6502();
|
||||
+ break;
|
||||
case DestroyNotify:
|
||||
Signal6502( SIG_6502_SHUTDOWN );
|
||||
break;
|
|
@ -1,4 +1,4 @@
|
|||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.20)
|
||||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
@ -38,27 +38,36 @@
|
|||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.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.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
.\"
|
||||
.\" Avoid warning from groff about undefined register 'F'.
|
||||
.de IX
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
.nr rF 0
|
||||
.if \n(.g .if rF .nr rF 1
|
||||
.if (\n(rF:(\n(.g==0)) \{\
|
||||
. if \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. if !\nF==2 \{\
|
||||
. nr % 0
|
||||
. nr F 2
|
||||
. \}
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
|
@ -124,7 +133,7 @@
|
|||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "YAE 1"
|
||||
.TH YAE 1 "2013-08-29" "0.7" "yae"
|
||||
.TH YAE 1 "2021-10-12" "0.7" "yae"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
@ -136,51 +145,51 @@ yae \- Yet another Apple Emulator
|
|||
\&\fByae\fR [\-2|\-e|\-+] [disk\-image] ...
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fByae\fR emulates the Apple \s-1II\s0, \s-1II+\s0, and //e 8\-bit computers from Apple,
|
||||
\&\fByae\fR emulates the Apple \s-1II, II+,\s0 and //e 8\-bit computers from Apple,
|
||||
Inc. Standard .dsk images are supported. If \fByae\fR is run without any
|
||||
disk image arguments, \fI/usr/share/yae/Master.dsk\fR will be booted.
|
||||
.PP
|
||||
\&\s-1ROM\s0 image files are required; see \fB\s-1FILES\s0\fR for details.
|
||||
.PP
|
||||
\&\s-1OSS\s0 audio is supported, using the /dev/audio device. For Linux systems
|
||||
using \s-1ALSA\s0, \s-1OSS\s0 audio is provided by the snd_pcm_oss and snd_mixer_oss
|
||||
kernel modules. If /dev/audio can't be opened, the emulator will run
|
||||
with sound disabled.
|
||||
\&\s-1ALSA\s0 audio is supported, by linking the emulator with \fB\-laoss\fR. This
|
||||
also allows PulseAudio to work, if you have the default \s-1ALSA\s0 device
|
||||
set to \*(L"pcm.default pulse\*(R" (and \*(L"ctl.default pulse\*(R") in \fB/etc/asound.conf\fR.
|
||||
.SH "OPTIONS"
|
||||
.IX Header "OPTIONS"
|
||||
.IP "\-2" 4
|
||||
.IP "\fB\-2\fR" 4
|
||||
.IX Item "-2"
|
||||
Emulate the Apple \s-1II\s0.
|
||||
Emulate the Apple \s-1II.\s0
|
||||
.Sp
|
||||
Note that the emulator uses the same \s-1ROM\s0 image for \s-1II\s0 and \s-1II+\s0, so the
|
||||
Note that the emulator uses the same \s-1ROM\s0 image for \s-1II\s0 and \s-1II+,\s0 so the
|
||||
emulated \s-1II\s0 will have Applesoft and autostart (which the original \s-1II\s0
|
||||
didn't ship with).
|
||||
.IP "\-+" 4
|
||||
Emulate the Apple \s-1II+\s0.
|
||||
.IP "\-e" 4
|
||||
.IP "\fB\-+\fR" 4
|
||||
.IX Item "-+"
|
||||
Emulate the Apple \s-1II+.\s0
|
||||
.IP "\fB\-e\fR" 4
|
||||
.IX Item "-e"
|
||||
Emulate the Apple //e (the default).
|
||||
.SH "KEYSTROKES"
|
||||
.IX Header "KEYSTROKES"
|
||||
.IP "Backspace" 4
|
||||
.IP "\fBBackspace\fR" 4
|
||||
.IX Item "Backspace"
|
||||
Alias for the left-arrow key.
|
||||
.IP "Control+Delete" 4
|
||||
.IP "\fBControl+Delete\fR" 4
|
||||
.IX Item "Control+Delete"
|
||||
Apple Reset key.
|
||||
.IP "Left Alt" 4
|
||||
.IP "\fBLeft Alt\fR" 4
|
||||
.IX Item "Left Alt"
|
||||
The left (open) apple key on the //e keyboard.
|
||||
.IP "Right Alt" 4
|
||||
.IP "\fBRight Alt\fR" 4
|
||||
.IX Item "Right Alt"
|
||||
The right (closed) apple key on the //e keyboard.
|
||||
.IP "F1" 4
|
||||
.IP "\fBF1\fR" 4
|
||||
.IX Item "F1"
|
||||
Change disks in the first drive (slot 6, drive 0). This will either
|
||||
read a filename on standard input (if kdialog can't be run), or display
|
||||
a kdialog file-selector. Either way, the emulator stops and its window
|
||||
becomes unresponsive until a file has been chosen.
|
||||
.IP "F2" 4
|
||||
.IP "\fBF2\fR" 4
|
||||
.IX Item "F2"
|
||||
Exit the emulator immediately. No confirmation dialog, so
|
||||
be careful.
|
||||
|
@ -195,10 +204,10 @@ keyboard.
|
|||
Config file. Searched for first in the current directory,
|
||||
then in user's home directory. For config file syntax, see
|
||||
\&\fI/usr/share/yae/yaerc.sample\fR.
|
||||
.IP "\s-1ROM\s0 files" 4
|
||||
.IP "\fB\s-1ROM\s0 files\fR" 4
|
||||
.IX Item "ROM files"
|
||||
For \s-1II\s0 and \s-1II+\s0 emulation, the required \s-1ROM\s0 image is called \fB\s-1APPLE2\s0.ROM\fR.
|
||||
For the //e, the image is \fB\s-1APPLE2E\s0.ROM\fR. For all modes, \fB\s-1DISK\s0.ROM\fR is
|
||||
For \s-1II\s0 and \s-1II+\s0 emulation, the required \s-1ROM\s0 image is called \fB\s-1APPLE2.ROM\s0\fR.
|
||||
For the //e, the image is \fB\s-1APPLE2E.ROM\s0\fR. For all modes, \fB\s-1DISK.ROM\s0\fR is
|
||||
required.
|
||||
.Sp
|
||||
\&\s-1ROM\s0 file locations can be set in the config file. By default, they're
|
||||
|
|
|
@ -6,11 +6,18 @@
|
|||
|
||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
||||
|
||||
# 20211011 bkw: BUILD=2
|
||||
# - fix -current build (-fcommon).
|
||||
# - link with -laoss, makes audio work on ALSA or pulseaudio systems.
|
||||
# - new-style icons.
|
||||
# - update man page.
|
||||
# - allow X window close button to work. yet another patch.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=yae
|
||||
VERSION=${VERSION:-0.7}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -22,9 +29,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
|
||||
|
@ -86,6 +90,13 @@ patch -p1 < $CWD/patches/defaultmasterdisk.diff
|
|||
# this package, which Just Work instead of requiring user configuration.
|
||||
patch -p1 < $CWD/patches/defaultromlocation.diff
|
||||
|
||||
# *So* annoying: the standard X close button wasn't enabled. If this
|
||||
# application did the whole "Are you sure you want to quit?" thing, I
|
||||
# might understand why... but it already exits without confirmation,
|
||||
# you just have to remember that F2 is the exit key. So why not the
|
||||
# easily-memorable window close button?
|
||||
patch -p1 < $CWD/patches/allow_x_window_close.diff
|
||||
|
||||
# Try to make 64-bit work. This seems OK, the scanline code seems to
|
||||
# assume sizeof(long)==4, which is wrong on x86_64. Using int (which
|
||||
# is still 4 bytes) fixes the display issues. There still might be
|
||||
|
@ -104,6 +115,9 @@ CONFSUB=/usr/share/libtool/config/config.sub
|
|||
cp $CONFSUB .
|
||||
autoreconf -if
|
||||
|
||||
SLKCFLAGS+=" -fcommon"
|
||||
|
||||
LIBS="-laoss" \
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
|
@ -144,10 +158,20 @@ cat $CWD/${PRGNAM}rc.sample > $PKG/usr/share/$PRGNAM/${PRGNAM}rc.sample
|
|||
mkdir -p $PKG/usr/share/applications
|
||||
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
|
||||
|
||||
# icon created for this build, based on
|
||||
# icons created for this build, based on
|
||||
# http://www.callapple.org/soft/images/icons/apple.gif
|
||||
# 20211012 bkw: resized with convert(1), the aspect ratio is
|
||||
# slightly squashed, but that just makes it look retro...
|
||||
for i in $CWD/icons/*.png; do
|
||||
px=$( basename $i | cut -d. -f1 )
|
||||
size=${px}x${px}
|
||||
dir=$PKG/usr/share/icons/hicolor/$size/apps
|
||||
mkdir -p $dir
|
||||
cat $i > $dir/$PRGNAM.png
|
||||
done
|
||||
|
||||
mkdir -p $PKG/usr/share/pixmaps
|
||||
cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
|
||||
ln -s ../icons/hicolor/64x64/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $PRGNAM-roms/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.roms
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Name=YAE
|
||||
Comment=Apple II Emulator
|
||||
StartupNotify=true
|
||||
Exec=yae
|
||||
StartupNotify=false
|
||||
Exec=/usr/games/yae
|
||||
Icon=yae
|
||||
Terminal=false
|
||||
Type=Application
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 17 KiB |
|
@ -18,16 +18,15 @@ disk image arguments, I</usr/share/yae/Master.dsk> will be booted.
|
|||
|
||||
ROM image files are required; see B<FILES> for details.
|
||||
|
||||
OSS audio is supported, using the /dev/audio device. For Linux systems
|
||||
using ALSA, OSS audio is provided by the snd_pcm_oss and snd_mixer_oss
|
||||
kernel modules. If /dev/audio can't be opened, the emulator will run
|
||||
with sound disabled.
|
||||
ALSA audio is supported, by linking the emulator with B<-laoss>. This
|
||||
also allows PulseAudio to work, if you have the default ALSA device
|
||||
set to "pcm.default pulse" (and "ctl.default pulse") in B</etc/asound.conf>.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over
|
||||
|
||||
=item -2
|
||||
=item B<-2>
|
||||
|
||||
Emulate the Apple II.
|
||||
|
||||
|
@ -35,11 +34,11 @@ Note that the emulator uses the same ROM image for II and II+, so the
|
|||
emulated II will have Applesoft and autostart (which the original II
|
||||
didn't ship with).
|
||||
|
||||
=item -+
|
||||
=item B<-+>
|
||||
|
||||
Emulate the Apple II+.
|
||||
|
||||
=item -e
|
||||
=item B<-e>
|
||||
|
||||
Emulate the Apple //e (the default).
|
||||
|
||||
|
@ -49,30 +48,30 @@ Emulate the Apple //e (the default).
|
|||
|
||||
=over
|
||||
|
||||
=item Backspace
|
||||
=item B<Backspace>
|
||||
|
||||
Alias for the left-arrow key.
|
||||
|
||||
=item Control+Delete
|
||||
=item B<Control+Delete>
|
||||
|
||||
Apple Reset key.
|
||||
|
||||
=item Left Alt
|
||||
=item B<Left Alt>
|
||||
|
||||
The left (open) apple key on the //e keyboard.
|
||||
|
||||
=item Right Alt
|
||||
=item B<Right Alt>
|
||||
|
||||
The right (closed) apple key on the //e keyboard.
|
||||
|
||||
=item F1
|
||||
=item B<F1>
|
||||
|
||||
Change disks in the first drive (slot 6, drive 0). This will either
|
||||
read a filename on standard input (if kdialog can't be run), or display
|
||||
a kdialog file-selector. Either way, the emulator stops and its window
|
||||
becomes unresponsive until a file has been chosen.
|
||||
|
||||
=item F2
|
||||
=item B<F2>
|
||||
|
||||
Exit the emulator immediately. No confirmation dialog, so
|
||||
be careful.
|
||||
|
@ -93,7 +92,7 @@ Config file. Searched for first in the current directory,
|
|||
then in user's home directory. For config file syntax, see
|
||||
I</usr/share/yae/yaerc.sample>.
|
||||
|
||||
=item ROM files
|
||||
=item B<ROM files>
|
||||
|
||||
For II and II+ emulation, the required ROM image is called B<APPLE2.ROM>.
|
||||
For the //e, the image is B<APPLE2E.ROM>. For all modes, B<DISK.ROM> is
|
||||
|
|
Loading…
Reference in a new issue