::d2x-beta.bat should be saved here in order for ModMii v4.6.0+ to use it: Support\More-cIOSs\{ANY FOLDER NAME}\d2x-beta.bat

::--------update what comes after "d2x-beta-rev=" and "ciosversion=" below----------

set ciosversion=65535
::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-b52-ST-FM050
::This info is used to sign *00.app file for cIOS detection, everything after "=" but before the next "-" 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 + - _ ( ) [ ] but do not use underscores, breaks some ModMii advanced download conversion stuff

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=da038f3d6073ae9bac569d0bfe17942d
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=3fa6e78d8fb5b07c5d7ceb844e338381
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=51b181b45986d558878b5ae459fa0492
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=324a2c5e843f58c8c49f1a32ad3d2820
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=648353217651af465e64619be7d5e1ae
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=3d6e3fbb8653df228c30425eecd5f3c5
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=71e072f31c8cccb9a8344edce9c19dce
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=1eeb380581def6d60cea27b110fe8dc9
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=4de47668773331ba4aba5a7d7758cc2e
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=ef8e27b76729f940c6b5da73ed0a4a6b
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=f70b89bf4833d3304c4ae523d8415c4b
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=ab77f3d3be61d2ac548dda2fd617107c
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=283c002206b43fc7cd8e16e5c268b475
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=f3a9eea25d5d10d18f69c311d41c493a
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=073b7f738ed3250c52f7f7c9e121c650
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=b6cdf303a7beb078d4dbda74d07c5199
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=7e8cc5e85aed5db448eec2f6120c3c8d
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=3099c4dc4a1438324e45bf8220ff3b98
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=7e2693d6e7d54522d951d1985a21f4f1
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=b7c454a2cdf65c0af8d8485239879b82
if /i "%wadname:~0,17%" EQU "cIOS251[38]-d2x-v" set md5=76bb35b5acbd4209eec8805982d557d3
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5=a63553a2b234edf04fc408abf73b7695
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=7f3b6730470a897f86e790ef2ac7d0e5
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=f90246c2e3407928000631677061a015
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=f7522e841e81ee489c832f248dd092a5
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=218b235e7a2a6fc7a0f92c0ddb51ec44
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=2fd68ec81dfc4bdd1bf59cb27ccbbcdd
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=218465ba1986a5d1582689199d2cbe3a
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=9e127d23f1e221d2e9202058e37ba070
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=fabef2e424f521f189d86d700d3d1787
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=c6c31b4875f84ac50a698304bcb324c8
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=2c60aa5c9fbea0a8549ec86c874d688d
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=a88285853e2858ad54c8549cfe638724
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=656473dcb7c8f14eb9314f45aa51286c
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=b93b1ccb3d28e04448b51fbf74e33e14
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=6c2ae4aabbcbd74d25f13683d727ad8b
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=c726e539e220702a058ed6c50b62bb16
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=cb6675f0164d18f61a622bcecc609d8f
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=0514c1a4ee918e2a8b8473e130bd0ab7
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=7361649827a56c776e149a546c81a7a5
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=f0a0d70a7b0df97873f9b68bf782e4e3
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=792b9bd277d9af0a2e05423d482069de
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=02367ad757dd1dbafff7f7d19833756f
if /i "%wadname:~0,17%" EQU "cIOS251[38]-d2x-v" set md5alt=76bb35b5acbd4209eec8805982d557d3
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=37588265366af0053be57b3c950868b3
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=7720d21bbbd0c45d6602831c5324fbc2
goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=3c98f24d567185cdbc4745453739c580
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=d209917366666f8ce46d0164c69a4dad
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=95359848f6f8e138aed217130b9b1225
::two sets of md5s for legacy wad(mii) packer support
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=4fb882f238a8425b96d164c0f554bc93
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=dadc6a2d2973689ec4c39ad518df562a
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=1371e2ad67478510bf1a69ba40b22776
: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
