summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2015-06-24 16:34:25 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-06-28 11:49:20 +0700
commitdfec940e0028db00f9fdf059c7d2c208d908b541 (patch)
treee0e45810ac8244fca5e98bfbefe438661902fb96
parentbbaae0b2947a34a69078ceb22d14e25e2e4f138d (diff)
downloadslackbuilds-dfec940e0028db00f9fdf059c7d2c208d908b541.tar.gz
system/kegs: Fix audio issues.
-rw-r--r--system/kegs/README24
-rw-r--r--system/kegs/README.Slackware51
-rw-r--r--system/kegs/allow_sound_open_fail.diff15
-rw-r--r--system/kegs/kegs.SlackBuild17
-rw-r--r--system/kegs/kegs.desktop2
5 files changed, 85 insertions, 24 deletions
diff --git a/system/kegs/README b/system/kegs/README
index 3ca724b3f3..c16490b6c7 100644
--- a/system/kegs/README
+++ b/system/kegs/README
@@ -5,25 +5,5 @@ IIgs was the most powerful computer in the Apple II line. It first was
sold in 1986. An Apple IIgs has the capability to run almost all Apple
II, Apple IIe, and Apple IIc programs.
-KEGS requires a ROM image dumped from an Apple IIgs. This will typically
-be called either "rom01" (131072 bytes) or "rom03" (262144 bytes),
-and will often be distributed in zip files called apple2g1.zip and
-apple2gs.zip (for use with MESS). This package can optionally include
-the ROM file. To do this, place the ROM image in the slackbuild
-directory before running the script. The image will be installed
-as /usr/share/kegs/rom03 (or rom01). If you do not include the ROM
-in the package, you will need to manually copy the rom03 image to
-/usr/share/kegs/rom03 before the emulator will work properly.
-
-Optional dependency: If you intend to run Apple's GS/OS in
-the emulator, you will need macutils to extract the .sea.bin
-archives from Apple's website. Download disk image(s) from
-http://www.info.apple.com/support/oldersoftwarelist.html and then
-run e.g.:
-
-$ macunpack -d Disk_2_of_7-System.Disk.sea.bin
-$ mv Disk_2_of_7-System.Disk.data system_disk.dsk
-
-Mount system_disk.dsk on slot 5 using the config menu within xkegs,
-set slot 5 as the default startup device in the IIgs control panel,
-and you should be booting into the IIgs native GUI environment.
+See README.Slackware for information about ROM images, audio, and
+disk images.
diff --git a/system/kegs/README.Slackware b/system/kegs/README.Slackware
new file mode 100644
index 0000000000..03e0ebf940
--- /dev/null
+++ b/system/kegs/README.Slackware
@@ -0,0 +1,51 @@
+ROM Images
+==========
+
+KEGS requires a ROM image dumped from an Apple IIgs. This will typically
+be called either "rom01" (131072 bytes) or "rom03" (262144 bytes),
+and will often be distributed in zip files called apple2g1.zip and
+apple2gs.zip (for use with MESS). This package can optionally include
+the ROM file. To do this, place the ROM image in the slackbuild
+directory before running the script. The image will be installed
+as /usr/share/kegs/rom03 (or rom01). If you do not include the ROM
+in the package, you will need to manually copy the rom03 image to
+/usr/share/kegs/rom03 before the emulator will work properly.
+
+Audio
+=====
+
+kegs uses OSS for audio. To get sound working, you have 3 options:
+
+1. Run kegs as "aoss xkegs", or launch it from your desktop's application
+ menu (which does the same thing).
+
+2. Enable ALSA OSS emulation:
+ # chmod +x /etc/rc.d/rc.alsa-oss
+ # /etc/rc.d/rc.alsa-oss
+
+ However, this may interfere with other applications' use of the
+ sound card.
+
+3. If you already use OSSv4 (audio/oss from slackbuilds.org), kegs
+ should be able to use it. It's not recommended to switch to OSSv4
+ just to get audio working in kegs, though.
+
+GS/OS Disk Images
+=================
+
+If you intend to run Apple's GS/OS in the emulator, you will need
+macutils to extract the .sea.bin archives. Download disk image(s) from
+one of the sites listed below and then run e.g.:
+
+$ macunpack -d Disk_2_of_7-System.Disk.sea.bin
+$ mv Disk_2_of_7-System.Disk.data system_disk.dsk
+
+Mount system_disk.dsk on slot 5 using the config menu within xkegs,
+set slot 5 as the default startup device in the IIgs control panel,
+and you should be booting into the IIgs native GUI environment.
+
+The GS/OS disk images used to be hosted on Apple's site, but have been
+removed. They can be found on various archive sites, including:
+
+ftp://ftp.muleslow.net/apple2/
+http://mirrors.apple2.org.za/ftp.info.apple.com/Apple_IIGS_System_6.0.1/
diff --git a/system/kegs/allow_sound_open_fail.diff b/system/kegs/allow_sound_open_fail.diff
new file mode 100644
index 0000000000..bf9086f72d
--- /dev/null
+++ b/system/kegs/allow_sound_open_fail.diff
@@ -0,0 +1,15 @@
+diff -Naur kegs.0.91/src/sound.c kegs.0.91.patched/src/sound.c
+--- kegs.0.91/src/sound.c 2004-12-06 19:42:47.000000000 -0500
++++ kegs.0.91.patched/src/sound.c 2015-06-21 17:48:21.000000000 -0400
+@@ -363,9 +363,9 @@
+
+ ret = read(read_fd, &tmp, 4);
+ if(ret != 4) {
+- printf("parent dying, could not get sample rate from child\n");
++ printf("parent could not get audio sample rate from child, disabling sound.\n");
+ printf("ret: %d, fd: %d errno:%d\n", ret, read_fd, errno);
+- exit(1);
++ g_audio_enable = 0;
+ }
+ close(read_fd);
+
diff --git a/system/kegs/kegs.SlackBuild b/system/kegs/kegs.SlackBuild
index 1fc527abe8..b4ef498172 100644
--- a/system/kegs/kegs.SlackBuild
+++ b/system/kegs/kegs.SlackBuild
@@ -6,9 +6,16 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20150621 bkw: bump BUILD to 2
+# - fix link to GS/OS images in README
+# - split up huge README, move most of it to README.Slackware
+# - add allow_sound_open_fail.diff
+# - add instructions on getting OSS audio to work on modern Slack
+# - "Exec=aoss xkegs" in .desktop file
+
PRGNAM=kegs
VERSION=${VERSION:-0.91}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -55,6 +62,14 @@ find -L . \
# I've sent this upstream, maybe it'll get integrated in future versions.
patch -p1 < $CWD/allow_window_close.diff
+# Matthew Miller pointed out this patch to me. Since kegs uses OSS for
+# audio, and modern Slackware has ALSA OSS emulation disabled by default,
+# sound won't work unless xkegs is run via aoss, or OSS modules are
+# loaded. This patch allows the emulator to start with sound disabled if
+# it can't open the OSS audio device (instead of it being a fatal error).
+# I've also updated the README to explain how to get audio to work.
+patch -p1 < $CWD/allow_sound_open_fail.diff
+
cd src
rm -f vars
ln -s vars_x86linux vars
diff --git a/system/kegs/kegs.desktop b/system/kegs/kegs.desktop
index bf2b147dce..229dc9fe7d 100644
--- a/system/kegs/kegs.desktop
+++ b/system/kegs/kegs.desktop
@@ -3,7 +3,7 @@ Version=1.0
Name=KEGS
GenericName=Apple IIgs Emulator
Type=Application
-Exec=xkegs
+Exec=aoss xkegs
Icon=kegs
Terminal=true
StartupNotify=false