summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/yae/README9
-rw-r--r--games/yae/doinst.sh3
-rw-r--r--games/yae/patches/64.diff13
-rw-r--r--games/yae/patches/confile_apple2.diff11
-rw-r--r--games/yae/patches/defaultmasterdisk.diff11
-rw-r--r--games/yae/patches/defaultromlocation.diff35
-rw-r--r--games/yae/patches/disk_selection.diff74
-rw-r--r--games/yae/patches/fix2option.diff11
-rw-r--r--games/yae/slack-desc19
-rw-r--r--games/yae/yae.1220
-rw-r--r--games/yae/yae.SlackBuild149
-rw-r--r--games/yae/yae.desktop9
-rw-r--r--games/yae/yae.info12
-rw-r--r--games/yae/yae.pngbin0 -> 17291 bytes
-rw-r--r--games/yae/yae.pod122
-rw-r--r--games/yae/yaerc.sample69
16 files changed, 767 insertions, 0 deletions
diff --git a/games/yae/README b/games/yae/README
new file mode 100644
index 0000000000..4ae1908a53
--- /dev/null
+++ b/games/yae/README
@@ -0,0 +1,9 @@
+yae (Yet another Apple Emulator)
+
+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.
diff --git a/games/yae/doinst.sh b/games/yae/doinst.sh
new file mode 100644
index 0000000000..5fb28930db
--- /dev/null
+++ b/games/yae/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
diff --git a/games/yae/patches/64.diff b/games/yae/patches/64.diff
new file mode 100644
index 0000000000..ace2b9d8bf
--- /dev/null
+++ b/games/yae/patches/64.diff
@@ -0,0 +1,13 @@
+diff -Naur yae-0.7/screen.c yae-0.7.patched/screen.c
+--- yae-0.7/screen.c 2007-04-03 17:51:44.000000000 -0400
++++ yae-0.7.patched/screen.c 2013-08-31 02:13:07.000000000 -0400
+@@ -40,6 +40,9 @@
+ XImage *ScreenXImage;
+ XShmSegmentInfo shminfo;
+
++XImage *createShmImage( DisplayContext *dc, int width, int height,
++ XShmSegmentInfo *info );
++
+ /*
+ * frame rate control
+ */
diff --git a/games/yae/patches/confile_apple2.diff b/games/yae/patches/confile_apple2.diff
new file mode 100644
index 0000000000..597623be9c
--- /dev/null
+++ b/games/yae/patches/confile_apple2.diff
@@ -0,0 +1,11 @@
+diff -Naur yae-0.7/confile.c yae-0.7.patched/confile.c
+--- yae-0.7/confile.c 2007-04-03 17:50:57.000000000 -0400
++++ yae-0.7.patched/confile.c 2013-08-29 14:17:06.000000000 -0400
+@@ -216,6 +216,7 @@
+ if (!strcmp(v, "MachineType")) {
+ if (!strcmp(h,"IIe")) { MachineType=APPLE_IIE; }
+ else if (!strcmp(h,"II+")) { MachineType=APPLE_II_PLUS; }
++ else if (!strcmp(h,"II")) { MachineType=APPLE_II; }
+ else fprintf(stderr,"Unknown MachineType %s in %s\n",h,cfile);
+ continue;
+ }
diff --git a/games/yae/patches/defaultmasterdisk.diff b/games/yae/patches/defaultmasterdisk.diff
new file mode 100644
index 0000000000..f45b1118c3
--- /dev/null
+++ b/games/yae/patches/defaultmasterdisk.diff
@@ -0,0 +1,11 @@
+diff -Naur yae-0.7/main.c yae-0.7.patched/main.c
+--- yae-0.7/main.c 2007-04-03 17:48:36.000000000 -0400
++++ yae-0.7.patched/main.c 2013-08-28 19:20:59.000000000 -0400
+@@ -95,6 +95,7 @@
+ processOptions(argc,argv);
+
+ /* mount disks */
++ if (optind == argc) disk_name[6][0]="/usr/share/yae/Master.dsk";
+ if (optind<argc) disk_name[6][0]=argv[optind++];
+ if (optind<argc) disk_name[6][1]=argv[optind++];
+ if (optind<argc) disk_name[5][0]=argv[optind++];
diff --git a/games/yae/patches/defaultromlocation.diff b/games/yae/patches/defaultromlocation.diff
new file mode 100644
index 0000000000..ee97a9bbb9
--- /dev/null
+++ b/games/yae/patches/defaultromlocation.diff
@@ -0,0 +1,35 @@
+diff -Naur yae-0.7/disk2.c yae-0.7.patched/disk2.c
+--- yae-0.7/disk2.c 2007-04-03 17:49:22.000000000 -0400
++++ yae-0.7.patched/disk2.c 2013-08-28 19:16:54.000000000 -0400
+@@ -105,8 +105,9 @@
+ FILE *f;
+
+ f = fopen( DiskROM, "rb" );
++ if(!f) f = fopen("/usr/share/yae/DISK.ROM", "rb");
+ if ( !f ) {
+- fprintf( stderr, "Cannot read disk II boot rom %s\n", DiskROM );
++ fprintf( stderr, "Cannot read disk II boot rom %s or /usr/share/yae/DISK.ROM\n", DiskROM );
+ exit(1);
+ }
+ fread( boot_ROM, 1, 256, f );
+diff -Naur yae-0.7/memory.c yae-0.7.patched/memory.c
+--- yae-0.7/memory.c 2007-04-03 17:42:23.000000000 -0400
++++ yae-0.7.patched/memory.c 2013-08-28 19:18:13.000000000 -0400
+@@ -88,10 +88,13 @@
+ MainMemoryROM[i] = amp;
+ }
+
+- if (MachineType < APPLE_IIE)
+- loadROMFile( Apple2ROM );
+- else
+- loadROMFile( Apple2eROM );
++ if (MachineType < APPLE_IIE) {
++ if(loadROMFile( Apple2ROM ) != 0)
++ loadROMFile("/usr/share/yae/APPLE2.ROM");
++ } else {
++ if(loadROMFile( Apple2eROM ) != 0)
++ loadROMFile("/usr/share/yae/APPLE2E.ROM");
++ }
+
+ for( i = 0; i < 8; i++ ) {
+ expansion_slot_read[i] = NULL;
diff --git a/games/yae/patches/disk_selection.diff b/games/yae/patches/disk_selection.diff
new file mode 100644
index 0000000000..ae55d6c340
--- /dev/null
+++ b/games/yae/patches/disk_selection.diff
@@ -0,0 +1,74 @@
+diff -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 2013-08-30 13:36:15.000000000 -0400
+@@ -29,6 +29,8 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <string.h>
++#include <sys/types.h>
++#include <sys/wait.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include <X11/keysym.h>
+@@ -238,13 +240,27 @@
+ XCloseDisplay( dc->display );
+ }
+
++static int kdialog_select_file(char *buffer) {
++ void *i;
++ int s;
++ FILE *kdialog = popen(
++ "kdialog --title 'YAE - Select Disk Image' --getopenfilename . '*.dsk'", "r");
++ if(!kdialog) return -1; /* can't fork() or malloc() probably */
++ i = fgets(buffer, 4096, kdialog);
++ s = WEXITSTATUS(pclose(kdialog));
++ if(s == 127) return -2; /* shell returns this if kdialog not found */
++ return i != NULL; /* returns 0 if user hit cancel, 1 if filename OK */
++}
++
+ void X_check_and_handle_event( void *arg )
+ {
+ DisplayContext *dc;
+ XEvent event;
+- int count;
++ int count, kdresult;
+ BYTE key, Apple_Key();
+- char buffer[256];
++ char buffer[4096] = "\0", *p;
++
++ static int diskname_freeable = 0;
+
+ dc = (DisplayContext*)arg;
+
+@@ -266,15 +282,24 @@
+ /* Should ask which drive, and should
+ * free the existing string if possible - wkt
+ */
+- puts( "Mount new disk\n" );
+- buffer[0] = '\0';
+- fgets( buffer, 256, stdin );
+- if (buffer[0])
+- buffer[strlen( buffer ) - 1 ] = '\0';
++ kdresult = kdialog_select_file(buffer);
++ if(kdresult == 0) {
++ break; /* don't do anything if cancelled */
++ } else if(kdresult < 0) {
++ /* only use stdin if kdialog not found */
++ puts( "Mount new disk\n" );
++ buffer[0] = '\0';
++ fgets( buffer, 256, stdin );
++ }
++ /* remove trailing \n */
++ for(p = buffer; *p; p++)
++ if(*p == '\n') *p = '\0';
++ if(buffer[0] == '\0') break; /* don't use empty filename */
+ /* ctkwan: free previosly allocated string */
+- if( disk_name[6][0]!=NULL)
++ if( diskname_freeable && disk_name[6][0]!=NULL)
+ free( disk_name[6][0] );
+- disk_name[6][0]= strdup(buffer);
++ disk_name[6][0]= strdup(buffer);
++ diskname_freeable = 1;
+ mount_disk(6,0);
+ }
+ break;
diff --git a/games/yae/patches/fix2option.diff b/games/yae/patches/fix2option.diff
new file mode 100644
index 0000000000..d1038f0be6
--- /dev/null
+++ b/games/yae/patches/fix2option.diff
@@ -0,0 +1,11 @@
+diff -Naur yae-0.7/main.c yae-0.7.patched/main.c
+--- yae-0.7/main.c 2007-04-03 17:48:36.000000000 -0400
++++ yae-0.7.patched/main.c 2013-08-28 14:35:12.000000000 -0400
+@@ -70,6 +70,7 @@
+ while((c=getopt(argc,argv,Options))!= EOF) {
+ switch(c) {
+ case '2':
++ MachineType=APPLE_II;
+ break;
+ case 'e':
+ MachineType=APPLE_IIE;
diff --git a/games/yae/slack-desc b/games/yae/slack-desc
new file mode 100644
index 0000000000..8c15fb1fdf
--- /dev/null
+++ b/games/yae/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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+yae: yae (Yet another Apple Emulator)
+yae:
+yae: Emulates the 8-bit Apple II, II+, and //e computers.
+yae:
+yae: This is an older emulator without a lot of fancy features.
+yae:
+yae: The package includes the ROM images and an Apple DOS 3.3 disk image.
+yae:
+yae:
+yae:
+yae:
diff --git a/games/yae/yae.1 b/games/yae/yae.1
new file mode 100644
index 0000000000..41aedfacb2
--- /dev/null
+++ b/games/yae/yae.1
@@ -0,0 +1,220 @@
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.20)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'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
+.\" 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"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "YAE 1"
+.TH YAE 1 "2013-08-29" "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
+.nh
+.SH "NAME"
+yae \- Yet another Apple Emulator
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\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,
+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.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\-2" 4
+.IX Item "-2"
+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
+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
+.IX Item "-e"
+Emulate the Apple //e (the default).
+.SH "KEYSTROKES"
+.IX Header "KEYSTROKES"
+.IP "Backspace" 4
+.IX Item "Backspace"
+Alias for the left-arrow key.
+.IP "Control+Delete" 4
+.IX Item "Control+Delete"
+Apple Reset key.
+.IP "Left Alt" 4
+.IX Item "Left Alt"
+The left (open) apple key on the //e keyboard.
+.IP "Right Alt" 4
+.IX Item "Right Alt"
+The right (closed) apple key on the //e keyboard.
+.IP "F1" 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
+.IX Item "F2"
+Exit the emulator immediately. No confirmation dialog, so
+be careful.
+.PP
+All other keystrokes are translated to their equivalent Apple \s-1II\s0
+keystrokes, or ignored if there is no equivalent key on the Apple
+keyboard.
+.SH "FILES"
+.IX Header "FILES"
+.IP "\fB.yaerc\fR, \fB~/.yaerc\fR" 4
+.IX Item ".yaerc, ~/.yaerc"
+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
+.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
+required.
+.Sp
+\&\s-1ROM\s0 file locations can be set in the config file. By default, they're
+searched for in the current directory. If the ROMs can't be found in
+the configured location or the current directory, they will searched
+for in \fI/usr/share/yae\fR.
+.Sp
+If the required \s-1ROM\s0 files can't be found, the emulator will refuse
+to start.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fBkegs\fR(1), \fBdos33fsutils\fR(1)
+.SH "AUTHORS"
+.IX Header "AUTHORS"
+\&\fByae\fR was originally written by Doug Kwan, and includes enhancements by
+Warren Toomey. The version documented here also has some small bugfixes
+and enhancements by B. Watson.
+.PP
+This man page was written by B. Watson.
diff --git a/games/yae/yae.SlackBuild b/games/yae/yae.SlackBuild
new file mode 100644
index 0000000000..60f492aa1b
--- /dev/null
+++ b/games/yae/yae.SlackBuild
@@ -0,0 +1,149 @@
+#!/bin/sh
+
+# Slackware build script for yae
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=yae
+VERSION=${VERSION:-0.7}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tgz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+
+# Diverging from standard boilerplate here due to annoying permissions in
+# upstream tarball. SBo admins, please don't "fix" this, it's for a reason.
+find . \
+ -type d \
+ -exec chmod 755 {} \; -o \
+ -type f \
+ -exec chmod 644 {} \;
+
+# This is old code with lots of bugs, sorry about all the patches.
+
+# Fix the -2 option so it actually starts apple II emulation.
+patch -p1 < $CWD/patches/fix2option.diff
+
+# Allow 'MachineType II' in .yaerc
+patch -p1 < $CWD/patches/confile_apple2.diff
+
+# Use kdialog for disk selection.
+# Also stop trying to free() the disk name passed in argv.
+patch -p1 < $CWD/patches/disk_selection.diff
+
+# If no disk images given on command line, use Master.dsk. This is because
+# the emulator has a bug where it hangs if disk boot fails. Actually it
+# isn't a bug: it's taking forever to time out, the same way a real Apple
+# would, if you booted from disk with no disk in the drive.
+patch -p1 < $CWD/patches/defaultmasterdisk.diff
+
+# If ROMs not found either in current dir or .yaerc configured location,
+# fall back to /usr/share/yae/*.ROM. This allows us to include ROMs in
+# this package, which Just Work instead of requiring user configuration.
+patch -p1 < $CWD/patches/defaultromlocation.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
+# other less-obvious problems with 64-bit, please let me know if
+# you find any.
+if [ "$LIBDIRSUFFIX" = "64" ]; then
+ patch -p1 < $CWD/patches/64.diff
+ sed -i 's,unsigned *long,unsigned int,g' scanline*.c
+fi
+
+# distributed configure script is too darn old
+rm -f config.sub config.guess configure
+cp /usr/share/libtool/config/config.sub .
+autoreconf -if
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+
+# no install target
+mkdir -p $PKG/usr/bin
+install -s -m0755 apple2 $PKG/usr/bin/$PRGNAM
+
+# man page written for this build. If you want to modify it, use yae.pod,
+# don't edit yae.1 directly.
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+
+# ROMs. Master.dsk is the same as what's distributed with linapple.
+# The others are renamed copies of stuff from asimov. Probably not legal
+# to distribute for copyright reasons, but ftp.asimov.net has had this stuff
+# available for maybe 15 years and nobody's complained yet.
+tar xvf $CWD/$PRGNAM-roms.tar.gz
+mkdir -p $PKG/usr/share/$PRGNAM
+install -m0644 -oroot -groot \
+ $PRGNAM-roms/*.ROM $PRGNAM-roms/*.dsk \
+ $PKG/usr/share/$PRGNAM
+
+# Sample config file, created for this build (upstream's docs say there's
+# one included with the src, but there isn't).
+cat $CWD/${PRGNAM}rc.sample > $PKG/usr/share/$PRGNAM/${PRGNAM}rc.sample
+
+# .desktop created for this build
+mkdir -p $PKG/usr/share/applications
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+
+# icon created for this build, based on
+# http://www.callapple.org/soft/images/icons/apple.gif
+mkdir -p $PKG/usr/share/pixmaps
+cat $CWD/$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
+cp -a README* Readme* ChangeLog *.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/games/yae/yae.desktop b/games/yae/yae.desktop
new file mode 100644
index 0000000000..e2b04ee7fe
--- /dev/null
+++ b/games/yae/yae.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=YAE
+Comment=Apple II Emulator
+StartupNotify=true
+Exec=yae
+Icon=yae
+Terminal=false
+Type=Application
+Categories=System;
diff --git a/games/yae/yae.info b/games/yae/yae.info
new file mode 100644
index 0000000000..33e30de0a6
--- /dev/null
+++ b/games/yae/yae.info
@@ -0,0 +1,12 @@
+PRGNAM="yae"
+VERSION="0.7"
+HOMEPAGE="http://sourceforge.net/projects/yae-gpl/"
+DOWNLOAD="http://downloads.sourceforge.net/project/yae-gpl/yae-gpl/yae-0.7/yae-0.7.tgz \
+ http://urchlay.naptime.net/~urchlay/src/yae-roms.tar.gz"
+MD5SUM="4c8b1d40f1ad7dc451f3679466d9e6cf \
+ e816c4e83cf302030dc2da8d84ab745b"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/games/yae/yae.png b/games/yae/yae.png
new file mode 100644
index 0000000000..0df8b45369
--- /dev/null
+++ b/games/yae/yae.png
Binary files differ
diff --git a/games/yae/yae.pod b/games/yae/yae.pod
new file mode 100644
index 0000000000..dbb72b976e
--- /dev/null
+++ b/games/yae/yae.pod
@@ -0,0 +1,122 @@
+# pod2man -r0.7 -s1 --stderr -cyae yae.pod > yae.1
+
+=pod
+
+=head1 NAME
+
+B<yae> - Yet another Apple Emulator
+
+=head1 SYNOPSIS
+
+B<yae> [-2|-e|-+] [disk-image] ...
+
+=head1 DESCRIPTION
+
+B<yae> emulates the Apple II, II+, and //e 8-bit computers from Apple,
+Inc. Standard .dsk images are supported. If B<yae> is run without any
+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.
+
+=head1 OPTIONS
+
+=over
+
+=item -2
+
+Emulate the Apple II.
+
+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 -+
+
+Emulate the Apple II+.
+
+=item -e
+
+Emulate the Apple //e (the default).
+
+=back
+
+=head1 KEYSTROKES
+
+=over
+
+=item Backspace
+
+Alias for the left-arrow key.
+
+=item Control+Delete
+
+Apple Reset key.
+
+=item Left Alt
+
+The left (open) apple key on the //e keyboard.
+
+=item Right Alt
+
+The right (closed) apple key on the //e keyboard.
+
+=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.
+
+=item F2
+
+Exit the emulator immediately. No confirmation dialog, so
+be careful.
+
+=back
+
+All other keystrokes are translated to their equivalent Apple II
+keystrokes, or ignored if there is no equivalent key on the Apple
+keyboard.
+
+=head1 FILES
+
+=over
+
+=item B<.yaerc>, B<~/.yaerc>
+
+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
+
+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
+required.
+
+ROM file locations can be set in the config file. By default, they're
+searched for in the current directory. If the ROMs can't be found in
+the configured location or the current directory, they will searched
+for in I</usr/share/yae>.
+
+If the required ROM files can't be found, the emulator will refuse
+to start.
+
+=back
+
+=head1 SEE ALSO
+
+B<kegs>(1), B<dos33fsutils>(1)
+
+=head1 AUTHORS
+
+B<yae> was originally written by Doug Kwan, and includes enhancements by
+Warren Toomey. The version documented here also has some small bugfixes
+and enhancements by B. Watson.
+
+This man page was written by B. Watson.
diff --git a/games/yae/yaerc.sample b/games/yae/yaerc.sample
new file mode 100644
index 0000000000..54264659d1
--- /dev/null
+++ b/games/yae/yaerc.sample
@@ -0,0 +1,69 @@
+# Sample .yaerc file for yae apple emulator.
+
+# Comments (like this one) begin with a hash
+# Non-comment lines are key and value, separated by whitespace.
+
+### ROM image files
+
+# These can be absolute paths, otherwise they're searched for in the current
+# directory. No matter what's defined here, the emulator will always fall
+# back to looking for DISK.ROM and either APPLE2.ROM or APPLE2E.ROM in
+# /usr/share/yae, if the files defined here can't be found.
+
+#Apple2ROM APPLE2.ROM
+#Apple2eROM APPLE2E.ROM
+#DiskROM DISK.ROM
+
+### Disk image files
+
+# 4 drives are emulated. The emulated Apple boots from Slot 6, Drive 1.
+# Again, filenames can be absolute paths, or in the current
+# directory. As a fallback, yae will use /usr/share/yae/Master.dsk if
+# nothing is defined here, or if the DiskS6D1 file can't be found.
+
+#DiskS6D1 /usr/share/yae/Master.dsk
+#DiskS6D2 /some/other.dsk
+#DiskS5D1 /some/other.dsk
+#DiskS5D2 /some/other.dsk
+
+### Printer emulation
+
+# By default, anything sent to slot 1 (the standard way to print on Apples)
+# will be echoed to standard output. If Printer is set here, slot 1's output
+# will go to the named file instead.
+
+#Printer yae_output.txt
+
+### Machine type
+
+# 3 machine types are supported:
+
+# II - Original Apple II (aka ][)
+# II+ - Apple II+ (added hi res graphics and bank-switched RAM)
+# IIe - Apple //e (added lowercase and 80 columns)
+
+# If nothing is defined here, the default is IIe. This setting can be
+# overridden by the -2, -+, or -e command-line options. Note that
+# the emulator uses the same ROM for II and II+, so the emulated II will
+# have Applesoft and autostart (which the original II didn't ship with).
+
+#MachineType IIe
+
+### Misc options
+
+# Default emulated CPU speed (in Hz, apparently). The emulator tries to
+# maintain this speed, but may slow down on loaded systems.
+
+#Speed 1022727
+
+# Which set of MouseText characters to use, when emulating the IIe/IIc.
+# The original version had characters FG as a "running man" glyph, and the
+# newer (IIgs only?) revision has a j-shaped left arrow and some horizontal
+# lines instead. Can be set to FALSE (the default) or TRUE.
+
+#RunningMan FALSE
+
+# Use X11 shared memory to speed up display? Can be set to TRUE (default)
+# or FALSE.
+
+#UseXShm TRUE