::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=21010
::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-beta53-alt
::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 "cIOS249[37]-d2x-v" set md5=ecfd0bf57b52cffc7279598773cf8d58
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=967fe83b1ce38c64924de6c89d9489f6
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=5020cf55181ae54f0e5cb4075dc9ab5c
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=fe00c23f67ff6da068a254f20108191f
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=fb2efd4aedf745421d607e0ffc6267dd
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=057152ff67301d566faa6c791b68ef3f
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=64124ee1adfc0407547cf219e6d27db3
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=a442b189b5fbb71f5c237b192fad55c8
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=ba8b3befcc1f049187f8b1987c54fa31
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=4c931f4105c794a163f525805cd176de
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=a6ad247ab7f4d5a682d6d4566607e613
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=31c5fdcae46cde0fedd104586f6b977c
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=3dbdd126d2fe23547a7812b54453cfa5
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=d10a33ec0f3af3632329866424bb5f78
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=8a01d2fddec7b1194d2bc0fb3842e340
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=c6e1b10df3fa388a437fcb95a1e7a69f
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=9baa76ccd5c0c6b56c0c519039fd15c1
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=c20bbe8a6e84a31229facecbb27f1d2f
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=f5892f8acd05e1fcc3c08da741fb17a3
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=588b8aea94464a4272927e7dc748564f
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5=fd0b8e125647e19d59f1537a3f890f96
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=b712913dfbf401b5a6b70a54afab0361
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=34d5c592f7b41efedc6f025ced771757
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=f6a271568ba9953b090575b540fcce32
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=6bede6601fdb734cfd2c94097c928faf
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=0cbb667beaed8920397389f773656975
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=caac802f3c1f299679d9fbef2544ffe8
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=0f662c6d46b776bac6761a29174fa212
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=e4d692c3ee1cb89f88e88217aec20204
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=00a8900a5a5ed9d8a51dece778cee09c
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=021871027856fbc085a0dcc604e6bcb3
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=82cea2aaf11835978758d51c5a37b559
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=7a0e0d3d53315ee1e8e8b004a6ace7ff
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=07f297d47b0b0482854dafa66b569436
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=b4257f9fa565b1d332b0bbd35457945f
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=daa42bdda22c4ef1306256102324d99f
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=d76c94ffbf3b0e1f32e6bd14bcf533ab
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=1bb1c38d35cdb2a24178d64a924d91d6
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=4bed67e993430df430d4e8cda78d274c
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=07b41ebf1e904cce8c0e91d80028c8af
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=282c39cb36fd246b2a1f4c9840ec7cd4
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=a874bc3b2e4b5b99bc60d20a949d279c
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=0b092a93fcc16a88de5786f39e27192c
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=17838e4f2354fd1cd98b0502d5975355
goto:aftervWii

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