::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----------
::"magicword2" 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=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-beta3
::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 + - _ ( ) [ ] but do not use underscores, breaks some ModMii advanced download conversion stuff
::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 "cIOS248[38]-d2x-v" set md5=01d9a8eec303a988cb8803778bbe61ed
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=c5f576bd2f378a0ba3f5f67c64c9889e
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=53a12042bff24d33bee29e0b8e944cf6
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=92e3099d4877b7f457bacee5f5bf7e08
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=6482177e81037419d43e9942dec75d55
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=f1f3f0d7e97ee51d118aff7a6d691e89
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=ccd755778114323e063eb478e733fbe3
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=4324575f0a180fa4782407571e344e59
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=74d2c686ee7081051849ea124c5ed1b1
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=9414289defb84aa1f2088b490529c94d
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=f49d8558a22f395f8de47261779798fc
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=0bdbb164f400ec41d0738be5cf8ccfc2
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=007368733d9a0a6cbba8073b86644605
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=0b575a4f209fa1b4229c108ddc0a49c5
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=5034de6273dc09f3b6e4b239506578e6
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=7471f22d7469ca4bf5076793d1052dcd
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=8ff4be5b685ad66534c14848be37c0f9
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=be1e3fe1e8828e531ebfab62e61bb0cc
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=de5e1f56927a73a6b90a6d205dc71857
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=23983b94c33164897aed128b9acfbfdd
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=3ac2277f83b7e8f780a69c9eb3507c60
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=792ed24427a1ef167a1cf13ee6ec25df
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=3d8393a51e7db235b8b8299aa42654fe
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=1f6ca1bf4867bc583e7383445e88c892
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=89211b1579c8f5f6c0180befe6f3a3b9
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=fd57732f094d4bb99a5cf8a963f91544
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=acbbc54fcbb74000771d77ad2a68347e
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=4fd3d32fcc321fe16b00e32a53347dcb
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=fc409d4612932179cc66ca694c000000
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=5bf5bd069dbd0a78f5bf6c55cb190be8
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=e007d3f460e492c390d31cc32e006892
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=179dcf116b97795cebd691273caaddab
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=8bf497bbc76912e8c0c9aa9027f5fd87
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=1b48cb27d88dc9085aa49bc54a0a0b55
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=98882f6aea70c96774ede5890fdbc26f
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=3e580bdf3302974c92cd9c286c298628
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=4a4415cca4d0a90513eed5081b205b93
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=fb84eb989c31cbc393fffe75e5af68a7
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=415975e27091819c07ff8310b9c849fb
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=8c95b62974b0ed01d586638db2532f2c
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=c6d0d66a1d62225d34a688e53e5d002c
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=517e7ab1e5bcadf9449b78348d6a1471
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=fedc7b7a8fe590e5b33b9b2fc4ef126d
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=54eb29a835f270c086b6843d670f2178
goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS248[38]-d2x-v" set md5=6467cc0d284362964e5c33f5dbcebc71
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=d93c281bbdd6c58a2ca02f404dd1e65d
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=8345a6975808ef5d25a95f8073d08ab1
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=a1e2e4a0a5ebd589cf477898ca502949
::two sets of md5s for legacy wad(mii) packer support
if /i "%name:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=6467cc0d284362964e5c33f5dbcebc71
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=d93c281bbdd6c58a2ca02f404dd1e65d
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=8345a6975808ef5d25a95f8073d08ab1
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=a1e2e4a0a5ebd589cf477898ca502949
:aftervWii

::cIOS251[38] is only an option in ModMii v6.6.0-6.6.3, so if not updated it won't be an issue for most people (this is the same as 249[38] with its slot changed to 251 by patchios.exe
if /i "%wadname:~0,17%" EQU "cIOS251[38]-d2x-v" set md5=3087bda424d569649b212fd8a2ff3911
if /i "%wadname:~0,17%" EQU "cIOS251[38]-d2x-v" 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
