summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2022-01-30 16:47:03 -0500
committerChris Severance2022-01-30 16:47:03 -0500
commite8c3314b06aa96291fadaffedd53b9e201aaac22 (patch)
tree27b2573a2b0b8832531c840a9e50494262773440
parent258d89966f86619c4a1dccafca1ba9e878a89925 (diff)
downloadaur-e8c3314b06aa96291fadaffedd53b9e201aaac22.tar.gz
autu: Update to 4.2.0-1
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD125
-rwxr-xr-xatari.sh176
3 files changed, 279 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 94f9dd5d62a3..1d00d9e91b97 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,23 @@
pkgbase = atari800
pkgdesc = An emulator of the Atari 800/800XL/130XE/5200 with various extensions
pkgver = 4.2.0
- pkgrel = 2
- url = https://atari800.github.io
+ pkgrel = 1
+ url = https://atari800.github.io/
arch = i686
arch = x86_64
+ arch = aarch64
license = GPL2
depends = sdl
optdepends = libpng: PNG screenshot support
- source = https://github.com/atari800/atari800/archive/ATARI800_4_2_0.tar.gz
+ options = !strip
+ source = https://github.com/atari800/atari800/releases/download/ATARI800_4_2_0/atari800-4.2.0-src.tgz
+ source = atari.sh
source = atari800.desktop
- sha256sums = 0bad99575293742e9e062e9fe9d104fe57228b1a32fec7a033b889edc819d7a4
+ md5sums = 695031b9bc3461cd18ec9090779d984b
+ md5sums = 4f6ae0290954e7132c705c9f9fc37dd2
+ md5sums = 82d425a60aa04f7596ffe0d3cf3dfd92
+ sha256sums = 55cb5568229c415f1782130afd11df88c03bb6d81fa4aa60a4ac8a2f151f1359
+ sha256sums = 832fcb80e3eb02e7d5d8d50512e82c28aef9110e4f764f288b12228e99c13f42
sha256sums = 95e03020358a0855e12ee19b62abebb336e472fcf525f7eb42dcc28419588df9
pkgname = atari800
-
diff --git a/PKGBUILD b/PKGBUILD
index 8be27ad63082..a521ce2df024 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,104 @@
-# Maintainer: Oliver Jaksch <arch-aur@com-in.de>
+# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
+# Contributor: beest <gnubeest at zoho dot com>
+# Contributor: c0mmando <c0mmand0_88 at yahoo dot com dot ar>
+# Contributor: Farhan Yousasf <farhany at gmail dot com>
+# Contributor: Vinzenz Vietzke <vinz at archlinux dot us>
-pkgname=atari800
+set -u
+pkgname='atari800'
+#pkgname+='-git'
pkgver=4.2.0
-_pkgver=${pkgver//./_}
-pkgrel=2
-pkgdesc="An emulator of the Atari 800/800XL/130XE/5200 with various extensions"
+pkgrel=1
+pkgdesc='An emulator of the Atari 800/800XL/130XE/5200 with various extensions'
arch=('i686' 'x86_64')
-url="https://atari800.github.io"
+arch+=('aarch64') # Idorobots
+#url='https://atari800.sourceforge.net/'
+url='https://atari800.github.io/'
+_giturl='https://github.com/atari800/atari800'
license=('GPL2')
depends=('sdl')
optdepends=('libpng: PNG screenshot support')
-source=("https://github.com/atari800/${pkgname}/archive/ATARI800_${_pkgver}.tar.gz"
- "atari800.desktop")
-sha256sums=('0bad99575293742e9e062e9fe9d104fe57228b1a32fec7a033b889edc819d7a4'
- '95e03020358a0855e12ee19b62abebb336e472fcf525f7eb42dcc28419588df9')
+options=('!strip')
+_srcdir="${pkgname%-git}-${pkgver%.r*}"
+_srcf="${_srcdir^^}"
+_srcf="${_srcf//./_}"
+_srcf="${_srcf//-/_}"
+source=(
+ "${_giturl}/releases/download/${_srcf}/${_srcdir}-src.tgz"
+ 'atari.sh'
+ 'atari800.desktop'
+)
+if ! :; then
+ source[0]="${_giturl}/archive/refs/tags/${_srcf}.tar.gz"
+ _srcdir="${pkgname%-git}-${_srcf}"
+fi
+unset _srcf
+md5sums=('695031b9bc3461cd18ec9090779d984b'
+ '4f6ae0290954e7132c705c9f9fc37dd2'
+ '82d425a60aa04f7596ffe0d3cf3dfd92')
+sha256sums=('55cb5568229c415f1782130afd11df88c03bb6d81fa4aa60a4ac8a2f151f1359'
+ '832fcb80e3eb02e7d5d8d50512e82c28aef9110e4f764f288b12228e99c13f42'
+ '95e03020358a0855e12ee19b62abebb336e472fcf525f7eb42dcc28419588df9')
-build() {
- cd "${pkgname}-ATARI800_${_pkgver}"
-
- ./autogen.sh
-
- # configure default - neccessary
- COPTS="--prefix=/usr"
-
- # The R: Network device
- #COPTS="${COPTS} --enable-riodevice"
-
- # SIO Sound for true retro feeling
- #COPTS="${COPTS} --enable-seriosound"
-
- # OnScreen Keyboard
- #COPTS="${COPTS} --enable-onscreenkeyboard"
+if [ "${pkgname%-git}" != "${pkgname}" ]; then
+ source[0]="git+${_giturl}.git"
+ md5sums[0]='SKIP'
+ sha256sums[0]='SKIP'
+ conflicts=("${pkgname%-git}")
+ provides=("${pkgname%-git}=${pkgver%%.r*}")
+ _srcdir="${pkgname%-git}"
+pkgver() {
+ set -u
+ cd "${_srcdir}"
+ local _ver="$(git describe --tags --long)"
+ _ver="${_ver#ATARI800_}"
+ _ver="${_ver/-/-r}"
+ _ver="${_ver//_/.}"
+ _ver="${_ver//-/.}"
+ printf '%s' "${_ver}"
+ set +u
+}
+else
+ if [ "${pkgver%.r*}" != "${pkgver}" ]; then
+pkgver() {
+ printf '%s' "${pkgver%.r*}"
+}
+ fi
+fi
- ./configure ${COPTS}
- make
+build() {
+ set -u
+ cd "${_srcdir}"
+ if [ -s 'src/autogen.sh' ]; then
+ cd 'src'
+ fi
+ if [ ! -s 'configure' ]; then
+ sh -e -u 'autogen.sh'
+ fi
+ if [ ! -s 'Makefile' ]; then
+ local _copts=(
+ --prefix='/usr'
+ #--enable-riodevice # The R: Network device, enabled as of 4.2
+ #--enable-seriosound # SIO Sound for true retro feeling
+ #--enable-onscreenkeyboard # OnScreen Keyboard
+ --enable-linuxjoystick
+ )
+ ./configure "${_copts[@]}"
+ fi
+ make
+ set +u
}
package() {
- cd "${pkgname}-ATARI800_${_pkgver}"/src
- make DESTDIR="${pkgdir}/" install
- install -Dm755 "${srcdir}/atari800.desktop" "${pkgdir}/usr/share/applications/atari800.desktop"
- install -Dm755 "../data/atari2.png" "${pkgdir}/usr/share/pixmaps/atari800.png"
- msg2 "\e[1;32mThis package has some options you might interested in. Have a look to COPTS at PKGBUILD. \e[0m"
+ set -u
+ cd "${_srcdir}"
+ if [ -s 'src/autogen.sh' ]; then
+ cd 'src'
+ fi
+ make DESTDIR="${pkgdir}/" install
+ install -Dm755 "${srcdir}/atari800.desktop" "${pkgdir}/usr/share/applications/atari800.desktop"
+ install -Dm755 'data/atari2.png' "${pkgdir}/usr/share/pixmaps/atari800.png"
+ set +u
+ msg2 "\e[1;32mThis package has some options you might interested in. Have a look at _copts[@] in PKGBUILD.\e[0m"
}
+set +u
diff --git a/atari.sh b/atari.sh
new file mode 100755
index 000000000000..613ac8452ba4
--- /dev/null
+++ b/atari.sh
@@ -0,0 +1,176 @@
+#!/bin/bash
+
+set -e
+set -u
+
+_atari='c/games/atari'
+#_atari='c/ATARI'
+
+shopt -s nullglob
+sticks=(/dev/input/js*); sticks="${#sticks[@]}"
+case "${sticks}" in
+0) echo "Please connect a stick"; false ;;
+1|2|3|4);;
+*) sticks=2;;
+esac
+echo "Detected ${sticks} joysticks"
+
+_fn_ataripp() {
+ echo 'Launching atari++'
+ #_stick='DigitalJoystick'
+ #_stick='SDLDigital'
+ #_stick='AnalogJoystick'
+ _opts=(
+ --config ~/'.atari++.cfg'
+ -Machine '800'
+ -AcceptLicence 'On'
+ -GTIAVideoMode 'NTSC'
+ -ChipGeneration 'GTIA'
+ -OsAPath ~/"${_atari}/AtariBIOS/OS Rev A (19xx)(Atari)(PAL)(400-800).rom"
+ -OsBPath ~/"${_atari}/AtariBIOS/OS Rev B (19xx)(Atari)(NTSC)(400-800).rom"
+ #-Os1200Path
+ -OsXLPath ~/"${_atari}/AtariBIOS/atarixl.rom"
+ -Os5200Path ~/"${_atari}/AtariBIOS/5200 boot ROM (19xx)(Atari)(5200 Game System).rom"
+ -OsType 'OsB'
+ -VideoMode 'NTSC'
+ -EnablePrinter 'off'
+ -Image.1 ~/"${_atari}/romsdave/MULE.ATR"
+ #-PixelWidth '4' -PixelHeight '4' # 1920x1200
+ -PixelWidth '3' -PixelHeight '3' # Smaller for slow ATI card
+ #-PixelWidth '2' -PixelHeight '2' # 1366x768
+ -xvideorendering 'on'
+ )
+
+ while [ "${sticks}" -gt 0 ]; do
+ sticks=$((sticks-1))
+ _opts+=("-Joystick.${sticks}.Port" "SDLAnalog.${sticks}" "-SDL_First_Button.${sticks}" '2' "-SDL_Second_Button.${sticks}" '1')
+ # No dpad or stick control on Super JoyBox 5
+ #_opts+=("-Joystick.${sticks}.Port" "AnalogJoystick.${sticks}" "-First_Button.${sticks}" '2' "-Second_Button.${sticks}" '1')
+ done
+ unset sticks
+
+ echo '
+http://www.xl-project.com/man/manual/atari++.html
+
+PS2 Analog Off
+PS2 Fire button circle
+
+F1 Menu, or mouse at top of screen
+F2 Option
+F3 Select
+F4 Start
+F6 Reset
+F7 Cold Starts
+F10 Exit Emulator
+F11 Pause
+(No turbo key)
+'
+ atari++ "${_opts[@]}"
+}
+
+_fn_atari800() {
+if ! :; then
+ echo 'Launching atari800'
+ if [ ! -s ~/'.atari800.cfg' ]; then
+ atari800 # Quit this immediately
+ fi
+
+ extras=('ATARI_FILES_DIR=' 'SAVED_FILES_DIR=')
+ for extra in "${extras[@]}"; do
+ if ! grep -qe "^${extra}" ~/'.atari800.cfg'; then
+ echo "${extra}" >> ~/'.atari800.cfg'
+ fi
+ done
+ unset extras extra
+
+ # No command line for disk settings
+fi
+
+ # A 3.1 config used in 4.0 will result in washed out colors, change
+ # COLOURS_NTSC_GAMMA=2.35 <- 0.3 │
+ # COLOURS_PAL_GAMMA=2.35 <- 0.3
+ # Or better yet, just delete ~/.atari800.cfg because there are other settings changes
+
+ # Limited to 2 sticks, now supports 4 sticks
+ mul=$(( (1500-65)/30*10 ))
+ _opts=(
+ -atari
+ -autosave-config
+ -nobasic
+ -ntsc
+ # -run ~/"${_atari}/romsdave/mule.atr'
+ -osa_rom ~/"${_atari}/AtariBIOS/OS Rev A (19xx)(Atari)(PAL)(400-800).rom"
+ -osb_rom ~/"${_atari}/AtariBIOS/OS Rev B (19xx)(Atari)(NTSC)(400-800).rom"
+ -xlxe_rom ~/"${_atari}/AtariBIOS/atarixl.rom"
+ -5200_rom ~/"${_atari}/AtariBIOS/5200 boot ROM (19xx)(Atari)(5200 Game System).rom"
+ -800-rev b-ntsc
+ -mouse off
+ #-win-width $((w=1920)) # 1920x1200
+ -win-width $((mul*3)) # 1920x1200
+ #-win-width $((w=1290)) # 1366x768
+ -win-height $((mul*2))
+ -fs-width '640'
+ -fs-height '480'
+ -windowed
+ -stretch 'integral'
+ -image-aspect 'square-pixels'
+ -no-rotate90
+ -no-80column
+ -scanlines '0'
+ # -video-accel # This makes F12 turbo go way too fast
+ -sound
+ -showspeed
+ #-multijoy # breaks all joysticks, doesn't add 4 sticks
+ # new features as of 2019-12-27
+ -kbdjoy0
+ -kbdjoy1
+ -atari_files "${HOME}/${_atari}/romsdave"
+ -saved_files "${HOME}/${_atari}"
+ )
+
+ analog='Off'
+ players='2'
+ ver="$(atari800 --version)" || :
+ ver="${ver##* }"
+ if [ "$(vercmp "${ver}" '4.0.0')" -ge 0 ]; then
+ analog='On'
+ players='4'
+ _opts+=(
+ -joy0hat
+ -joy1hat
+ -joy2hat
+ -joy3hat
+ )
+ fi
+if ! :; then
+ # No command line switches for some settings
+ sed -e 's:^\(SDL_JOY_0_ENABLED\)=.*$:\1=1:g' \
+ -e 's:^\(ATARI_FILES_DIR\)=.*$:'"\1=${HOME}/${_atari}/romsdave:g" \
+ -e 's:^\(SAVED_FILES_DIR\)=.*$:'"\1=${HOME}/${_atari}:g" \
+ -i ~/'.atari800.cfg'
+fi
+
+ echo "
+https://github.com/dmlloyd/atari800/blob/master/DOC/USAGE
+
+PS2 Analog ${analog}
+PS2 Fire button all buttons
+Supports ${players} players"'
+
+F1 Emulator Menu
+F2 Option
+F3 Select
+F4 Start
+F5 Reset key ("warm reset")
+Shift+F5 Reboot ("cold reset")
+F9 Exit emulator
+F12 Turbo mode (toggle)
+Alt+R Run Atari program
+Alt+L Load state file
+Alt+S Save state file
+'
+ atari800 "${_opts[@]}"
+}
+
+# _fn_ataripp
+_fn_atari800