::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
::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=51ffccc8ab1bb066c880652abf61441f
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=86e3a9ba06d05fd1595c4abf873082e3
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=cc92dd6e524498f55365795fcffac219
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=bfdeeb62fd919030015bce05f15309a7
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=1c16c5b0608bfd1139e99b7f5a84e427
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=42fd176a6d5f18041f85f2d062dc4cd8
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=da405dadd953b9896b28eae8d388ccfd
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=518a69f7ec4aa362fa7b7a219e8a1ece
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=a4e32ace85e28f79cd539c6a54eaf0d5
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=a21fbe7ff6c313bf1c9c2f7356075c87
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=388115a275fa0c131a90beb81ff0a1d9
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=0661188438b6fce1f23e9f231bfdb045
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=19e664ad2acb7560e299518e14017d66
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=b6f514f3f0588e3652c6804773545774
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=3bcc43451b1004861da2b06ddea80261
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=be67b455ec3092890ff8d888067e6d18
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=ab5e721f19a262d1d135763e70548185
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=aae44433d7f24ceedae0524bc00f01e3
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=9b1164fd3639c78046864ce42d0ed36c
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=45309d908b909d0b8660760ffb415798
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=8f60546c1b8f20e9c2ec91623929bf55
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=15a7b916e2601f14787243451967c374
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=c923f03924a221e351ab8144bb22dcc8
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=416b8ace56bba3414972389eebc7107e
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=3ed5c84c30cff03a54296da4fff017b3
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=fe778040f8b3d8e60a5899dbc216b02a
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=256a2f93b3b5e4d0f28aa16386fd6d13
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=64aa732b55a24ed5d7c30209ef4bb98f
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=bbf2c129b05ecb29a075248d2df9b747
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=bc3088589b47c3116182f9f46179ef30
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=4c9e823a1d58404648ba7eb522e4b10e
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=71119fe575fc98cc84578d8755ac9b64
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=71c15b497f7e9d5eb78cd00163990dad
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=761d402cb0c95496dfcf4bbd5a55fd8f
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=f239a48c45a2ebcfe74631474b40a1a8
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=b497a83cc81d0ef318fa4e44566d4321
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=63ea74ec12b4ae9d569fd9e64f02c057
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=9d9d1544dd01487add4bc3e407d3be43
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=2df0cf456b3b45443fb7ae184d2a6473
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=6d223e80f3331d5e7af3570896e6a0df
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=b7c682d4d328e921d968830814491aa7
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=1364b02a4afa297f53ebb8caac37c3ca
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=758de3fd73deb9e947cea9ffb16c56f2
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=7104c7a2add25bbd8851a313eb7fe01a
goto:aftervWii

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