::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----------
::"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=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
::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 "cIOS249[37]-d2x-v" set md5=441831ea312a8801689fbaa5766d9807
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=76ac52235155e4c67363c850589d28cf
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=d5b43065804e0b4824b70ce013ae9088
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=62a65cbb49801c5ed408fda6305cbead
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=d4da0ec3e54c97c31d741102d79790f0
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=69a69dd0f4b53f5cf8442f6bb3f6de32
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=26e6734e848736919cd311debebaf664
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=1cf2d22a6e7221d3756d12b43de4d89d
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=ff6e1c5c2e7fdfd22635b413b3d379ff
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=08d5549159a0bcaa080ccd60df66bd93
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=72e40db9a079a2805a517ed44a99d349
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=1d2b2defbd2892d1209e08f1f7bf5893
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=fa2e3a97caf2fd4e8da1c9c7465eb73e
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=3444ee76a636a2d375861e8480ea9cda
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=c485fe198e94397b4b9f41a3152fe867
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=4eaa1231c3b6d6c42fdc78a073a98d51
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=899a291c51b8dfa9fe1830bcfd1debda
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=16750e951a91175bfeabc416fd6bc8ea
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=ab0c8d15933c512705d2eb8a435331d8
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=87eb05a9a7634540739ac1e6eea2d867
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5=df823ee47fda001be60e06d8eb91228d
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=65e4644fff3f5193d8441f08925a8b6a
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=da038f3d6073ae9bac569d0bfe17942d
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=3fa6e78d8fb5b07c5d7ceb844e338381
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=51b181b45986d558878b5ae459fa0492
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=324a2c5e843f58c8c49f1a32ad3d2820
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=648353217651af465e64619be7d5e1ae
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=3d6e3fbb8653df228c30425eecd5f3c5
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=71e072f31c8cccb9a8344edce9c19dce
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=1eeb380581def6d60cea27b110fe8dc9
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=4de47668773331ba4aba5a7d7758cc2e
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=ef8e27b76729f940c6b5da73ed0a4a6b
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=f70b89bf4833d3304c4ae523d8415c4b
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=ab77f3d3be61d2ac548dda2fd617107c
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=283c002206b43fc7cd8e16e5c268b475
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=f3a9eea25d5d10d18f69c311d41c493a
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=073b7f738ed3250c52f7f7c9e121c650
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=b6cdf303a7beb078d4dbda74d07c5199
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=7e8cc5e85aed5db448eec2f6120c3c8d
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=3099c4dc4a1438324e45bf8220ff3b98
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=7e2693d6e7d54522d951d1985a21f4f1
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=b7c454a2cdf65c0af8d8485239879b82
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=a63553a2b234edf04fc408abf73b7695
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=7f3b6730470a897f86e790ef2ac7d0e5
goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=c77f7098a6e7475222293a86d1637c56
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=5288004388773263d69dbf71544c9313
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=b6900fc2acc4766cf270e73a6a020dda
::two sets of md5s for legacy wad(mii) packer support
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=c77f7098a6e7475222293a86d1637c56
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=5288004388773263d69dbf71544c9313
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=b6900fc2acc4766cf270e73a6a020dda
: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=76bb35b5acbd4209eec8805982d557d3
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
