::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-FM050
::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")
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5=00dfcf72d4694f827f04f8a1dfa27991
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=a6dba97696e26bced6871972270cd2b0
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=d836d1753491f90e9fd231741dd747ed
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=532c05fe3fa77e3b045dd1b3edc952fe
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=8d29a57d4a195ba8785ab82feff7ed5a
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=5159ce3dfc22628f301dbac8a8c59a8d
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=c949c8ad84d4e6a70f4bc8c15ce47751
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=42c362109c64f2a80eeccddf4abe7f43
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=6fbbb65605736ab6a58bae10e65ef116
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=b0c3452318b3e39cc1f38ca8b9272f81
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=fbea23ef5fa072ea91f8f01953a86f47
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=736409c6822b5240d899eda631d2b725
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=d964ee6e8c783b78c65c158ccb66e7a4
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=462e14a844c7def8c0f6bd80916692c8
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=5e89bfd7b416d69e19a64622e5a6a222
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=e79cb2c654fe1ccd65ee3845b51e360a
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=2183393b116f9986c7b119997e65e338
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=3917d9d42b0f52def468b1369990c32d
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=c190b16db8c11c3322595a298995a18d
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=a3525a7fbb65bed408c88f23bd4472f1
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=72d9172c957f0b85cbb2a20f1594c9b1
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=8839e3e7a5727f2ad1e13922548e5f0e
goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=04727ac2c864c9a551462727093cd87f
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=d30618c3b8f66fe898142cda5fc1bd9a
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=29bc1132401a644e77a96be079d29267
: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=c86dcc3416a76f1b0e35557e1f828534
::------------------------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
