::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----------
::"magicword" 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-beta53-alt
::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 + - _ ( ) [ ]
::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=34d5c592f7b41efedc6f025ced771757
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=f6a271568ba9953b090575b540fcce32
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=6bede6601fdb734cfd2c94097c928faf
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=0cbb667beaed8920397389f773656975
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=caac802f3c1f299679d9fbef2544ffe8
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=0f662c6d46b776bac6761a29174fa212
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=e4d692c3ee1cb89f88e88217aec20204
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=00a8900a5a5ed9d8a51dece778cee09c
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=021871027856fbc085a0dcc604e6bcb3
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=82cea2aaf11835978758d51c5a37b559
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=7a0e0d3d53315ee1e8e8b004a6ace7ff
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=07f297d47b0b0482854dafa66b569436
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=b4257f9fa565b1d332b0bbd35457945f
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=daa42bdda22c4ef1306256102324d99f
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=d76c94ffbf3b0e1f32e6bd14bcf533ab
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=1bb1c38d35cdb2a24178d64a924d91d6
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=4bed67e993430df430d4e8cda78d274c
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=07b41ebf1e904cce8c0e91d80028c8af
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=282c39cb36fd246b2a1f4c9840ec7cd4
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=a874bc3b2e4b5b99bc60d20a949d279c
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5=0b092a93fcc16a88de5786f39e27192c
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=17838e4f2354fd1cd98b0502d5975355
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=63b9b78b1ad0cee655a0177416cdb4d9
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=adb6aaeb202a030ac0bd1b9f3815257f
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=8f4bfd0c642e0c850117db1eb7c52bc1
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=b58e7d907f83aeb571759e5b2ffcea39
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=f3960970be0713c0cd9e74f8ca4ed687
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=9e226d850ab75b8e0633761f35979949
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=7a94b0b6e617ce5062c156b9ca772819
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=becfc6c94fa3f6fe00b326b9e16ea743
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=d42f178ad7c618aa8ad8cf9e61a6647a
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=960ee0bfc077723ba87f3b7ee792c7dd
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=fc82e6d3eba123c31cf60318db3372a2
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=00259d526f73163e2d56aa7e780dd674
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=3dbdd126d2fe23547a7812b54453cfa5
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=d10a33ec0f3af3632329866424bb5f78
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=d1e733fce18bc4b4c83a9c2dc0099910
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=a35586b2576538a6441413a3f8a6258b
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=7a4c79d610ffd93907358a7c49975c8f
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=30718997c6395acf166180b3408e376b
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=81e81ba8d1b797b711434c23068212a5
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=e365c6ccf15686b730e0040e08415c31
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=c1bf77218e0b6c8a01bf3a813be4af43
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=b712913dfbf401b5a6b70a54afab0361
goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=7d0f6adc1dde59ae20852dad026e256e
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=b415fd3237ccf666c07c1ac4ab515c8d
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=dd9533f375a5f5d3d819b8597705c01d
::two sets of md5s for legacy wad(mii) packer support
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=eea96efcbe7d5eae557c43d232194e15
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=4f5df2fec37309b94070a78e5ba9d18c
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=ab9d0b805533ea011ecd3bf325b546ac
: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
