GameCube-Homebrew-for-n00bs/create-sd-media-launcher-ma...

76 lines
2.7 KiB
Bash
Raw Normal View History

set -e
my_swiss_ver=r714
my_wwhack_ver=v1.1.1
my_gcmm_ver=1.4f
my_gbi_ver=20191107
pushd ~/Downloads >/dev/null
echo ''
echo 'Creating ~/Downloads/GCBOOT'
rm -rf ./GCBOOT
mkdir -p ./GCBOOT/MCBackup
echo ''
echo 'Download and extract Swiss (Zip)...'
rm -rf swiss*
curl -fL https://github.com/solderjs/swiss-gc/releases/download/0.4r714/swiss_r714.zip -o swiss_r714.zip
unzip -q swiss_r714.zip
# Copy swiss as an auto-boot for SD Launcher (does nothing otherwise)
2019-12-12 02:18:35 +00:00
rsync -avP swiss_${my_swiss_ver}/DOL/swiss_${my_swiss_ver}-compressed.dol ./GCBOOT/
rsync -avP swiss_${my_swiss_ver}/DOL/swiss_${my_swiss_ver}-compressed.dol ./GCBOOT/autoexec.dol
echo ''
echo 'Download and extract GCMM ...'
rm -rf gcmm*
curl -fsSL https://github.com/suloku/gcmm/releases/download/${my_gcmm_ver}/gcmm_${my_gcmm_ver}.zip -o gcmm_${my_gcmm_ver}.zip
unzip -q gcmm_${my_gcmm_ver}.zip
# Copy GCMM as a bootable dol (which will be launched from Swiss)
rsync -avP gcmm_${my_gcmm_ver}/gamecube/gcmm_14f.dol ./GCBOOT/
echo ''
echo 'Download and extract Wind Waker hacked game save'
# See also: https://github.com/FIX94?utf8=%E2%9C%93&tab=repositories&q=gamecube
rm -rf WWHack*
curl -fL https://github.com/FIX94/ww-hack-gc/releases/download/${my_wwhack_ver}/WWHack-GC-${my_wwhack_ver}.zip -o WWHack-GC-${my_wwhack_ver}.zip
mkdir -p WWHack-GC-${my_wwhack_ver}
pushd WWHack-GC-${my_wwhack_ver} >/dev/null
unzip -q ../WWHack-GC-${my_wwhack_ver}.zip
popd >/dev/null
# Copy the hacked save file
rsync -avP WWHack-GC-${my_wwhack_ver}/gzle.gci ./GCBOOT/MCBackup/
# Copy Swiss over as the bootable launcher
rsync -avP swiss_${my_swiss_ver}/GCI/boot.gci ./GCBOOT/MCBackup/
echo ''
echo 'Download and extract Game Boy Interface'
rm -rf gbi*
curl -fL https://github.com/solderjs/Game-Boy-Interface/releases/download/gbi-${my_gbi_ver}/gbi-${my_gbi_ver}.zip -o gbi-${my_gbi_ver}.zip
mkdir -p gbi-${my_gbi_ver}
pushd gbi-${my_gbi_ver} >/dev/null
unzip -q ../gbi-${my_gbi_ver}.zip
popd >/dev/null
# Copy Game Boy Interface as bootable from swiss
rsync -avP gbi-${my_gbi_ver}/gbi.dol ./GCBOOT/
echo -- '--zoom=2.875' > ./GCBOOT/gbi.cli
# OR you could boot directly to any dol software that has been converted to gci format
# rsync -avP gbi-${my_gbi_ver}/MCBACKUP/gbi.gci ./GCBOOT/MCBackup/boot.gci
popd >/dev/null
sleep 1
echo ''
diskutil list
echo "!!! BE CAREFUL !!!"
read -p "Which WHOLE DISK should be ERASED AND FORMATTED? (ex: /dev/disk8): " my_disk
diskutil unmountDisk $my_disk
sudo newfs_msdos -F 16 -v GCBOOT $my_disk
diskutil mount $my_disk
2019-12-12 01:46:49 +00:00
rsync -av ~/Downloads/GCBOOT/ /Volumes/GCBOOT/
diskutil unmount $my_disk
2019-12-12 01:46:49 +00:00
echo ''
echo 'Done!'