-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ap-type-checker.sh
executable file
·43 lines (36 loc) · 1.06 KB
/
ap-type-checker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
echo -e "DuckStation AP Type Checker v1.0.1 For Linux\nBy Alex Free\n"
if [ $# -ne 2 ]; then
echo -e "Error: Incorrect number of arguments.\nUsage:\n<DuckStation executable file> <PSX game cue file>\n"
exit 1
fi
if [ ! -f "$1" ]; then
echo -e "Error: Can't open the DuckStation executable file: "$1"\n"
exit 1
fi
if [ ! -f "$2" ]; then
echo -e "Error: Can't open the PSX game cue file: "$2"\n"
exit 1
fi
log="$HOME"/.local/share/duckstation/duckstation.log
rm -f "$log"
"$1" "$2"
echo "Number Of 0x19 Test Commands Sent:"
grep -rc "CDROM executing command 0x19" "$log"
echo
grep -r "CDROM executing command 0x19" "$log"
echo
echo "Number Of 0x1E ReadTOC Commands Sent:"
grep -rc "CDROM executing command 0x1E" "$log"
echo
grep -r "CDROM executing command 0x1E" "$log"
echo
echo "Number Of 0x13 GetTN Commands Sent:"
grep -rc "CDROM executing command 0x13" "$log"
echo
grep -r "CDROM executing command 0x13" "$log"
echo
echo "Number Of 0x14 GetTD Commands Sent:"
grep -rc "CDROM executing command 0x14" "$log"
echo
grep -r "CDROM executing command 0x14" "$log"