Skip to content

Commit 41b631a

Browse files
authored
Merge pull request #23 from cobaltgit/graviton
Graviton
2 parents 3b7e50a + e032be4 commit 41b631a

120 files changed

Lines changed: 6862 additions & 265 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Apps/BootLogo/bootlogo.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
. /mnt/SDCARD/System/scripts/helpers.sh
2+
3+
BOOTLOGO_MAX_BYTES=524288 # 512KiB
4+
BOOTLOGO="$1"
5+
LOG_FILE="/mnt/SDCARD/System/log/bootlogo.log"
6+
7+
cd "$(dirname "$BOOTLOGO")"
8+
9+
BOOTLOGO_RESOLUTION="$(magick identify -format "%wx%h" "$BOOTLOGO")"
10+
BOOTLOGO_DEPTH="$(magick identify -format "%[bit-depth]-%[type]" "$BOOTLOGO")"
11+
12+
if [ $(wc -c <$BOOTLOGO) -gt $BOOTLOGO_MAX_BYTES ]; then
13+
log_message "BootLogo: must be 512KiB or smaller" "$LOG_FILE"
14+
display -d 2000 -t "Boot logo must be 512KiB or smaller. Exiting..."
15+
exit 1
16+
elif [ "$BOOTLOGO_RESOLUTION" != "240x320" ]; then
17+
log_message "BootLogo: expected 240x320 resolution, got $BOOTLOGO_RESOLUTION" "$LOG_FILE"
18+
display -d 2000 -t "Boot logo must be 240x320 resolution. Exiting..."
19+
exit 1
20+
elif [ "$BOOTLOGO_DEPTH" != "16-TrueColor" ] && [ "$BOOTLOGO_DEPTH" != "16-Palette" ]; then
21+
log_message "BootLogo: must be 16-bit RGB565 (16-TrueColor or 16-Palette), got $BOOTLOGO_DEPTH" "$LOG_FILE"
22+
display -d 2000 -t "Boot logo must be a 16-bit (RGB565) image. Exiting..."
23+
exit 1
24+
fi
25+
26+
log_message "BootLogo: Updating boot logo..." "$LOG_FILE"
27+
display -t "Updating bootlogo..."
28+
if dd if=$BOOTLOGO of=/dev/by-name/bootlogo bs=65536 >> "$LOG_FILE" 2>&1; then
29+
log_message "BootLogo: update success" "$LOG_FILE"
30+
display -d 2000 -t "Boot logo update success! Rebooting..."
31+
cat /dev/zero > /dev/fb0
32+
sync
33+
reboot
34+
else
35+
log_message "BootLogo: update failed" "$LOG_FILE"
36+
display -d 2000 -t "Boot logo update failed. Check the log for more details."
37+
fi

Apps/BootLogo/launch.sh

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,5 @@
11
#!/bin/sh
22

3-
. /mnt/SDCARD/System/scripts/helpers.sh
4-
53
cd "$(dirname "$0")"
64

7-
BOOTLOGO_MAX_BYTES=524288 # 512KiB
8-
BOOTLOGO="bootlogo.bmp"
9-
LOG_FILE="/mnt/SDCARD/System/log/bootlogo.log"
10-
11-
BOOTLOGO_RESOLUTION="$(magick identify -format "%wx%h" "$BOOTLOGO")"
12-
BOOTLOGO_DEPTH="$(magick identify -format "%[bit-depth]-%[type]" "$BOOTLOGO")"
13-
14-
if [ $(wc -c <$BOOTLOGO) -gt $BOOTLOGO_MAX_BYTES ]; then
15-
log_message "BootLogo: must be 512KiB or smaller" "$LOG_FILE"
16-
display -d 2000 -t "Boot logo must be 512KiB or smaller. Exiting..."
17-
exit 1
18-
elif [ "$BOOTLOGO_RESOLUTION" != "240x320" ]; then
19-
log_message "BootLogo: expected 240x320 resolution, got $BOOTLOGO_RESOLUTION" "$LOG_FILE"
20-
display -d 2000 -t "Boot logo must be 240x320 resolution. Exiting..."
21-
exit 1
22-
elif [ "$BOOTLOGO_DEPTH" != "16-TrueColor" ]; then
23-
log_message "BootLogo: must be 16-bit RGB565 (16-TrueColor), got $BOOTLOGO_DEPTH" "$LOG_FILE"
24-
display -d 2000 -t "Boot logo must be a 16-bit (RGB565) image. Exiting..."
25-
exit 1
26-
fi
27-
28-
log_message "BootLogo: Updating boot logo..." "$LOG_FILE"
29-
display -t "Updating bootlogo..."
30-
dd if=$BOOTLOGO of=/dev/by-name/bootlogo bs=65536 >> "$LOG_FILE" 2>&1
31-
if [ $? -eq 0 ]; then
32-
log_message "BootLogo: update success" "$LOG_FILE"
33-
display -d 2000 -t "Boot logo update success."
34-
else
35-
log_message "BootLogo: update failed" "$LOG_FILE"
36-
display -d 2000 -t "Boot logo update failed. Check the log for more details."
37-
fi
5+
exec sh bootlogo.sh "bootlogo.bmp"

Apps/BootLogo/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Bootlogo must be 16bpp R5 G6 B5 bitmap, resolution 320x240 and less than 512KiB, rotated 90 degrees anticlockwise
2-
A sample bootlogo is included.
2+
A sample bootlogo is included.

Apps/BoxartScraper/db/ATARI800_games.txt

Lines changed: 4813 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)