::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-beta3-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=0f9f7b1bf58bb5a521f0cbb2898cc964
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=43cf825b60cc0964d62ad4aed945f32b
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=41635b46665028b3d60652420c4dd04e
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=51c6699e15f4138963996e1210598a08
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=bc6de31d260fc2c261dede4553f61eae
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=65748ba88bcae0009e8c3b66d95953bc
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=6471a3a0b57ea8b7aee1c06ce548cfc1
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=b8f8bdc9f3a644fbce80c20d90ec43da
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=b66f860414b5413c0cffd8b1a76d8a08
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=bd9f820da6d28469d5c1bcc278d438cd
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=986330411f8495a8b61e3fa467ab317e
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=24525bdf1686b3dcd7a2821075fdb1a6
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=1b0c456125fc39615f78e3c442202521
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=2924e02379456d77a4dc3a35fee95c0c
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=232989e99d673f31f0e24e4d4afbff9c
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=ca5f2836654e55caef652c639e324b56
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=c5d5b99d445ebebcf73bfeebb4d5ddb4
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=f39e90b55d14a77e9ea29553a293ea64
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=2e9f9dbc91494f08f2f2cb3c8cf44e4d
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=5858a77dd0def62ccfe7b60df52fcd89
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=d7d24c584c8ce0b329327d4b95073693
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=6de61a2415e03596a3d2883360a851d4
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=e38e92ef530b5bf988ceedb123fc9bb3
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=e19dffb031b0082151f2b9af35dfe842
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=3cb22207d1abe328cba356b7caf7adf5
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=acab09aa53ca6dd920f93fd05361ffdf
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=a249e6247cd44f708d27f3aff788da80
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=cc953bd40a86d9fb4ce7c4f511013d2e
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=5ac10dea2f675dd362e9025895f22d1a
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=471f3ab102719849986e2ce7cb853e50
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=3c1df627be45f7fdce71adc70a773540
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=ecad9c73dcc6d759377e56c4327b26a0
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=c5720114e6edfe401acf2f90508eae84
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=25d1ab930aff50b259d8db75c7977f2a
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=56367007a4ca445704e0cde67e005e76
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=259fe5dc343210069ec999ae53c95b77
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=e1b9901b204ef8c9f7f1fed43ab77250
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=22ee1a3577bda7a89c0dd7074721193a
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=fb7bfa2d0759d3019c337ff6707ab2bb
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=41f2e81aa0460526477598b581feeaef
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=de5eb98739129b644c6e11967ee0f0ba
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=96ac9622b78742693742f1c9461aa8a9
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=a91009606e7cd34a30265f66793bacac
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=41a8a719047c268d27317e8bb42e8bcc
goto:aftervWii

:vWii
if /i "%name:~0,17%" EQU "cIOS248[38]-d2x-v" set md5=c3cb29f8432d4bbae29aace0f43f725b
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=4fb6f3e1859a82a340110aa4c9f39ade
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=4cd8a5bd668fd872092419468e23740d
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=a5703dd96242a4cb418a384e27c98833
::two sets of md5s for legacy wad(mii) packer support
if /i "%name:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=c3cb29f8432d4bbae29aace0f43f725b
if /i "%name:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=4fb6f3e1859a82a340110aa4c9f39ade
if /i "%name:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=4cd8a5bd668fd872092419468e23740d
if /i "%name:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=a5703dd96242a4cb418a384e27c98833
: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=938cf930a62ca476c588d2cb1193258b
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
