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

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=24d729e630affc945be52b59028484d4
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=c1bdb40996124cf36dd3b33e2c7b01e8
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=4cf7ce8409953ea734229e7c8d982a7c
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=d0a66e81055954c1492461e4a2e57396
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=3e7980c68673f0168148706f55308790
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=b4e4770bb02ee833ac54cf223a127473
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=feebf092670a0fdd792311e47a7c31b9
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=f3e2174f179091ff3e07d6dbbe14c8b4
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=506c6628fd456b3859aa106cb3a0fb52
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=a2679c7ad998c278b9694329da204a77
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=7295ed9a5861fb9cd08913ab396f84cb
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=756c16aa6ab75785ca9079155c1620c1
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=c19f737c8556d334cc33a0229d0e1021
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=a3f3dba685fe50821ac81e55792d3ab8
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=6cc5f97675bcfe33fdabda9aeb1f3801
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=a3b653329bdb90cf5a45dfb9b6629f96
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=553041b9e9cb0baf7622e0677d133535
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=45bb691a5797bbbb187a2467d574fbf8
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=86041283d43588f5b2a058d9ee91c1d4
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=8720637ea0300a249fed0d4c932fafba
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=df5c66aaf0406d86837df6aacd50dc56
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=b3b761f8fbab7297a4eca62baf17c468
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=8ee52c78a2caadf10c03230f4a8db473
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=3c4cdef17d8443904f5e9f32538c59f3
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=329012422994b36316dc42a519d8b392
: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
