::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=21011
::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=11-beta1
::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 "cIOS248[38]-d2x-v" set md5=c923f03924a221e351ab8144bb22dcc8
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=416b8ace56bba3414972389eebc7107e
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=3ed5c84c30cff03a54296da4fff017b3
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=fe778040f8b3d8e60a5899dbc216b02a
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=256a2f93b3b5e4d0f28aa16386fd6d13
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=64aa732b55a24ed5d7c30209ef4bb98f
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=bbf2c129b05ecb29a075248d2df9b747
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=bc3088589b47c3116182f9f46179ef30
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=4c9e823a1d58404648ba7eb522e4b10e
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=71119fe575fc98cc84578d8755ac9b64
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=71c15b497f7e9d5eb78cd00163990dad
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=761d402cb0c95496dfcf4bbd5a55fd8f
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=f239a48c45a2ebcfe74631474b40a1a8
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=b497a83cc81d0ef318fa4e44566d4321
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=63ea74ec12b4ae9d569fd9e64f02c057
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=9d9d1544dd01487add4bc3e407d3be43
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=2df0cf456b3b45443fb7ae184d2a6473
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=6d223e80f3331d5e7af3570896e6a0df
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=b7c682d4d328e921d968830814491aa7
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=1364b02a4afa297f53ebb8caac37c3ca
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=758de3fd73deb9e947cea9ffb16c56f2
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=7104c7a2add25bbd8851a313eb7fe01a
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=b61e2147e51d550dc9c2cc75f01dc075
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=f01d1f51320df09c8b6f463ee1b3a680
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=b57311e21cb827da25bc181b3b92dfb6
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=45a8dfb823397fcec87f6c9490157d56
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=bd16baff889cf2a3030a50c872fa041d
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=2eefdba333c4193388df953b066a9976
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=3317477a8a3766ece3d631df58e5e448
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=b3a66f43eee22661fe0de3081e86188b
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=e3eae58945eec36a338f9fd63b0aa0ec
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=d727e9dfae4ee65284db47b41258d4a9
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=568e4e3a71b8718d8ace06fc0e8d510d
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=825885a64713b2ea949b8836112854f0
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=7dd7d695c798c0493d8b96ba06eb9dc6
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=ea5bd138465b82a6b17693f8aab47b41
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=284f5c8d83a5f875c53e300ee068ae89
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=79eeee099588cbdb9d4f2c18cca4e862
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=4b690029653e269283e38f1555623cfd
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=a7e253e1f0b56d3d82c5be75d6911919
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=abfe1693a7e9917cf1dfa8317ce35b06
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=327c2c1cb6fd2ad35fb9c0c26f230f51
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=7c4a5e471a8cbd45951e59476dff7c23
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=4b1476b21a6d42cbc26b221b04926a62
goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=977e45b816ac56fc2c05b9a52b1842f9
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=e5075f99064ed2774bed66a65ea234e5
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=186b944df8402a0d64f43952cc92bd6c
::two sets of md5s for legacy wad(mii) packer support
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=e7aae249a2a2af3f499699c4ce131998
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=5965f2a30d54ea1dde3b06f1223ed1a1
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=36a5e4778855fb2ad3c1c6fd05e74b85
: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=ff99258eaa43fbb9cd37c5ecff815658) & (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
