::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-FM051
::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=e9f5b63c2032f69ecf2c109eddaf502d
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=2f8f74abd0e22e3bb5575982bb71ba49
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=be686b0bab2a67e5802029c98b4ef713
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=068a62674101c64d0150931e4f2a18b4
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=6e2beb6636b9e818098f159a7d66725c
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=fdd42670189318bb98e2173e4d0e951d
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=393d46c6892db6acd9253a1962302dd5
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=b389beb2418e76b09128d2fd42f08fd5
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=2a63c839df63d333f10e625e3059f48e
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=8979a4dcb7daefec10f599fd3a9b7d13
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=caa6cb83f0e9518f3a135ce8faf370d6
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=66596ea3cec7cc005d2bacbbc302d44f
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=6bfc8300510c490d4d70a182a1413b74
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=4b30dce81bb495a189e9c8f507e4f553
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=7dbfc747c2f87f2857775df9c24580fb
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=e54a619d57cbd2a533eebbfd16d7d47e
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=828ce84560ec2273d62bbbaea897c4b6
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=8c0ac1027530141d425b1b0df92710c0
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=b48b728f0f351360cc7c3cfae86416ae
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=e261bb93f77344eab9728841bcad30f7
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=5b44c0005a59aa4a470aa65b349bbd44
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=653b96a8e5812f3c631b0feab73faf8d

::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=1444d72209d9e42138ced63290550566
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=19138ff29ea99e03007a47d4f5f4d7f3
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=e133b5422e9b871601a5f2054df025cb
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=51ef840e5fe28a026dab01c77fcb99a3
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=805e9ed8d81da4b76f06490ad4dc5686
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=9aa607bbd4d0eddbc93d82bb4a5dab70
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=774ecdff61645b0cd8d000c4fed2da30
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=974b7d34aa07cbb2adaf71f3572e9835
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=9d7e1f904cf4fee78bb8c0f6a747ee78
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=6f66001abb730b1a7faba2b4902905f8
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=3dadc7c09abcf5ab8a457cf6a4e5dd71
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=9c8191587c6b95eabee5ea58ab705c05
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=1321fe3cec46fea065df0557cff51ade
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=b6acea2f0cc9cd4d98a9c86cd343ee7e
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=81505ece74baf690837a2acce7fc5e71
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=86b1288eb29bdac04b56b0fc8648378d
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=795a9f6eabd790a13d4b7577ee882815
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=01240dd7762309b8f3b001c486c31afa
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=1c6a8f0d867d36297feb2a15f16052d4
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=962bfe8ec5d674b1404662e03b18ee8f
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=3730edde5c776af5278612cfc922b724
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=b29f8bad0ab79b5bb1823a18b5f742ae

goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=db131e086dd97385eff698210abfcde5
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=78a8fabb6d89010b005e02c4da14b8c2
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=41cbeffe8efad693e8c9613e159d54a1
::two sets of md5s for legacy wad(mii) packer support
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=ce14fe620aba6680f9fd14ae5e0f8cdd
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=3d864e9c559fc16e1e7c7f1d26ce4018
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=376a2a6a25b584cc1cf052bbd461bfb1
: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 (but not using modmii 7.0.3 or higher) 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
