::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-beta2
::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=5784e9ec8172b2c0506d01559cb4498d
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=60351a9fe53b3b2813e8b0788a8260da
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=a90b49be35530bcc9a00ea5deafe0662
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=e3b876e6880486031ceb0ada6feec0ec
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=8188bb62d13c670fdec61e9f1f7132f1
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=f54a7bd03080b2d1c051df88ffd86e73
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=72418556a61e1531c1b2154fed82c05a
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=a96397c43a5834fe0bd994d8720e6e00
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=da4004edda9563b067d89e9350fd5603
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=3fb50ee007dde29b9bab6fe7ca5f22ab
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=a4cac805a25d7b9420ee77917b2b1241
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=8bed5b3ecc9fe85a6c5ccec6f50846b0
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=b9d510be8ad19eb5ffd3479c7598c460
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=49d5c3130338aec33a169c48f2e06f0e
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=1b6b44897ab33bcd4da6591faadbeeeb
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=f3979e933c583560af29bc5e8332cfc3
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=3b8602320e87cac7c0c118d8f3187e97
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=eb8e2038dfaa4dd7ec839db52e284fa9
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=5b74616817ca8c20be9ccd2efca4c62e
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=37504174967f1c194b78e9344f066726
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=51a603ea851aa153f4a0b951c6077eea
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=28e03868f1fa65208995a49f4194ec9c
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=4034099f342799bf28781d138915a1a9
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=69ad61bdba00847f7634515d9db475cd
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=acfb6e501ae3fd23642084e540abf457
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=808c3ebc6ebde7a61de09ef0cb3a3997
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=bc1d177d5e70284c8ae8ae726c6647d6
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=c3895c1320920bbaba1475c13a35a51d
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=206b336124884d7a589f6dd61b97ffb0
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=013d348a431cd39b7fb5a841196174ed
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=92cfeca43248c746bfecab636062b2bf
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=685a4179c55761470b3946466040c323
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=5308bf7ca8cd3708a7207fb01917e3b0
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=a50d76545294a7c9f44d61c24c38a1f1
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=1246fac56d6444d33e580321a654127b
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=37426f0384c44f4bfaa167b7d41bbc56
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=f6cf8267cdbbc2afc10c237269f33499
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=6d8f4bc6b0bbbe33dd64431bee91c3bb
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=da575f07fcb163da6100566bef4f96c3
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=a53e396d011a34690e12744ff22eb9a4
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=6a4034c80c6d8dc020aab9e980c0bac5
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=6c3d6017d0a03306e76024192b21520f
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=9fc48dd9209a81e21896833067cd5bb8
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=2e5c4a0a9506d779e55de668ca5cb486
goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS248[38]-d2x-v" set md5=fbcff0e309cec784da081befb6cd8a48
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=829fab251f3cbffe9a1b82c4cbca0062
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=95c820e5b4f3ef3c87192c13867f64f0
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=44803cdcd8c38f8da4aab043a4a838ac
::two sets of md5s for legacy wad(mii) packer support
if /i "%name:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=fbcff0e309cec784da081befb6cd8a48
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=829fab251f3cbffe9a1b82c4cbca0062
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=95c820e5b4f3ef3c87192c13867f64f0
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=44803cdcd8c38f8da4aab043a4a838ac
: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=bc1660e1916181bb83dfd24f4915f907
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
