::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----------

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 + - _ ( ) [ ]

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=f6dd0b41e9db8cc64d1c33914f36a061
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=f3bf22429498367468044f4564b0aa58
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=9ed4f3c925905dbd59532b1749d3cc7e
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=77bd93b55e3879b2abdaa595b5b62b9b
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=30f45a55568b45a2f3b33de092e2710a
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=7e0e32520b3382b6bff4c2728ff3d9f8
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=4dc112d7c15b0568acf4c7c7f6cca606
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=d0b451637d9c83534327a9e63380b3dc
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=456c2d9c152a9695763400beb8a8ae05
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=b6956acd3fd622d4ec91ed0b7993af9c
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=edc5205a8338469fad4c8f6148784edc
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=da3f51e01f511d6c8e7006b8cc294620
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=759bbab4d555eaf74ca8565511f6b40c
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=a7a86e5489d440ff549d985dd6daa0af
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=47b1d38f680103b4c6ae96b9f82ed43b
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=3e921481d993aaf75b4b393ba0707c55
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=fc3c589a7cf0acdff352a023eeef6ca6
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=3595b86f94624eeea8dfe6ecf9fc0215
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=82e2629cd072b364637aa7e6ba092756
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=5531f7585ef0002d01dbfff42e2f709a
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5=fd21adc208f66af552e7bc64de77a447
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=dadc2ec9662b238702397dc022465dc5
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=aa3ea00326de33fe5aae2f479ad15459
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=b63e8bcd64aa37a508ecaed9b6847e3e
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=eddc64070a31d2039a17126899453ecb
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=66cf73ffc141d16d08838aeda2bc6e98
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=2def8dcde9b22dc1940ee857004ec87d
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=7b930e8bfc8c01ee345ebae0d4969105
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=172b33362a35a7a07c0d345396f6ec3e
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=78f9e82c53fc1690ae8ebdddb3e433b0
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=ad291e3469cf9415b4edc16a9fcafb6c
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=5eae29b2941746ad8894891d5d059433
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=8b5b41fc34b5a7bb95c83bf29b718357
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=6438c9c86efe37da6fbdcd6920b34512
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=c33e3285bed9ebef48f335e94030ce93
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=374f1add85f910ba5a94b0a2de6f82ae
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=3a19b6e4dfc95c310cce5feb03529b64
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=c60b4bd56eb6fc3c6ef03c016388c4f8
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=4fc8ecaca97d934d8fbdb6f368af04e0
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=eacbd63dbb990cc06d7e1629cec4ef6b
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=5e3f59198ba9ce565072bab453c75a77
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=c59bd347ed4882152a57497df5c71bd1
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=0c149318944e58ce1f8ccddd06c6e5ba
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=c87b5b6dae541cd176927324b552c542
goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=df4d53ed96c768510926512b9d24d001
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=e2623f696e4d108b2a0f76e3407db276
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=2dfd6d88e6006c1a05d928ade19d7ca4
::two sets of md5s for legacy wad(mii) packer support
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=dfedafec6a4a5620630f42d91620d6ee
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=200478c6a45122c36d7904273c751aee
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=8bf2ce1d294a7c80db581f722497c652
:aftervWii

::MANUALLY UPDATE MD5 for cIOS251-38!!! It's only an option in ModMii v6.6.0-6.6.3, so if not updated it won't be an issue for most people, but updating it will ensure older versions don't get errors. To manually update, go to ModMii's advanced downloads menu AFTER updating everything else using d2x-beta-md5-updater.bat, then enter 24938, change the slot to 251 and make no other changes, then calculate hash and update line below. Or instead of using advanced downloads, faster to open the d2x cIOS249 base 38 WAD using ModMii, and change it's slot to 251.
if /i "%wadname:~0,17%" EQU "cIOS251[38]-d2x-v" (set md5=e482c8c120aced70e11d84c6d5526e03) & (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
