::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-FM050
::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=02eb9b8417923ac0802a51f788e1206b
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=cc26f4da58247effed71e01d1cd06e99
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=d39c9df4909f855e4a827f2a75835dd7
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=75f40c13029cf341714e1986f984e006
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=e224d62a15aea12a0d87bf03372cd4ed
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=031c13464e70fce61984a900ed2682b8
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=06d716a7a8d323f0bf3445172332a74b
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=63075aacf631fd1af5128edd74dc5990
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=36d3768e50fd25c8076fe39d472a94f5
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=66f43385b9572700c30d1676b7e73aff
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=9e60a491cb0c756a286dfc00e45564a0
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=80f15cca4f7a1384b68c7dcdbdee8888
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=46c14ca1315d676b24b2f7a40bf74b6c
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=bd93b1a28431ae9d9bc34978eea30245
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=c295e7475c274e5d5b126dea1f460337
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=d9c29416d888917f4195e2182d4cde2b
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=b64cc323298a02c9058500c76f150e73
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=df4e8b5b174aa2611fffd07e68be3f50
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=cd53cacaa4373316448524555e020bae
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=7a9de5309628a86744b6a80ef149c05a
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=959bb3fac9fe703ce3227a7579c4fda2
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=f98d454d010a707e6ee88b742a122705
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=00dfcf72d4694f827f04f8a1dfa27991
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=9b9e7a843c8ae8683fbfb2cdfb32e652
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=f3a0e832ce72f478d2c4bcca3660b304
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=532c05fe3fa77e3b045dd1b3edc952fe
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=8d29a57d4a195ba8785ab82feff7ed5a
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=5159ce3dfc22628f301dbac8a8c59a8d
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=c949c8ad84d4e6a70f4bc8c15ce47751
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=42c362109c64f2a80eeccddf4abe7f43
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=6fbbb65605736ab6a58bae10e65ef116
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=b0c3452318b3e39cc1f38ca8b9272f81
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=fbea23ef5fa072ea91f8f01953a86f47
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=736409c6822b5240d899eda631d2b725
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=d964ee6e8c783b78c65c158ccb66e7a4
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=462e14a844c7def8c0f6bd80916692c8
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=5e89bfd7b416d69e19a64622e5a6a222
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=e79cb2c654fe1ccd65ee3845b51e360a
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=2183393b116f9986c7b119997e65e338
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=3917d9d42b0f52def468b1369990c32d
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=c190b16db8c11c3322595a298995a18d
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=a3525a7fbb65bed408c88f23bd4472f1
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=72d9172c957f0b85cbb2a20f1594c9b1
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=8839e3e7a5727f2ad1e13922548e5f0e
goto:aftervWii

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