Skip to content

Commit

Permalink
Neogeo support for v2.1
Browse files Browse the repository at this point in the history
* NeoGeo folder option

* Extra warning for missing rom list and silence missing rom errors

* Updated readme to reflect current categorisations
  • Loading branch information
AndyHazz authored Oct 3, 2021
1 parent c55b15e commit 5945e3f
Show file tree
Hide file tree
Showing 3 changed files with 312 additions and 102 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Put the [aknf-rom-sorter.sh](https://raw.githubusercontent.com/AndyHazz/All-Kill

Run the script from PinHP's menu (Options > System Settings Menu > System Settings > Run External File).

There's a demo video available here: https://www.youtube.com/watch?v=HIDN9-cbCzs

## Online updates

Each time you run it (with an active internet connection), the script will update itself, and can also get the latest recommended game list.
Expand All @@ -14,17 +16,20 @@ Each time you run it (with an active internet connection), the script will updat

Best games from each genre will be moved into their own subfolders:

- Beat 'em ups
- Classics
- Platformers
- Ball & Paddle
- Driving
- Fighter
- Maze
- Platform
- Puzzle
- Run and gun
- Shoot 'em ups
- Shooter
- Sports
- Vs Fighting
- Vs Fighter

Everything else will be put in a hidden '[Leftovers]' folder, which you can still access by selectring the extra blank line below the visible folders.

There is also an option to separate out 151 NeoGeo games (all the parent roms for NeoGeo, whether they're any good or not) and show them all in a '[NeoGeo]' folder.

## Use the correct rom set

The included rom lists are specifically for AdvanceMame (0.106). Other rom sets may have different zip filenames and the results won't be as good for you.
Expand Down
53 changes: 44 additions & 9 deletions aknf-rom-sorter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GOOGLE_SHEET="https://docs.google.com/spreadsheets/d/e/2PACX-1vQAZx0Wz2EqlxtN5CI
ROMLIST_FILENAME="rom-list.sh"
BRANCH="main"
SCRIPT="aknf-rom-sorter.sh"
UPDATESTRING="v2.0" # This will show in the first dialog title for update confirmation
UPDATESTRING="v2.1" # This will show in the first dialog title for update confirmation
SCRIPT_TITLE="Rom sorter - $UPDATESTRING"
GENRES=("Maze" "Ball & Paddle" "Driving" "Fighter" "Platform" "Puzzle" "Shooter" "Sports" "Vs Fighter")

Expand Down Expand Up @@ -141,18 +141,34 @@ fi
#File to check for in the rom path
FILE="_games.template"

#get full path to rom list
ROMLIST="$RPI2JAMMA/$REPO/$ROMLIST_FILENAME"

pikeyd165_start "yesno" "0.5"

if [ -f $FILE ]; then
dialog --title "$SCRIPT_TITLE" \
--infobox "Confirmed script is acting on PinHP roms folder" 7 30
else
echo "$FILE does not exist - failed check for PinHP rom folder."
echo "Aborting script to avoid disaster"
echo "Run the script from PinHP menu"
sleep 2
joy2key_start "yesno"
dialog --title "$SCRIPT_TITLE" \
--msgbox "\nCould not find PinHP roms_advmame directory! Run this script from PinHP menu." 11 30
joy2key_stop
clear
exit 1
fi

pikeyd165_start "yesno" "0.5"
if [ -f $ROMLIST ]; then
dialog --title "$SCRIPT_TITLE" \
--infobox "Confirmed rom list exists" 7 30
else
joy2key_start "yesno"
dialog --title "$SCRIPT_TITLE" \
--msgbox "\nCould not find rom sorter list - go online and run the script again to get the list." 11 30
joy2key_stop
clear
exit 1
fi

joy2key_start "yesno"
dialog --title "$SCRIPT_TITLE" \
Expand Down Expand Up @@ -185,6 +201,20 @@ case $response in
;;
esac

joy2key_start "yesno"
dialog --title "$SCRIPT_TITLE" \
--yesno "\nCreate a separate folder with ALL NeoGeo games?" 11 30
response=$?
joy2key_stop
case $response in
0) NEOGEO=true ;;
1) NEOGEO=false ;;
255)
clear
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
;;
esac

# joy2key_start "yesno"
# dialog --title "$SCRIPT_TITLE" \
# --yesno "\nUse rom list already downloaded from github? This is updated less frequently but will be stable. Choose 'No' to use the google sheet directly https://bit.ly/3k3dh9U (active internet connection required)." 15 30
Expand All @@ -199,8 +229,6 @@ esac
# ;;
# esac

#get full path to rom list
ROMLIST="$RPI2JAMMA/$REPO/$ROMLIST_FILENAME"

# Move everything back into the root roms dir so we can start from scratch
find . -mindepth 2 -type f -print -exec mv {} . \; |
Expand All @@ -214,10 +242,17 @@ moveroms() {
if [[ "$ONLINE" = true && "$SOURCE" = "Google" ]]; then # Download latest from Google sheet
bash <(curl -s -L "$GOOGLE_SHEET" | grep -v "$EXCLUDE" | grep "'$1'")
else # Use rom list from git repo
bash <(grep -v "$EXCLUDE" "$ROMLIST" | grep "'$1'")
bash <(grep -v "$EXCLUDE" "$ROMLIST" | grep "'$1'") &> /dev/null
fi
}

if [[ "$NEOGEO" = true ]]; then
dialog --title "$SCRIPT_TITLE" \
--infobox "\nSeparating out the NeoGeo games ..." 7 30
moveroms "NeoGeo"
mv "NeoGeo" "[NeoGeo]"
fi

for genre in "${GENRES[@]}"
do
dialog --title "$SCRIPT_TITLE" \
Expand Down
Loading

0 comments on commit 5945e3f

Please sign in to comment.