::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-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 + - _ ( ) [ ] 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=b09a791fbe6494dd58d6e9a62a0d9fc9
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=d44a3744406e144dcf72e627af04036e
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=46dea8f55ff93c075c6bff87015fb8d3
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=7fe6574bacc1a8c020ae4241c47e0cf4
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=f716e4e728ddbdd899359a406256c158
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=fe095247d865e91951ef73d565be149a
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=025d173725fc9b2ad7ec57c3d58f4327
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=02b81c21b298a1260f538b64de1abf07
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=2cf81062c6c947592c3d938614dd27d2
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=7a30d1594adc815c3dda93d51b3ecd85
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=df4a18622a67337a99b7b751d0f6eaa3
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=5fee3fb7fd8bee9fbe3e1a0b9d80caeb
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=53a247c82f51b2bc954898f297a349f6
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=2b4a28217641f59db1fedfd2e73fbf90
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=bfdf6b58f8e8ced39e1dfbe0c7da8560
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=2e0ca9b80e380f8482bedf79e5ee3173
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=de17d53fde7e8d55423fba014ea5309b
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=866ae9d358ced78df0086baf8b0e9053
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=1cddf8205fc25c8465762ef49504bacc
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=dda4ed9e27630f7b4064eefc16bd1ae1
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=616048f5c40f7f330efb2c5e4b307415
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=bd2b59f9009b0459e4ee73e35550db20

::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=e9f5b63c2032f69ecf2c109eddaf502d
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=f044b6b418433c7496a0994fdfce7b35
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=b48b759cb71332d8f033a33ceb9da0e1
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=068a62674101c64d0150931e4f2a18b4
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=6e2beb6636b9e818098f159a7d66725c
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=fdd42670189318bb98e2173e4d0e951d
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=393d46c6892db6acd9253a1962302dd5
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=b389beb2418e76b09128d2fd42f08fd5
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=2a63c839df63d333f10e625e3059f48e
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=8979a4dcb7daefec10f599fd3a9b7d13
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=caa6cb83f0e9518f3a135ce8faf370d6
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=66596ea3cec7cc005d2bacbbc302d44f
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=6bfc8300510c490d4d70a182a1413b74
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=4b30dce81bb495a189e9c8f507e4f553
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=7dbfc747c2f87f2857775df9c24580fb
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=e54a619d57cbd2a533eebbfd16d7d47e
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=828ce84560ec2273d62bbbaea897c4b6
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=8c0ac1027530141d425b1b0df92710c0
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=b48b728f0f351360cc7c3cfae86416ae
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=e261bb93f77344eab9728841bcad30f7
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=5b44c0005a59aa4a470aa65b349bbd44
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=653b96a8e5812f3c631b0feab73faf8d

goto:aftervWii

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