From 6cb808c8bb85984ad0d9c565ec55185cc965f0d0 Mon Sep 17 00:00:00 2001 From: B. Watson Date: Sat, 27 Feb 2021 18:48:42 -0500 Subject: system/kegs: Updated for version 1.05. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- system/kegs/README.Slackware | 35 +++---- system/kegs/allow_sound_open_fail.diff | 15 --- system/kegs/allow_window_close.diff | 63 ++++++------ system/kegs/config.kegs.default | 2 +- system/kegs/doinst.sh | 6 ++ system/kegs/icons/128.png | Bin 0 -> 40005 bytes system/kegs/icons/16.png | Bin 0 -> 941 bytes system/kegs/icons/32.png | Bin 0 -> 3067 bytes system/kegs/icons/48.png | Bin 0 -> 6483 bytes system/kegs/kegs.SlackBuild | 100 ++++++++++--------- system/kegs/kegs.desktop | 4 +- system/kegs/kegs.info | 8 +- system/kegs/kegs.png | Bin 40005 -> 0 bytes system/kegs/makevars/vars.alsa | 7 ++ system/kegs/makevars/vars.oss | 7 ++ system/kegs/makevars/vars.pulse | 7 ++ system/kegs/man/partls.1 | 23 +++++ system/kegs/man/to_pro.1 | 55 +++++++++++ system/kegs/man/xkegs.1 | 175 ++++++++++++++++++++++++++++++++ system/kegs/partls.1 | 23 ----- system/kegs/slack-desc | 2 +- system/kegs/to_pro.1 | 55 ----------- system/kegs/xkegs.1 | 176 --------------------------------- system/kegs/xkegs.sh | 7 +- 24 files changed, 391 insertions(+), 379 deletions(-) delete mode 100644 system/kegs/allow_sound_open_fail.diff create mode 100644 system/kegs/icons/128.png create mode 100644 system/kegs/icons/16.png create mode 100644 system/kegs/icons/32.png create mode 100644 system/kegs/icons/48.png delete mode 100644 system/kegs/kegs.png create mode 100644 system/kegs/makevars/vars.alsa create mode 100644 system/kegs/makevars/vars.oss create mode 100644 system/kegs/makevars/vars.pulse create mode 100644 system/kegs/man/partls.1 create mode 100644 system/kegs/man/to_pro.1 create mode 100644 system/kegs/man/xkegs.1 delete mode 100644 system/kegs/partls.1 delete mode 100644 system/kegs/to_pro.1 delete mode 100644 system/kegs/xkegs.1 diff --git a/system/kegs/README.Slackware b/system/kegs/README.Slackware index 03e0ebf940..7a66ba8fb8 100644 --- a/system/kegs/README.Slackware +++ b/system/kegs/README.Slackware @@ -1,34 +1,23 @@ 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. +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 includes the +"rom03" file. If you want to also use the older ROM01 file, copy it to +/usr/share/kegs after the package is installed, and select it from the +config menu (F4) or edit the path in ~/.config.kegs. Audio ===== -kegs uses OSS for audio. To get sound working, you have 3 options: +As of version 1.05, kegs uses PulseAudio by default. This is the default +in the SlackBuild, so most users won't have to do anything special. -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. +It's also possible to build kegs for OSS audio, or ALSA using the +aoss "shim" layer. To do this, set 'AUDIO=oss' or 'AUDIO=alsa' in the +script's environment. GS/OS Disk Images ================= diff --git a/system/kegs/allow_sound_open_fail.diff b/system/kegs/allow_sound_open_fail.diff deleted file mode 100644 index bf9086f72d..0000000000 --- a/system/kegs/allow_sound_open_fail.diff +++ /dev/null @@ -1,15 +0,0 @@ -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/allow_window_close.diff b/system/kegs/allow_window_close.diff index 538022e044..b1343b2e89 100644 --- a/system/kegs/allow_window_close.diff +++ b/system/kegs/allow_window_close.diff @@ -1,35 +1,36 @@ -diff -Naur kegs.0.91/src/xdriver.c kegs.0.91.patched//src/xdriver.c ---- kegs.0.91/src/xdriver.c 2004-12-06 19:42:47.000000000 -0500 -+++ kegs.0.91.patched//src/xdriver.c 2011-01-27 04:28:42.000000000 -0500 -@@ -57,6 +57,7 @@ - Display *g_display = 0; - Visual *g_vis = 0; - Window g_a2_win; -+Atom g_wmdelete_atom; - GC g_a2_winGC; - XFontStruct *g_text_FontSt; - Colormap g_a2_colormap = 0; -@@ -582,6 +583,9 @@ +diff -Naur kegs.1.05/src/xdriver.c kegs.1.05.patched/src/xdriver.c +--- kegs.1.05/src/xdriver.c 2021-01-24 18:37:34.000000000 -0500 ++++ kegs.1.05.patched/src/xdriver.c 2021-02-25 17:53:28.054595900 -0500 +@@ -629,13 +629,10 @@ 0, &my_winSizeHints, 0, &my_winClassHint); - XMapRaised(g_display, g_a2_win); + XMapRaised(g_display, x_win); + +- if(win_info_ptr != &g_mainwin_info) { +- // Debugger window + win_info_ptr->delete_atom = XInternAtom(g_display, + "WM_DELETE_WINDOW", False); + XSetWMProtocols(g_display, x_win, &(win_info_ptr->delete_atom), + 1); +- } -+ g_wmdelete_atom = XInternAtom(g_display, "WM_DELETE_WINDOW", True); -+ XSetWMProtocols(g_display, g_a2_win, &g_wmdelete_atom, 1); -+ XSync(g_display, False); - g_a2_winGC = XCreateGC(g_display, g_a2_win, 0, (XGCValues *) 0); -@@ -1086,6 +1090,13 @@ - (word32)ev.xcolormap.colormap, - ev.xcolormap.new, ev.xcolormap.state); - break; -+ case ClientMessage: -+ if(ev.xclient.data.l[0] == g_wmdelete_atom) { -+ x_auto_repeat_on(1); -+ XCloseDisplay(g_display); -+ exit(0); -+ } -+ break; - default: - printf("X event 0x%08x is unknown!\n", - ev.type); +@@ -1092,9 +1089,15 @@ + case ClientMessage: + win_info_ptr = x_find_xwin(ev.xclient.window); + if(ev.xclient.data.l[0] == win_info_ptr->delete_atom) { +- // This is a WM_DELETE_WINDOW event +- // Just unmap the window +- win_info_ptr->kimage_ptr->active = 0; ++ if(win_info_ptr == &g_debugwin_info) { ++ // This is a WM_DELETE_WINDOW event ++ // Just unmap the window ++ win_info_ptr->kimage_ptr->active = 0; ++ } else { ++ x_auto_repeat_on(1); ++ XCloseDisplay(g_display); ++ exit(0); ++ } + } else { + printf("unknown ClientMessage\n"); + } diff --git a/system/kegs/config.kegs.default b/system/kegs/config.kegs.default index 782bfb8f3a..4408cee760 100644 --- a/system/kegs/config.kegs.default +++ b/system/kegs/config.kegs.default @@ -8,4 +8,4 @@ s6d2 = s7d1 = #NUCLEUS03 -g_cfg_rom_path = @ROM@ +g_cfg_rom_path = /usr/share/kegs/rom03 diff --git a/system/kegs/doinst.sh b/system/kegs/doinst.sh index 5fb28930db..f6a957d203 100644 --- a/system/kegs/doinst.sh +++ b/system/kegs/doinst.sh @@ -1,3 +1,9 @@ +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 + 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/system/kegs/icons/128.png b/system/kegs/icons/128.png new file mode 100644 index 0000000000..578329931f Binary files /dev/null and b/system/kegs/icons/128.png differ diff --git a/system/kegs/icons/16.png b/system/kegs/icons/16.png new file mode 100644 index 0000000000..7dbbef05e5 Binary files /dev/null and b/system/kegs/icons/16.png differ diff --git a/system/kegs/icons/32.png b/system/kegs/icons/32.png new file mode 100644 index 0000000000..15b49662ca Binary files /dev/null and b/system/kegs/icons/32.png differ diff --git a/system/kegs/icons/48.png b/system/kegs/icons/48.png new file mode 100644 index 0000000000..7caf94efd2 Binary files /dev/null and b/system/kegs/icons/48.png differ diff --git a/system/kegs/kegs.SlackBuild b/system/kegs/kegs.SlackBuild index 79883b8daa..851b036d01 100644 --- a/system/kegs/kegs.SlackBuild +++ b/system/kegs/kegs.SlackBuild @@ -6,6 +6,15 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20210225 bkw: update for v1.05. lots of changes: +# - include the ROM image in the package (add it to DOWNLOAD) +# - allow_sound_open_fail.diff no longer required +# - rework allow_window_close.diff for v1.05 +# - .desktop file no longer needs Terminal=true +# - upstream now supports pulseaudio, so build with it by default. add +# AUDIO variable to build the old OSS sound support or ALSA via aoss +# instead. + # 20170305 bkw: # - fix building under installwatch, caused by a symlink in the # tarball being listed before its target Why does this choke @@ -19,8 +28,8 @@ # - "Exec=aoss xkegs" in .desktop file PRGNAM=kegs -VERSION=${VERSION:-0.91} -BUILD=${BUILD:-2} +VERSION=${VERSION:-1.05} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -48,45 +57,48 @@ fi set -e +AUDIO=${AUDIO:-pulse} +VARS=$CWD/makevars/vars.$AUDIO + +if [ ! -e $VARS ]; then + echo -n "*** AUDIO=\"$AUDIO\" not supported. Use one of: " 1>&2 + list="$( ls -1 $CWD/makevars/vars.* | cut -d. -f2 )" + echo $list 1>&2 + exit 1 +fi + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM.$VERSION -tar xvf $CWD/$PRGNAM.$VERSION.tar.gz --exclude vars +tar xvf $CWD/$PRGNAM.$VERSION.tar.gz \ + --exclude '*/KEGSMAC.app' \ + --exclude xkegs cd $PRGNAM.$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# device name for joysticks has changed for the 21st century. +sed -i 's,/dev/js,/dev/input/js,' src/joystick_driver.c # xkegs refuses to close (close button greyed-out by window manager). # Small patch by SlackBuild author fixes this large annoyance (which is # extra-annoying because there's also no Quit option in the kegs menu). # I've sent this upstream, maybe it'll get integrated in future versions. +# 20210225 bkw: Years later. Patch had to change for 1.05. The README +# for kegs *actually says* you can close the main KEGS window to quit, +# *and you can't fucking close it* without this patch. Apologies if I +# sound a bit strident, but... 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 -make CCOPTS="$SLKCFLAGS" x$PRGNAM to_pro partls +cat $VARS > vars +make SLKCFLAGS="$SLKCFLAGS" x$PRGNAM to_pro partls cd - # No install target, just stick it all where it goes. -# The icon was converted from the Mac OSX icon with icns2png. -# The .desktop has 'Terminal=true' because xkegs *really* wants -# to be started from a terminal (the debugger uses stdio, and -# is too easy to accidentally enter by center-clicking the window). - mkdir -p \ $PKG/usr/bin \ $PKG/usr/libexec \ @@ -97,12 +109,26 @@ mkdir -p \ install -s -m0755 x$PRGNAM $PKG/usr/libexec/ install -s -m0755 src/to_pro src/partls $PKG/usr/bin/ install -m0755 $CWD/x$PRGNAM.sh $PKG/usr/bin/x$PRGNAM -install -m0644 $CWD/$PRGNAM.png $PKG/usr/share/pixmaps/ install -m0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/ +install -m0644 $CWD/config.$PRGNAM.default $PKG/usr/share/$PRGNAM + +# The icons were converted from the Mac OSX icon with icns2png. +for i in 16 32 48 128; do + idir=$PKG/usr/share/icons/hicolor/${i}x${i}/apps + mkdir -p $idir + cat $CWD/icons/$i.png > $idir/$PRGNAM.png +done + +# old-style icon (e.g. windowmaker, fvwm2) +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + +# Include the ROM image in the package. It's been available on the +# asimov site for at least 20 years now, Apple has never complained. +unzip -p $CWD/gsrom03.zip > $PKG/usr/share/$PRGNAM/rom03 # Man pages are specific to the SlackBuild, though I've sent # them upstream for consideration. -for file in $CWD/*.1; do +for file in $CWD/man/*.1; do sed "s/@VERSION@/$VERSION/g" $file \ | gzip -9c \ > $PKG/usr/man/man1/$( basename $file ).gz @@ -113,34 +139,12 @@ done ln -s x$PRGNAM.1.gz $PKG/usr/man/man1/$PRGNAM.1.gz ln -s x$PRGNAM $PKG/usr/bin/$PRGNAM -# Handle the ROM image, if we find it. Filenames are listed in -# reverse order of preference. -for file in ROM01 rom01 ROM03 rom03; do - if [ -e "$CWD/$file" ]; then - ROMFILE="$CWD/$file" - fi -done - -if [ -e "$ROMFILE" ]; then - ROMNAME="$( basename "$ROMFILE" )" - install -m0644 "$ROMFILE" $PKG/usr/share/$PRGNAM -else - # We don't have a ROM, so we don't include one in the package, but we - # do still set the path to /usr/share/kegs/rom03 in the config file, - # so all the user has to do is copy the ROM there later. - ROMNAME=rom03 -fi - -sed "s,@ROM@,/usr/share/$PRGNAM/$ROMNAME," \ - < $CWD/config.$PRGNAM.default \ - > $PKG/usr/share/$PRGNAM/config.$PRGNAM.default - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION install -m0644 *.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 +sed "s,@AUDIO@,$AUDIO," $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG diff --git a/system/kegs/kegs.desktop b/system/kegs/kegs.desktop index 229dc9fe7d..3339d2bafa 100644 --- a/system/kegs/kegs.desktop +++ b/system/kegs/kegs.desktop @@ -3,8 +3,8 @@ Version=1.0 Name=KEGS GenericName=Apple IIgs Emulator Type=Application -Exec=aoss xkegs +Exec=xkegs Icon=kegs -Terminal=true +Terminal=false StartupNotify=false Categories=Game;Emulator; diff --git a/system/kegs/kegs.info b/system/kegs/kegs.info index db8446cf08..937cf787c0 100644 --- a/system/kegs/kegs.info +++ b/system/kegs/kegs.info @@ -1,8 +1,10 @@ PRGNAM="kegs" -VERSION="0.91" +VERSION="1.05" HOMEPAGE="http://kegs.sourceforge.net/" -DOWNLOAD="http://kegs.sourceforge.net/kegs.0.91.tar.gz" -MD5SUM="ec3967d3276bb3d1dd601c7b8f750df5" +DOWNLOAD="http://kegs.sourceforge.net/kegs.1.05.tar.gz \ + https://mirrors.apple2.org.za/ftp.apple.asimov.net/emulators/rom_images/gsrom03.zip" +MD5SUM="b7f0452bf173eecdfadf9a82c4f75bea \ + 029ebd31845614636f6a34a19730cd57" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/system/kegs/kegs.png b/system/kegs/kegs.png deleted file mode 100644 index 578329931f..0000000000 Binary files a/system/kegs/kegs.png and /dev/null differ diff --git a/system/kegs/makevars/vars.alsa b/system/kegs/makevars/vars.alsa new file mode 100644 index 0000000000..c8eb5b26aa --- /dev/null +++ b/system/kegs/makevars/vars.alsa @@ -0,0 +1,7 @@ +TARGET = xkegs +OBJECTS1 = xdriver.o +CCOPTS = $(SLKCFLAGS) +NAME = xkegs +LD = $(CC) +EXTRA_LIBS = -lXext -laoss +EXTRA_SPECIALS = diff --git a/system/kegs/makevars/vars.oss b/system/kegs/makevars/vars.oss new file mode 100644 index 0000000000..e71940cd21 --- /dev/null +++ b/system/kegs/makevars/vars.oss @@ -0,0 +1,7 @@ +TARGET = xkegs +OBJECTS1 = xdriver.o +CCOPTS = $(SLKCFLAGS) +NAME = xkegs +LD = $(CC) +EXTRA_LIBS = -lXext +EXTRA_SPECIALS = diff --git a/system/kegs/makevars/vars.pulse b/system/kegs/makevars/vars.pulse new file mode 100644 index 0000000000..8521ec9b6f --- /dev/null +++ b/system/kegs/makevars/vars.pulse @@ -0,0 +1,7 @@ +TARGET = xkegs +OBJECTS1 = pulseaudio_driver.o xdriver.o +CCOPTS = $(SLKCFLAGS) -DPULSE_AUDIO +NAME = xkegs +LD = $(CC) +EXTRA_LIBS = -lXext -lpulse +EXTRA_SPECIALS = diff --git a/system/kegs/man/partls.1 b/system/kegs/man/partls.1 new file mode 100644 index 0000000000..1af148532b --- /dev/null +++ b/system/kegs/man/partls.1 @@ -0,0 +1,23 @@ +.TH PARTLS "1" "January 2011" "SlackBuilds.org" "User Commands" +.SH NAME +partls \- Lists partitions on Apple\-partitioned hard drives or CD-ROMs +.SH SYNOPSIS +.B partls +<\fI-l\fR> +[\fIfile-or-device\fR] +.SH DESCRIPTION +partls is distributed with the KEGS emulator. +.PP +partls displays the partition table on an Apple\-partitioned disk or +disk image file. Generally, these partitions will use the Apple HFS filesystem. +.PP +With the \fB\-l\fR option, more information is displayed. +.SH SEE ALSO +xkegs(1) +.br +to_pro(1) +.SH AUTHORS +KEGS and partls are by Kent Dickey . +.PP +This manual page was written by B. Watson for the SlackBuilds.org project (but +may be used by anyone for any reason). diff --git a/system/kegs/man/to_pro.1 b/system/kegs/man/to_pro.1 new file mode 100644 index 0000000000..a58fada52d --- /dev/null +++ b/system/kegs/man/to_pro.1 @@ -0,0 +1,55 @@ +.TH TO_PRO "1" "January 2011" "SlackBuilds.org" "User Commands" +.SH NAME +to_pro \- creates and copies files to Apple ProDOS disk images +.SH SYNOPSIS +.B to_pro +[\fI-size\fR] +[\fIfile\fR] +<\fIfile\fR ...> +.SH DESCRIPTION +to_pro is intended for use with the KEGS emulator. +.PP +to_pro creates a new ProDOS disk image called POOF1 in the current +directory, of the given size, containing the specified file(s). At +least one file must be given (to_pro cannot create a completely blank +image), and up to 51 file arguments are allowed. +.PP +The size argument is in kilobytes (1024 bytes each), and must be larger than the total size of +all the files (no checking is done, it's up to the user). ProDOS has a limit +of 32MB per partition, so the \-size argument should always less than +32767. +.PP +Long UNIX filenames are truncated to the 15\-character +ProDOS limit. +.PP +The author warns that the generated disk image files should only be used +temporarily, to copy files from the image to another ProDOS disk image +that was formatted within KEGS using ProDOS itself (or, the generated +image may be formatted within KEGS to create a proper blank disk image). +.PP +to_pro automatically sets the ProDOS filetype of files ending in ".shk" +to $E0. +.SH EXAMPLES +.TP +to_pro \-800 wolfdemo.bxy +Creates an 800KB disk image called POOF1, containing the file "wolfdemo.bxy" +(which is likely an Apple IIgs archive, downloaded from an FTP or web site). +Probably the next thing you will do be "mv POOF1 wolfdemo.dsk". +.TP +to_pro \-4096 wolfdemo.bxy +Same as above, but creates a 4MB POOF1 image file instead. +.TP +to_pro \-32000 *.shk +put all *.shk files in the current Unix directory into a 31.25MB +image called POOF1. +.SH SEE ALSO +xkegs(1) +.br +partls(1) +.PP +More information on to_pro in /usr/doc/kegs\-@VERSION@/README.kegs.txt +.SH AUTHORS +KEGS and to_pro are by Kent Dickey . +.PP +This manual page was written by B. Watson for the SlackBuilds.org project (but +may be used by anyone for any reason). diff --git a/system/kegs/man/xkegs.1 b/system/kegs/man/xkegs.1 new file mode 100644 index 0000000000..eb14f217e6 --- /dev/null +++ b/system/kegs/man/xkegs.1 @@ -0,0 +1,175 @@ +.TH KEGS "1" "January 2011" "SlackBuilds.org" "User Commands" +.SH NAME +xkegs \- Apple IIgs emulator +.SH SYNOPSIS +.B xkegs +[\fI-options\fR] +.SH DESCRIPTION +KEGS (Kent's Emulated GS) +is an Apple IIgs emulator for Mac OS X, Linux, and Win32. The Apple +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. +.PP +xkegs is the KEGS binary, compiled for Linux and X\-Window support. +.PP +This manual page only documents the command\-line options and key mappings. +For the full documentation, see /usr/doc/kegs\-@VERSION@/README.kegs.txt +(and the other files in the same directory). +.PP +\fINote:\fR There is no way to specify disk or ROM images on the command line. +Use the configuration menu (F4) from within the emulator to select images. +.SH OPTIONS +.TP +\fB\-skip\fR \fI[num]\fR +KEGS will "skip" that many screen redraws between refreshes. +\-skip 0 will do 60 frames per second, \-skip 1 will do 30 fps, +\-skip 5 will do 10 fps. +.TP +\fB\-audio\fR \fI[0/1]\fR +Forces audio [off/on]. By default, audio is on unless +the X display is a remote machine or shared memory is off. +This switch can override the default. \-audio 0 causes KEGS to +not fork the background audio process, but Ensoniq emulation +is still 100% accurate, just the sound is not sent to the +workstation speaker. +.TP +\fB\-arate\fR \fI[num]\fR +Forces audio sample rate to \fI[num]\fR. 44100 and 48000 are +usual, you can try 22050 to reduce KEGS's overhead. On a reasonably +fast machine (>250MHz or so), you shouldn't need to mess with this. +.TP +\fB\-dhr140\fR +Will use the old Double\-hires color algorithm that results in +exactly 140 colors across the screen, as opposed to the blending +being done by default. +.TP +\fB\-15\fR +KEGS will only look for a 15\-bit X\-Window display. +.TP +\fB\-16\fR +KEGS will only look for a 16\-bit X\-Window display (not tested, probably + will get red colors wrong). +.TP +\fB\-24\fR +KEGS will only look for a 24\-bit X\-Window display. +.TP +\fB\-display\fR \fI[xdisplay]\fR +Same as setting the environment variable DISPLAY. +Sends X display to \fI[xdisplay]\fR +.TP +\fB\-noshm\fR +KEGS will not try to used shared memory for the X graphics display. +This will make KEGS much slower on graphics\-intensive tasks, +by as much as a factor of 10! By default, \-noshm causes an +effective \-skip of 3 which is 15 fps. You can override this +default by specifying a \-skip explicitly. +.SH KEY BINDINGS +.TP +\fBF1\fR +Alias of Command +.TP +\fBF2\fR +Alias of Option +.TP +\fBF3\fR +Alias of ESC for OS/2 compatibility. +.TP +\fBF4\fR +Configuration Panel +.TP +\fBF6\fR +Toggle through the 4 speeds: +Unlimited, 1MHz, 2.8MHz, 8.0MHz +.TP +\fBShift\-F6\fR +Enter KEGS debugger (can also be done by center\-clicking the mouse on +the xkegs window). +.br +The debugger is X\-based, and runs in a separate window. +.TP +\fBF7\fR +Toggle fast_disk_emul on/off +.TP +\fBF8\fR +Toggle pointer hiding on/off. +.TP +\fBF9\fR +Invert the sense of the joystick. +.TP +\fBShift\-F9\fR +Swap x and y joystick/paddle axes. +.TP +\fBF10\fR +Attempt to change the a2vid_palette (only useful on 256\-color displays) +.TP +\fBF11\fR +Full screen mode (only on Mac OS X). +.TP +\fBF12\fR +Alias of Pause/Break which is treated as Reset +.TP +\fBF2\fR, \fBAlt_R\fR, \fBMeta_r\fR, \fBMenu\fR, \fBPrint\fR, \fBMode_switch\fR, \fBOption\fR +Option key +.TP +\fBF1\fR, \fBAlt_L\fR, \fBMeta_L\fR, \fBCancel\fR, \fBScroll_lock\fR, \fBCommand\fR +Command key +.TP +\fBNum_Lock\fR +Keypad "Clear". +.TP +\fBF12\fR, \fBPause\fR, \fBBreak\fR +Reset +.TP +\fBHome\fR +Alias for "=" on the keypad +.SH FILES +.TP +\fB~/.config.kegs\fR +The KEGS configuration file. This can be directly edited if +necessary, but normally is changed by using the configuration +menu (F4) from within KEGS. To return to the default configuration, +you may remove this file. +.TP +\fB/usr/share/kegs/rom03\fR (or \fB/usr/share/kegs/rom01\fR) +The Apple IIgs BIOS ROM image. If KEGS can't find this ROM, it +will start up with a black display, full of white @ characters. +Press F4 for the config menu and use the UI to select the correct +ROM image file. +.PP +For reference, the ROM image details are: +.PP +\fBrom03\fR: size 262144 bytes, md5sum ba89edf2729a28a17cd9e0f7a0ac9a39 +.br +\fBrom01\fR: size 131072 bytes, md5sum 20a0334c447cb069a040ae5be1d938df +.PP +Other versions of the IIgs ROMs may exist (this author isn't aware of any), +but these two images are known to work. +.TP +\fB/usr/bin/xkegs\fR +Wrapper script. xkegs will fail to run if it can't find its config file, +so this script creates one in the user's home directory if necessary, +then runs the real xkegs binary. +.TP +\fB/usr/libexec/xkegs\fR +Actual xkegs binary. Shouldn't be run directly (use the wrapper instead). +.TP +\fB/usr/share/kegs/config.kegs.default\fR +Copied to \fB~/.config.kegs\fR by the wrapper script, if \fB~/.config.kegs\fR +doesn't already exist. Can be used to set system\-wide defaults (such as the +path to the ROM image). +.SH SEE ALSO +to_pro(1) +.br +partls(1) +.br +Full KEGS docs in /usr/doc/kegs\-@VERSION@/*.txt +.br +KEGS homepage at http://kegs.sourceforge.net/ +.SH AUTHORS +KEGS is by Kent Dickey . +.PP +This manual page was written by B. Watson for the SlackBuilds.org project (but +may be used by anyone for any reason). +.PP +Wrapper script also by B. Watson. diff --git a/system/kegs/partls.1 b/system/kegs/partls.1 deleted file mode 100644 index 1af148532b..0000000000 --- a/system/kegs/partls.1 +++ /dev/null @@ -1,23 +0,0 @@ -.TH PARTLS "1" "January 2011" "SlackBuilds.org" "User Commands" -.SH NAME -partls \- Lists partitions on Apple\-partitioned hard drives or CD-ROMs -.SH SYNOPSIS -.B partls -<\fI-l\fR> -[\fIfile-or-device\fR] -.SH DESCRIPTION -partls is distributed with the KEGS emulator. -.PP -partls displays the partition table on an Apple\-partitioned disk or -disk image file. Generally, these partitions will use the Apple HFS filesystem. -.PP -With the \fB\-l\fR option, more information is displayed. -.SH SEE ALSO -xkegs(1) -.br -to_pro(1) -.SH AUTHORS -KEGS and partls are by Kent Dickey . -.PP -This manual page was written by B. Watson for the SlackBuilds.org project (but -may be used by anyone for any reason). diff --git a/system/kegs/slack-desc b/system/kegs/slack-desc index 5db61e7330..3ecf8b066b 100644 --- a/system/kegs/slack-desc +++ b/system/kegs/slack-desc @@ -13,7 +13,7 @@ kegs: Apple IIgs was the most powerful computer in the Apple II line. It kegs: first was sold in 1986. An Apple IIgs has the capability to run almost kegs: all Apple II, Apple IIe, and Apple IIc programs. kegs: -kegs: +kegs: Package built with audio system '@AUDIO@'. kegs: kegs: kegs: diff --git a/system/kegs/to_pro.1 b/system/kegs/to_pro.1 deleted file mode 100644 index a58fada52d..0000000000 --- a/system/kegs/to_pro.1 +++ /dev/null @@ -1,55 +0,0 @@ -.TH TO_PRO "1" "January 2011" "SlackBuilds.org" "User Commands" -.SH NAME -to_pro \- creates and copies files to Apple ProDOS disk images -.SH SYNOPSIS -.B to_pro -[\fI-size\fR] -[\fIfile\fR] -<\fIfile\fR ...> -.SH DESCRIPTION -to_pro is intended for use with the KEGS emulator. -.PP -to_pro creates a new ProDOS disk image called POOF1 in the current -directory, of the given size, containing the specified file(s). At -least one file must be given (to_pro cannot create a completely blank -image), and up to 51 file arguments are allowed. -.PP -The size argument is in kilobytes (1024 bytes each), and must be larger than the total size of -all the files (no checking is done, it's up to the user). ProDOS has a limit -of 32MB per partition, so the \-size argument should always less than -32767. -.PP -Long UNIX filenames are truncated to the 15\-character -ProDOS limit. -.PP -The author warns that the generated disk image files should only be used -temporarily, to copy files from the image to another ProDOS disk image -that was formatted within KEGS using ProDOS itself (or, the generated -image may be formatted within KEGS to create a proper blank disk image). -.PP -to_pro automatically sets the ProDOS filetype of files ending in ".shk" -to $E0. -.SH EXAMPLES -.TP -to_pro \-800 wolfdemo.bxy -Creates an 800KB disk image called POOF1, containing the file "wolfdemo.bxy" -(which is likely an Apple IIgs archive, downloaded from an FTP or web site). -Probably the next thing you will do be "mv POOF1 wolfdemo.dsk". -.TP -to_pro \-4096 wolfdemo.bxy -Same as above, but creates a 4MB POOF1 image file instead. -.TP -to_pro \-32000 *.shk -put all *.shk files in the current Unix directory into a 31.25MB -image called POOF1. -.SH SEE ALSO -xkegs(1) -.br -partls(1) -.PP -More information on to_pro in /usr/doc/kegs\-@VERSION@/README.kegs.txt -.SH AUTHORS -KEGS and to_pro are by Kent Dickey . -.PP -This manual page was written by B. Watson for the SlackBuilds.org project (but -may be used by anyone for any reason). diff --git a/system/kegs/xkegs.1 b/system/kegs/xkegs.1 deleted file mode 100644 index 907a6095cd..0000000000 --- a/system/kegs/xkegs.1 +++ /dev/null @@ -1,176 +0,0 @@ -.TH KEGS "1" "January 2011" "SlackBuilds.org" "User Commands" -.SH NAME -xkegs \- Apple IIgs emulator -.SH SYNOPSIS -.B xkegs -[\fI-options\fR] -.SH DESCRIPTION -KEGS (Kent's Emulated GS) -is an Apple IIgs emulator for Mac OS X, Linux, and Win32. The Apple -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. -.PP -xkegs is the KEGS binary, compiled for Linux and X\-Window support. -.PP -This manual page only documents the command\-line options and key mappings. -For the full documentation, see /usr/doc/kegs\-@VERSION@/README.kegs.txt -(and the other files in the same directory). -.PP -\fINote:\fR There is no way to specify disk or ROM images on the command line. -Use the configuration menu (F4) from within the emulator to select images. -.SH OPTIONS -.TP -\fB\-skip\fR \fI[num]\fR -KEGS will "skip" that many screen redraws between refreshes. -\-skip 0 will do 60 frames per second, \-skip 1 will do 30 fps, -\-skip 5 will do 10 fps. -.TP -\fB\-audio\fR \fI[0/1]\fR -Forces audio [off/on]. By default, audio is on unless -the X display is a remote machine or shared memory is off. -This switch can override the default. \-audio 0 causes KEGS to -not fork the background audio process, but Ensoniq emulation -is still 100% accurate, just the sound is not sent to the -workstation speaker. -.TP -\fB\-arate\fR \fI[num]\fR -Forces audio sample rate to \fI[num]\fR. 44100 and 48000 are -usual, you can try 22050 to reduce KEGS's overhead. On a reasonably -fast machine (>250MHz or so), you shouldn't need to mess with this. -.TP -\fB\-dhr140\fR -Will use the old Double\-hires color algorithm that results in -exactly 140 colors across the screen, as opposed to the blending -being done by default. -.TP -\fB\-15\fR -KEGS will only look for a 15\-bit X\-Window display. -.TP -\fB\-16\fR -KEGS will only look for a 16\-bit X\-Window display (not tested, probably - will get red colors wrong). -.TP -\fB\-24\fR -KEGS will only look for a 24\-bit X\-Window display. -.TP -\fB\-display\fR \fI[xdisplay]\fR -Same as setting the environment variable DISPLAY. -Sends X display to \fI[xdisplay]\fR -.TP -\fB\-noshm\fR -KEGS will not try to used shared memory for the X graphics display. -This will make KEGS much slower on graphics\-intensive tasks, -by as much as a factor of 10! By default, \-noshm causes an -effective \-skip of 3 which is 15 fps. You can override this -default by specifying a \-skip explicitly. -.SH KEY BINDINGS -.TP -\fBF1\fR -Alias of Command -.TP -\fBF2\fR -Alias of Option -.TP -\fBF3\fR -Alias of ESC for OS/2 compatibility. -.TP -\fBF4\fR -Configuration Panel -.TP -\fBF6\fR -Toggle through the 4 speeds: -Unlimited, 1MHz, 2.8MHz, 8.0MHz -.TP -\fBShift\-F6\fR -Enter KEGS debugger (can also be done by center\-clicking the mouse on -the xkegs window). -.br -The debugger is tty\-based, and runs on the terminal -that xkegs was started from. -.TP -\fBF7\fR -Toggle fast_disk_emul on/off -.TP -\fBF8\fR -Toggle pointer hiding on/off. -.TP -\fBF9\fR -Invert the sense of the joystick. -.TP -\fBShift\-F9\fR -Swap x and y joystick/paddle axes. -.TP -\fBF10\fR -Attempt to change the a2vid_palette (only useful on 256\-color displays) -.TP -\fBF11\fR -Full screen mode (only on Mac OS X). -.TP -\fBF12\fR -Alias of Pause/Break which is treated as Reset -.TP -\fBF2\fR, \fBAlt_R\fR, \fBMeta_r\fR, \fBMenu\fR, \fBPrint\fR, \fBMode_switch\fR, \fBOption\fR -Option key -.TP -\fBF1\fR, \fBAlt_L\fR, \fBMeta_L\fR, \fBCancel\fR, \fBScroll_lock\fR, \fBCommand\fR -Command key -.TP -\fBNum_Lock\fR -Keypad "Clear". -.TP -\fBF12\fR, \fBPause\fR, \fBBreak\fR -Reset -.TP -\fBHome\fR -Alias for "=" on the keypad -.SH FILES -.TP -\fB~/.config.kegs\fR -The KEGS configuration file. This can be directly edited if -necessary, but normally is changed by using the configuration -menu (F4) from within KEGS. To return to the default configuration, -you may remove this file. -.TP -\fB/usr/share/kegs/rom03\fR (or \fB/usr/share/kegs/rom01\fR) -The Apple IIgs BIOS ROM image. If KEGS can't find this ROM, it -will start up with a black display, full of white @ characters. -Press F4 for the config menu and use the UI to select the correct -ROM image file. -.PP -For reference, the ROM image details are: -.PP -\fBrom03\fR: size 262144 bytes, md5sum ba89edf2729a28a17cd9e0f7a0ac9a39 -.br -\fBrom01\fR: size 131072 bytes, md5sum 20a0334c447cb069a040ae5be1d938df -.PP -Other versions of the IIgs ROMs may exist (this author isn't aware of any), -but these two images are known to work. -.TP -\fB/usr/bin/xkegs\fR -Wrapper script. xkegs will fail to run if it can't find its config file, -so this script creates one in the user's home directory if necessary, -then runs the real xkegs binary. -.TP -\fB/usr/libexec/xkegs\fR -Actual xkegs binary. Shouldn't be run directly (use the wrapper instead). -.TP -\fB/usr/share/kegs/config.kegs.default\fR -Copied to \fB~/.config.kegs\fR by the wrapper script, if \fB~/.config.kegs\fR -doesn't already exist. Can be used to set system\-wide defaults (such as the -path to the ROM image). -.SH SEE ALSO -to_pro(1) -.br -partls(1) -.br -Full KEGS docs in /usr/doc/kegs\-@VERSION@/*.txt -.br -KEGS homepage at http://kegs.sourceforge.net/ -.SH AUTHORS -KEGS is by Kent Dickey . -.PP -This manual page was written by B. Watson for the SlackBuilds.org project (but -may be used by anyone for any reason). -.PP -Wrapper script also by B. Watson. diff --git a/system/kegs/xkegs.sh b/system/kegs/xkegs.sh index 55f0719b73..a947f07f76 100644 --- a/system/kegs/xkegs.sh +++ b/system/kegs/xkegs.sh @@ -8,8 +8,13 @@ # read it from /usr/share/kegs/config.kegs, but it'll freeze if # it doesn't have write permission! +# Update for v1.05: kegs will now start without ~/.config.kegs, +# but if you do that, it'll save its config in the current dir as +# "config.kegs" (no leading dot). So this wrapper's still necessary. +# Added the missing "$@" so options actually get passed to kegs. + if [ ! -e ~/.config.kegs ]; then cat /usr/share/kegs/config.kegs.default > ~/.config.kegs fi -exec /usr/libexec/xkegs +exec /usr/libexec/xkegs "$@" -- cgit v1.2.3