Skip to content

Commit 8d8b7e9

Browse files
authored
Merge pull request #2842 from joolswills/atari800_git
atari800 - switch to using github repo and update to v4.1.0
2 parents d7ee53c + 2746c44 commit 8d8b7e9

File tree

3 files changed

+46
-26
lines changed

3 files changed

+46
-26
lines changed

scriptmodules/emulators/atari800.sh

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,21 @@ rp_module_section="opt"
1717
rp_module_flags="!mali !kms"
1818

1919
function depends_atari800() {
20-
local depends=(libsdl1.2-dev autoconf zlib1g-dev libpng-dev)
20+
local depends=(libsdl1.2-dev autoconf automake zlib1g-dev libpng-dev)
2121
isPlatform "rpi" && depends+=(libraspberrypi-dev)
2222
getDepends "${depends[@]}"
2323
}
2424

2525
function sources_atari800() {
26-
downloadAndExtract "$__archive_url/atari800-4.0.0.tar.gz" "$md_build" --strip-components 1
26+
gitPullOrClone "$md_build" "https://github.com/atari800/atari800.git" ATARI800_4_1_0
2727
if isPlatform "rpi"; then
2828
applyPatch "$md_data/01_rpi_fixes.diff"
2929
fi
3030
}
3131

3232
function build_atari800() {
33-
cd src
34-
autoreconf -v
35-
params=()
33+
local params=()
34+
./autogen.sh
3635
isPlatform "rpi" && params+=(--target=rpi)
3736
./configure --prefix="$md_inst" ${params[@]}
3837
make clean
@@ -49,16 +48,22 @@ function configure_atari800() {
4948
mkRomDir "atari800"
5049
mkRomDir "atari5200"
5150

52-
mkUserDir "$md_conf_root/atari800"
51+
if [[ "$md_mode" == "install" ]]; then
52+
mkUserDir "$md_conf_root/atari800"
53+
54+
# move old config if exists to new location
55+
if [[ -f "$md_conf_root/atari800.cfg" ]]; then
56+
mv "$md_conf_root/atari800.cfg" "$md_conf_root/atari800/atari800.cfg"
57+
fi
58+
moveConfigFile "$home/.atari800.cfg" "$md_conf_root/atari800/atari800.cfg"
5359

54-
# move old config if exists to new location
55-
if [[ -f "$md_conf_root/atari800.cfg" ]]; then
56-
mv "$md_conf_root/atari800.cfg" "$md_conf_root/atari800/atari800.cfg"
60+
# copy launch script (used for unpacking archives)
61+
sed "s#EMULATOR#/bin/$md_id#" "$scriptdir/scriptmodules/$md_type/atari800/atari800.sh" >"$md_inst/$md_id.sh"
62+
chmod a+x "$md_inst/$md_id.sh"
5763
fi
58-
moveConfigFile "$home/.atari800.cfg" "$md_conf_root/atari800/atari800.cfg"
5964

60-
addEmulator 1 "atari800" "atari800" "$md_inst/bin/atari800 %ROM%"
61-
addEmulator 1 "atari800" "atari5200" "$md_inst/bin/atari800 %ROM%"
65+
addEmulator 1 "atari800" "atari800" "$md_inst/atari800.sh %ROM%"
66+
addEmulator 1 "atari800" "atari5200" "$md_inst/atari800.sh %ROM%"
6267
addSystem "atari800"
6368
addSystem "atari5200"
6469
}
Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
--- a/src/configure.ac 2018-10-10 18:29:51.126739086 +0100
2-
+++ b/src/configure.ac.new 2018-10-10 18:30:12.246687333 +0100
3-
@@ -141,7 +141,7 @@
1+
diff --git a/configure.ac b/configure.ac
2+
index adb899f..bc9d939 100644
3+
--- a/configure.ac
4+
+++ b/configure.ac
5+
@@ -148,7 +148,7 @@ if [[ "$a8_target" = "ps2" ]]; then
46
fi
57
if [[ "$a8_target" = "rpi" ]]; then
68
[[ -z "$RPI_SDK" ]] && RPI_SDK="/opt/vc"
@@ -9,14 +11,3 @@
911
CFLAGS="$CFLAGS -I${RPI_SDK}/include -I${RPI_SDK}/include/SDL -I${RPI_SDK}/include/interface/vmcs_host/linux -I${RPI_SDK}/include/interface/vcos/pthreads"
1012
LDFLAGS="$LDFLAGS -Wl,--unresolved-symbols=ignore-in-shared-libs -L${RPI_SDK}/lib"
1113
fi
12-
@@ -324,8 +324,8 @@
13-
AC_DEFINE(SUPPORTS_PLATFORM_CONFIGSAVE,1,[Save additional config file options.])
14-
AC_DEFINE(SUPPORTS_PLATFORM_PALETTEUPDATE,1,[Update the Palette if it changed.])
15-
AC_DEFINE(PLATFORM_MAP_PALETTE,1,[Platform-specific mapping of RGB palette to display surface.])
16-
- A8_NEED_LIB(GLESv2)
17-
- A8_NEED_LIB(EGL)
18-
+ A8_NEED_LIB(brcmGLESv2)
19-
+ A8_NEED_LIB(brcmEGL)
20-
A8_NEED_LIB(SDL)
21-
A8_NEED_LIB(bcm_host)
22-
OBJS="atari_rpi.o gles2/video.o sdl/main.o sdl/input.o"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
emulator="./EMULATOR"
4+
rom="$1"
5+
6+
pushd "${0%/*}" >/dev/null
7+
8+
if [[ -z "$rom" ]]; then
9+
"$emulator"
10+
else
11+
source "../../lib/archivefuncs.sh"
12+
13+
archiveExtract "$rom" ".a52 .atr .bas .bin .car .dcm .xex .xfd"
14+
15+
# check successful extraction and if we have at least one file
16+
if [[ $? == 0 ]]; then
17+
rom="${arch_files[0]}"
18+
fi
19+
20+
"$emulator" "$rom"
21+
archiveCleanup
22+
fi
23+
24+
popd

0 commit comments

Comments
 (0)