::d2x-beta.bat should be saved here in order for ModMii v4.6.0+ to use it: modules\More-cIOSs\{ANY FOLDER NAME}\d2x-beta.bat

::--------update what comes after "d2x-beta-rev=" and "ciosversion=" below----------
::"magicword2" should be contained in this file for modmii to not check for updates or enable legacy cIOS build mode (effective v7.0.3+)
set ciosversion=21010
::must be <=65535
::if ciosversion above is different from version in ciosmaps.xml, then ModMii v6.5.2 or higher required to build it successfully

set d2x-beta-rev=10-beta52
::This info is used to sign *00.app file for cIOS detection, everything after "=" but before the first "-" is considered the version # and it must be a number! Good examples are "5-beta1-test1" or "5" or "999". Bad examples are "5beta1" or "five-beta1" or "-5-beta1"
::everything after the first "-" is considered the version string (limited by 16 chars) and it only recognizes letters, numbers and + - _ ( ) [ ] but do not use underscores, breaks some ModMii advanced download conversion stuff
::5 chars of version string is used up if ciosmaps_vWii.xml exists to append "-vWii" to tag, so version string limit is actually 11 chars if vWii is supported

set cIOSFamilyName=d2x
::Only change this if building a cIOS that isn't a "d2x" branded cIOS. This string is limited by 16 chars and it only recognizes letters, numbers and + - _ ( ) [ ]


if "%wadname%"=="" goto:endofd2xbat

if /i "%wadname:~-5%" EQU "-vWii" goto:vWii

::------------------------Section to update (below)--------------------
::here you should enter the new beta cIOS hashes (under the OLD non-beta "wadname")
::d2x-beta-md5-updater.bat can be used to help update hashes
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=e81be61bd0faac806b9ab90ef2b5f7ac
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=18d8040afd38e6f0c1169070ae71bea6
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=470657c8852e9323604a5a7bdac40606
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=7b26a8e23939dc4be88bb13ae3c6b259
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=26ed979716a94d493a20ffb5af2a4f8d
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=eeda2f1d91f4f88181382894594609d8
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=f273306c76130197a825461e3bfb0a38
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=0cc79cff16400b0d539b14029c08cf63
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=ec854d35b2afc33bde67edc512703fb5
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=6acd5a7541b1ba504617488d9c76f461
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=46d50d00e5ce7251e5c4813aac6ccff1
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=03f7f797a336e9e73714ab28fa7dfdb0
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=90ba909f7e12c84c8f390a0f4bb9691d
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=383e17fb25ab59c45a38b9e62cf78cee
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=f4d063e2c787112ad472da7127ff77e7
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=8ad058920bbba1ad38b0f6f668b2ca77
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=6325cc6c18e80541ead7906ffc464542
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=3a3e9a051cb6882318291972c1c5dff3
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=4e38f079d60ce7f70a743cb49311fbf7
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=429e965f17229d6f529373afbe6b928b
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5=57c00952d6c3324eb6e11ff85f4ec017
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=ab4a268fb2c418ec1fda08e838868782
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=f6dd0b41e9db8cc64d1c33914f36a061
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=f3bf22429498367468044f4564b0aa58
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=9ed4f3c925905dbd59532b1749d3cc7e
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=77bd93b55e3879b2abdaa595b5b62b9b
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=30f45a55568b45a2f3b33de092e2710a
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=7e0e32520b3382b6bff4c2728ff3d9f8
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=4dc112d7c15b0568acf4c7c7f6cca606
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=d0b451637d9c83534327a9e63380b3dc
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=456c2d9c152a9695763400beb8a8ae05
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=b6956acd3fd622d4ec91ed0b7993af9c
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=edc5205a8338469fad4c8f6148784edc
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=da3f51e01f511d6c8e7006b8cc294620
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=759bbab4d555eaf74ca8565511f6b40c
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=a7a86e5489d440ff549d985dd6daa0af
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=47b1d38f680103b4c6ae96b9f82ed43b
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=3e921481d993aaf75b4b393ba0707c55
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=fc3c589a7cf0acdff352a023eeef6ca6
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=3595b86f94624eeea8dfe6ecf9fc0215
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=82e2629cd072b364637aa7e6ba092756
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=5531f7585ef0002d01dbfff42e2f709a
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=fd21adc208f66af552e7bc64de77a447
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=dadc2ec9662b238702397dc022465dc5
goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=a42b6428df7ddcf24f18b7b2d529082f
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=6c4cbf45dc219288d837f49d0e2b1f6f
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=4654bfd9bce985d60d6870dc6c6de6f6
::two sets of md5s for legacy wad(mii) packer support
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=a42b6428df7ddcf24f18b7b2d529082f
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=6c4cbf45dc219288d837f49d0e2b1f6f
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=4654bfd9bce985d60d6870dc6c6de6f6
:aftervWii

::cIOS251[38] is only an option in ModMii v6.6.0-6.6.3, so if not updated it won't be an issue for most people (this is the same as 249[38] with its slot changed to 251 by patchios.exe
if /i "%wadname:~0,17%" EQU "cIOS251[38]-d2x-v" set md5=6080b8f39e54e12514d13cd948acc3a0
if /i "%wadname:~0,17%" EQU "cIOS251[38]-d2x-v" set md5alt=%md5%
::------------------------Section to update (above)--------------------

::----------Additional Instructions---------------
::save any of the following beta files to the following directory
::if any of the following is not found, the standard d2x module used in the previous ModMii release will continue to be used
::modules\More-cIOSs\{ANY FOLDER NAME}\MLOAD.app
::modules\More-cIOSs\{ANY FOLDER NAME}\FAT.app
::modules\More-cIOSs\{ANY FOLDER NAME}\EHCI.app
::modules\More-cIOSs\{ANY FOLDER NAME}\USBS.app
::modules\More-cIOSs\{ANY FOLDER NAME}\DIPP.app
::modules\More-cIOSs\{ANY FOLDER NAME}\ES.app
::modules\More-cIOSs\{ANY FOLDER NAME}\FFSP.app
::------------------------------------------------------

::set md5alt=%md5%

::change some variables

if /i "%wadname:~-5%" NEQ "-vWii" set wadname=%wadname:~0,17%%d2x-beta-rev%
if /i "%wadname:~-5%" EQU "-vWii" set wadname=%wadname:~0,17%%d2x-beta-rev%-vWii

if /i "%name:~0,17%" NEQ "Advanced Download" set name=%wadname%

:endofd2xbat
