From 7a2f7b815c560d3723a2401b45074dcc6c6f82f5 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Thu, 20 Jun 2013 21:22:39 +0200 Subject: [PATCH] add NSMBW_AP.xml/HolidaySpecial-Loader.xml (DMM) + support for Newer: Holiday Special --- patches/HolidaySpecial-Loader.xml | 4 + patches/NSMBW_AP.xml | 9 +++ patchimage.sh | 10 ++- script.d/anothersmb.sh | 1 + script.d/common.sh | 4 +- script.d/newerholiday.sh | 122 ++++++++++++++++++++++++++++++ script.d/newersmb.sh | 1 + script.d/newersummersun.sh | 1 + 8 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 patches/HolidaySpecial-Loader.xml create mode 100644 patches/NSMBW_AP.xml create mode 100644 script.d/newerholiday.sh diff --git a/patches/HolidaySpecial-Loader.xml b/patches/HolidaySpecial-Loader.xml new file mode 100644 index 0000000..0d19e74 --- /dev/null +++ b/patches/HolidaySpecial-Loader.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/patches/NSMBW_AP.xml b/patches/NSMBW_AP.xml new file mode 100644 index 0000000..a4bda40 --- /dev/null +++ b/patches/NSMBW_AP.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/patchimage.sh b/patchimage.sh index d758fd9..aa59584 100755 --- a/patchimage.sh +++ b/patchimage.sh @@ -17,18 +17,22 @@ fi case ${GAME} in - A | NewerSMB | NewerSMBW ) + a | A | NewerSMB | NewerSMBW ) source script.d/newersmb.sh ;; - B | NewerSummerSun ) + b | B | NewerSummerSun ) source script.d/newersummersun.sh ;; - C | ASMBW | AnotherSMBW ) + c | C | ASMBW | AnotherSMBW ) source script.d/anothersmb.sh ;; + d | D | HolidaySpecial | "Newer: Holiday Special" ) + source script.d/newerholiday.sh + ;; + * ) echo -e "specified Game ${GAME} not recognized" exit 1 diff --git a/script.d/anothersmb.sh b/script.d/anothersmb.sh index 3bdea77..949c626 100644 --- a/script.d/anothersmb.sh +++ b/script.d/anothersmb.sh @@ -143,5 +143,6 @@ prepare_xml () { dolpatch_extra () { ${WIT} dolpatch ${DOL} xml="patches/AnotherSMB-Loader.xml" + ${WIT} dolpatch ${DOL} xml="patches/NSMBW_AP.xml" } diff --git a/script.d/common.sh b/script.d/common.sh index 71100a8..4b010c5 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -35,6 +35,7 @@ Enter Letter for the Game you want to create: A NewerSMB B Newer Summer Sun C AnotherSMB +D Newer: Holiday Special " read GAME @@ -173,7 +174,8 @@ while [[ $xcount -lt $pcount ]]; do echo -e "create wbfs images from riivolution patches.\n ***** using this script is only allowed, if you own an original copy of the game. ***** if you don't, no one can be blamed but you. Shame on you.\n ---game={NewerSMB;NewerSummerSun} | specify game you want to create +--game={NewerSMB;NewerSummerSun;AnotherSMB;HolidaySpecial} + | specify game you want to create --iso=/home/test/.wbfs | specify which ISO to use for building --riivolution=/home/test/.zip | specify path to Riivolution files --version=EURv1,EURv2,USAv1,USAv2,JPNv1 | specify your game version diff --git a/script.d/newerholiday.sh b/script.d/newerholiday.sh new file mode 100644 index 0000000..6dea3f4 --- /dev/null +++ b/script.d/newerholiday.sh @@ -0,0 +1,122 @@ +#!/bin/bash + +WORKDIR=nsmb.d +DOL=${WORKDIR}/sys/main.dol +DOWNLOAD_LINK="http://dirbaio.net/newer/Newer_Super_Mario_Bros._Wii_HS.zip" +SOUNDTRACK_LINK="http://dirbaio.net/newer/Newer_Holiday_Special_Soundtrack.zip" +SOUNDTRACK_ZIP="Newer_Holiday_Special_Soundtrack.zip" +RIIVOLUTION_ZIP="Newer_Super_Mario_Bros._Wii_HS.zip" +RIIVOLUTION_DIR="XmasNewer" +GAMENAME="Newer: Holiday Special" +XML_SOURCE="${RIIVOLUTION_DIR}" +XML_FILE="riivolution/Xmas" + +show_notes () { + +echo -e +"************************************************ +Newer: Holiday Special + +Source: http://www.newerteam.com/specials.html +Base Image: New Super Mario Bros. Wii (SMN?01) +Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1 +************************************************" + +} + +check_input_image_special () { + + if [[ ! ${IMAGE} ]]; then + if test -f SMN?01.wbfs; then + IMAGE=SMN?01.wbfs + elif test -f SMN?01.iso; then + IMAGE=SMN?01.iso + else + echo -e "please specify image to use with --iso=" + exit 1 + fi + fi + +} + +detect_game_version () { + + + if [[ -f ${WORKDIR}/files/COPYDATE_LAST_2009-10-03_232911 ]]; then + VERSION=EURv1 + REG_LETTER=P + elif [[ -f ${WORKDIR}/files/COPYDATE_LAST_2010-01-05_152101 ]]; then + VERSION=EURv2 + REG_LETTER=P + elif [[ -f ${WORKDIR}/files/COPYDATE_LAST_2009-10-03_232303 ]]; then + VERSION=USAv1 + REG_LETTER=E + elif [[ -f ${WORKDIR}/files/COPYDATE_LAST_2010-01-05_143554 ]]; then + VERSION=USAv2 + REG_LETTER=E + elif [[ -f ${WORKDIR}/files/COPYDATE_LAST_2009-10-03_231655 ]]; then + VERSION=JPNv1 + REG_LETTER=J + elif [[ ! ${VERSION} ]]; then + echo -e "please specify your games version using --version={EURv1,EURv2,USAv1,USAv2,JPNv1}" + exit 1 + fi + + XML_FILE="${XML_FILE}"${REG_LETTER}.xml + GAMEID=SMN${REG_LETTER}05 + +} + +place_files () { + + NEW_DIRS=( ${WORKDIR}/files/EU/NedEU/Message ) + for dir in ${NEW_DIRS[@]}; do + mkdir -p ${dir} + done + + case ${VERSION} in + EURv* ) + + LANGDIRS=( EngEU FraEU GerEU ItaEU SpaEU NedEU ) + for dir in ${LANGDIRS[@]}; do + cp "${RIIVOLUTION_DIR}"/MessageEN/* ${WORKDIR}/files/EU/${dir}/Message/ + done + cp "${RIIVOLUTION_DIR}"/OpeningP/* ${WORKDIR}/files/EU/Layout/openingTitle/ + + ;; + + USAv* ) + + LANGDIRS=( FraUS EngUS SpaUS ) + for dir in ${LANGDIRS[@]}; do + cp "${RIIVOLUTION_DIR}"/MessageEN/* ${WORKDIR}/files/US/${dir}/Message/ + done + cp "${RIIVOLUTION_DIR}"/OpeningE/* ${WORKDIR}/files/US/Layout/openingTitle/ + ;; + + JPNv* ) + cp "${RIIVOLUTION_DIR}"/MessageEN/* ${WORKDIR}/files/JP/Message/ + cp "${RIIVOLUTION_DIR}"/OpeningJ/* ${WORKDIR}/files/JP/Layout/openingTitle/ + esac + + cp "${RIIVOLUTION_DIR}"/Sound/Stream/* ${WORKDIR}/files/Sound/stream/ + cp "${RIIVOLUTION_DIR}"/Layout/preGame/* ${WORKDIR}/files/Layout/preGame/ + cp "${RIIVOLUTION_DIR}"/Layout/textures/* ${WORKDIR}/files/Layout/textures/ + cp "${RIIVOLUTION_DIR}"/Sound/*.brsar ${WORKDIR}/files/Sound/ + cp "${RIIVOLUTION_DIR}"/WorldMap/* ${WORKDIR}/files/WorldMap/ + cp "${RIIVOLUTION_DIR}"/Object/* ${WORKDIR}/files/Object/ + +} + +prepare_xml () { + + echo -ne + +} + +dolpatch_extra () { + + ${WIT} dolpatch ${DOL} xml="patches/HolidaySpecial-Loader.xml" + ${WIT} dolpatch ${DOL} xml="patches/NSMBW_AP.xml" + +} diff --git a/script.d/newersmb.sh b/script.d/newersmb.sh index 99f8cf4..e93731c 100644 --- a/script.d/newersmb.sh +++ b/script.d/newersmb.sh @@ -151,5 +151,6 @@ prepare_xml () { dolpatch_extra () { ${WIT} dolpatch ${DOL} xml="patches/NewerSMBW-Loader.xml" + ${WIT} dolpatch ${DOL} xml="patches/NSMBW_AP.xml" } diff --git a/script.d/newersummersun.sh b/script.d/newersummersun.sh index 921bfc1..c721943 100644 --- a/script.d/newersummersun.sh +++ b/script.d/newersummersun.sh @@ -125,5 +125,6 @@ dolpatch_extra () { ${WIT} dolpatch ${DOL} "802F118C=53756D6D53756E#7769696D6A3264" --verbose ${WIT} dolpatch ${DOL} "802F0F8C=53756D6D53756E#7769696D6A3264" --verbose ${WIT} dolpatch ${DOL} xml="patches/SummerSun-Loader.xml" + ${WIT} dolpatch ${DOL} xml="patches/NSMBW_AP.xml" }