
After thinking about my handheld console and ROM situation, I was thinking to get a 128GB SD card for my retro gaming needs, but this huge amount of storage will only make harder to search through all games. So I decided to use 32GB. This should hold ROMs for most classic systems, though I'm excluding the more storage-hungry Dreamcast, PSX, and PSP.
Rather than cramming every available ROM onto my device (when most will never get played), I developed a smarter approach. Why store games I'll never touch when storage space is limited and many retro titles haven't aged well?
My Filtering Method
My solution is straightforward:
- Load video previews into VLC playlist
- Mark games that look interesting
- Copy those selected games to a dedicated folder
- Run a script to grab the corresponding media files (images/videos)
The Technical Challenge
While working on my bash script, I ran into issues with the "find" command not handling filenames containing spaces. I solved this by temporarily changing the IFS (Internal Field Separator) variable:
SAVEIFS=$IFS
IFS=$'\n'
# Get the list of files
FILES_LIST=$(find $DEST_FOLDER -maxdepth 1 \( -name '*.*' \) -type f | sed -e 's/$/\x01/' )
# Process each file
for filepath in $FILES_LIST
do
# Get filename with extension
FILENAME=$(basename -- ${filepath} | cut -d'?' -f1)
# Get filename only
FILENAME="${FILENAME%.*}"
process_media $FILENAME "images"
process_media $FILENAME "videos"
done
# Restore original IFS
IFS=$SAVEIFS
Results Worth the Effort
This approach paid off nicely. For example, I trimmed my GBA collection from 6.1GB down to just 1.3GB, keeping only games I genuinely want to play.
Source code
https://github.com/onesixromcom/easyroms_media_copy
Resource Credit
A big thanks to the ArkOS team for their excellent "easyroms" collection. You can find their 100GB archive on archive.org:
- https://archive.org/download/retro-arcade-v-04-rg-35-m-p
- https://archive.org/download/retro-arcade-v-04-rg-35-m-p/easyroms.7z.torrent