diff options
author | Antonio Leal <antonioleal@yahoo.com> | 2024-08-19 14:16:48 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-08-19 14:26:41 +0700 |
commit | e5bbb686ce8c66533242b0852014128b4ed8c3fd (patch) | |
tree | 8fd90e6f6c31f74cf9423454f579b71c91e33b3a /system/xAce | |
parent | 668f21decd19ba861c5b367b13c9d74a44723dce (diff) |
system/xAce: Added (emulator for the Jupiter Ace).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/xAce')
-rw-r--r-- | system/xAce/README | 13 | ||||
-rw-r--r-- | system/xAce/doinst.sh | 4 | ||||
-rw-r--r-- | system/xAce/patches/CMakeLists.txt.patch | 8 | ||||
-rw-r--r-- | system/xAce/patches/srcCMakeLists.txt.patch | 8 | ||||
-rw-r--r-- | system/xAce/patches/tape.c.patch | 12 | ||||
-rw-r--r-- | system/xAce/patches/xmain.c.patch | 79 | ||||
-rw-r--r-- | system/xAce/slack-desc | 19 | ||||
-rw-r--r-- | system/xAce/xAce.SlackBuild | 117 | ||||
-rw-r--r-- | system/xAce/xAce.desktop | 9 | ||||
-rw-r--r-- | system/xAce/xAce.info | 10 | ||||
-rw-r--r-- | system/xAce/xAce.png | bin | 0 -> 94271 bytes | |||
-rwxr-xr-x | system/xAce/xace-launcher | 4 |
12 files changed, 283 insertions, 0 deletions
diff --git a/system/xAce/README b/system/xAce/README new file mode 100644 index 0000000000..bc4b83ad6f --- /dev/null +++ b/system/xAce/README @@ -0,0 +1,13 @@ +xAce is an emulator for the Jupiter Ace that runs under most +flavours of Unix. It was written by Edward Patel and based +on a ZX81 emulator called xz81 written by Russell Marks, which was +in turn based on Ian Collier's xz80, a ZX Spectrum emulator for X. + +This xAce Slackware version implements a mod to allow the user +to change between "slow" and "fast" speed emulation speed, +very useful for spooling text sources. + +If you prefer to build the vanilla version invoke the +SlackBuild as follows: + +SLACKMODS=no ./xAce.SlackBuild diff --git a/system/xAce/doinst.sh b/system/xAce/doinst.sh new file mode 100644 index 0000000000..4e8ba7071d --- /dev/null +++ b/system/xAce/doinst.sh @@ -0,0 +1,4 @@ +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/xAce/patches/CMakeLists.txt.patch b/system/xAce/patches/CMakeLists.txt.patch new file mode 100644 index 0000000000..2c78e5142f --- /dev/null +++ b/system/xAce/patches/CMakeLists.txt.patch @@ -0,0 +1,8 @@ +--- xAce-0.5/CMakeLists.txt 2012-12-22 07:53:19.000000000 +0000 ++++ xAce-0.5-007/CMakeLists.txt 2022-09-06 21:03:10.482198551 +0100 +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.6) + project(xAce) + + enable_testing() diff --git a/system/xAce/patches/srcCMakeLists.txt.patch b/system/xAce/patches/srcCMakeLists.txt.patch new file mode 100644 index 0000000000..fcb9c25593 --- /dev/null +++ b/system/xAce/patches/srcCMakeLists.txt.patch @@ -0,0 +1,8 @@ +--- src/CMakeLists.txt 2012-12-22 07:53:19.000000000 +0000 ++++ src/CMakeLists.txt 2022-09-07 22:12:39.974438927 +0100 +@@ -1,4 +1,4 @@ +-add_definitions(-DSCALE=2 -DWHITE_ON_BLACK -DXACE_VERSION=\"0.5\") ++add_definitions(-DSCALE=4 -DWHITE_ON_BLACK -DXACE_VERSION=\"0.5\") + add_executable(xace xmain.c z80.c tape.c keyboard.c spooler.c) + target_link_libraries(xace X11 Xext) + install(TARGETS xace DESTINATION bin) diff --git a/system/xAce/patches/tape.c.patch b/system/xAce/patches/tape.c.patch new file mode 100644 index 0000000000..195e9cd480 --- /dev/null +++ b/system/xAce/patches/tape.c.patch @@ -0,0 +1,12 @@ +--- src/tape.c 2012-12-22 07:53:19.000000000 +0000 ++++ src/tape.c 2022-09-06 20:58:23.694178693 +0100 +@@ -23,6 +23,9 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <ctype.h> ++#include <unistd.h> ++#include <sys/types.h> + + #include "z80.h" + #include "tape.h" diff --git a/system/xAce/patches/xmain.c.patch b/system/xAce/patches/xmain.c.patch new file mode 100644 index 0000000000..5a6c78026a --- /dev/null +++ b/system/xAce/patches/xmain.c.patch @@ -0,0 +1,79 @@ +--- src/xmain.c 2012-12-22 07:53:19.000000000 +0000 ++++ src/xmain.c 2022-09-07 22:11:24.405433694 +0100 +@@ -57,6 +57,8 @@ + mem+0xe000 + }; + ++int is_fast_speed = 0; ++ + unsigned long tstates=0,tsmax=62500; + + int memattr[8]={0,1,1,1,1,1,1,1}; /* 8K RAM Banks */ +@@ -252,13 +254,28 @@ + tape_attach(tape_filename); + break; + ++ case XK_F10: ++ if (is_fast_speed == 1) { ++ normal_speed(); ++ is_fast_speed = 0; ++ } else { ++ fast_speed(); ++ is_fast_speed = 1; ++ } ++ break; ++ + case XK_F11: +- printf("Enter spool file:"); +- scanf("%256s", spool_filename); +- spooler_open(spool_filename); ++ if (!spooler_active()) { ++ printf("Enter spool file:"); ++ scanf("%256s", spool_filename); ++ spooler_open(spool_filename); ++ } else { ++ spooler_close(); ++ } + break; + + case XK_F12: ++ spooler_close(); + reset_ace = 1; /* will cause a reset */ + memset(mem+8192, 0xff, 57344); + refresh_screen = 1; +@@ -270,13 +287,14 @@ + void + main(int argc, char **argv) + { +- printf("xace: Jupiter ACE emulator v%s (by Edward Patel)\n", XACE_VERSION); ++ printf("xace: Jupiter ACE emulator v%s (by Edward Patel, with Slackware mods)\n", XACE_VERSION); + printf("Keys:\n"); + printf("\tF1 - Delete Line\n"); + printf("\tF3 - Attach a tape image\n"); + printf("\tF4 - Inverse Video\n"); + printf("\tF9 - Graphics\n"); +- printf("\tF11 - Spool from a file\n"); ++ printf("\tF10 - Toggle Normal/Fast Speed\n"); ++ printf("\tF11 - Start/Stop Spool from a file\n"); + printf("\tF12 - Reset\n"); + printf("\tEsc - Break\n"); + printf("\tCtrl-Q - Quit xAce\n"); +@@ -568,16 +586,16 @@ + XAutoRepeatOn(display),XFlush(display); + break; + case KeyPress: +- if (!spooler_active()) { + kev = (XKeyEvent *)&xev; + XLookupString(kev, key_buf, 20, &ks, NULL); ++ if (!spooler_active() || ks == XK_F10 || ks == XK_F11 || ks == XK_F12 ) { + keyboard_keypress(ks, kev->state); + } + break; + case KeyRelease: +- if (!spooler_active()) { + kev = (XKeyEvent *)&xev; + XLookupString(kev, key_buf, 20, &ks, NULL); ++ if (!spooler_active() || ks == XK_F10 || ks == XK_F11 || ks == XK_F12 ) { + keyboard_keyrelease(ks, kev->state); + } + break; diff --git a/system/xAce/slack-desc b/system/xAce/slack-desc new file mode 100644 index 0000000000..3d12971194 --- /dev/null +++ b/system/xAce/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------------------------------------------------------| +xAce: xAce (A Jupiter Ace emulator for Linux) +xAce: +xAce: +xAce: xAce is an emulator for the Jupiter Ace that runs under most flavours +xAce: of Unix. It was written by Edward Patel and based on a ZX81 emulator +xAce: called xz81 written by Russell Marks, which was in turn based on +xAce: Ian Collier's xz80, a ZX Spectrum emulator for X. +xAce: +xAce: +xAce: +xAce: Homepage at https://lawrencewoodman.github.io/xAce/ diff --git a/system/xAce/xAce.SlackBuild b/system/xAce/xAce.SlackBuild new file mode 100644 index 0000000000..827aaa4424 --- /dev/null +++ b/system/xAce/xAce.SlackBuild @@ -0,0 +1,117 @@ +#!/bin/bash + +# Slackware build script for xAce + +# Copyright 2024- Antonio Leal, Porto Salvo, Oeiras, Portugal +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=xAce +VERSION=${VERSION:-0.5} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +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 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Apply Slackware mods +if [ "${SLACKMODS:-yes}" = "yes" ]; then + patch CMakeLists.txt $CWD/patches/CMakeLists.txt.patch + patch src/CMakeLists.txt $CWD/patches/srcCMakeLists.txt.patch + patch src/tape.c $CWD/patches/tape.c.patch + patch src/xmain.c $CWD/patches/xmain.c.patch +fi + +# Build executable +cmake -DCMAKE_C_FLAGS="$SLKCFLAGS" . +make + +# Setup package files +mkdir -p $PKG/usr/bin +install -D -m0755 src/xace $PKG/usr/bin/xace +install -D -m0755 $CWD/xace-launcher $PKG/usr/bin/xace-launcher + +mkdir -p $PKG/usr/share/xAce +cp ace.rom $PKG/usr/share/xAce + +mkdir -p $PKG/usr/share/pixmaps +cp $CWD/xAce.png $PKG/usr/share/pixmaps/xAce.png + +mkdir -p $PKG/usr/share/applications +cp $CWD/xAce.desktop $PKG/usr/share/applications +(cd $PKG/usr/bin; ln -s xace xAce) + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + forth.txt COPYING CHANGELOG.md README boldcomp.email.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 diff --git a/system/xAce/xAce.desktop b/system/xAce/xAce.desktop new file mode 100644 index 0000000000..965bd4f064 --- /dev/null +++ b/system/xAce/xAce.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=xAce +Comment=Jupiter Ace Emulation +Exec=xace-launcher +Icon=xAce +StartupNotify=false +Terminal=true +Type=Application +Categories=System;Emulator; diff --git a/system/xAce/xAce.info b/system/xAce/xAce.info new file mode 100644 index 0000000000..24c6c270c2 --- /dev/null +++ b/system/xAce/xAce.info @@ -0,0 +1,10 @@ +PRGNAM="xAce" +VERSION="0.5" +HOMEPAGE="https://lawrencewoodman.github.io/xAce/" +DOWNLOAD="https://github.com/LawrenceWoodman/xAce/archive/v0.5/xAce-0.5.tar.gz" +MD5SUM="2fd3b822cba681463b0a4f57895aabd0" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Antonio Leal" +EMAIL="antonioleal@yahoo.com" diff --git a/system/xAce/xAce.png b/system/xAce/xAce.png Binary files differnew file mode 100644 index 0000000000..7b0fd056e9 --- /dev/null +++ b/system/xAce/xAce.png diff --git a/system/xAce/xace-launcher b/system/xAce/xace-launcher new file mode 100755 index 0000000000..a438592932 --- /dev/null +++ b/system/xAce/xace-launcher @@ -0,0 +1,4 @@ +#!/bin/bash + +cd /usr/share/xAce +xace |