::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-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=c2d154bc7bd38b7f0bc633326327b6dd
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5=a64f4fcd92f34dce53d5de18a290718a
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5=6a93c2426e84d58551341d3a30385dde
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5=023cd77d93b58bfa9277c72231c22bc5
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5=9fa93487786d55cb6b0dabbd4ab63981
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5=d1970c237a8fd163c9c43d7469fb6c97
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5=f25f778d605932d89d7befab8b77c892
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5=1f9f9abbc4ce3fbc5eaaa4a91a3c9dd7
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5=a3de7be880502c2fb5b1958b94b2da01
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5=6856f4b4716f8db9ce99674e9762ac9e
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5=d59d2d80f0d4605f9249ad7fd4997773
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5=a4bee80f3231a392df5fc0750ca8ca22
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5=d59ee3e131cf5538225b01ee13d6b9fa
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5=89aca69166fdc27482da73cd03ad7d42
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5=1e3cbf4d81ec135d85169896d4834450
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5=fa92d1e96f556dd23ce68632bfc4792a
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5=7c02d6150d9cbafdd627ab4a54775b68
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5=66ecadee81d656f59938e963ce688306
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5=bc50905d34b6d98fc87fee0b83da74eb
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5=08454fb18e1f346a1c178e8ce7302fc4
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5=9c8136e2bee5972905a242a4770c04d8
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5=95c3a5789912438d0a5b6f5abfdc1ef9
::two sets of md5s for legacy wad(mii) packer support
if /i "%wadname:~0,17%" EQU "cIOS248[38]-d2x-v" set md5alt=054c2a9545e2a050c449d2fd6b2e40e5
if /i "%wadname:~0,17%" EQU "cIOS249[37]-d2x-v" set md5alt=df7d366d398465ab86b88b3ccb1fd96f
if /i "%wadname:~0,17%" EQU "cIOS250[37]-d2x-v" set md5alt=ef760bec396e8a69b10f4c48d816f9ca
if /i "%wadname:~0,17%" EQU "cIOS249[38]-d2x-v" set md5alt=73b3d6cc11bbbced85f000dd146e9028
if /i "%wadname:~0,17%" EQU "cIOS250[38]-d2x-v" set md5alt=b1fda11fb1fa75294ae8f61acd620d39
if /i "%wadname:~0,17%" EQU "cIOS249[53]-d2x-v" set md5alt=d2a2f11d79e34aefc66ca0d7e35a145e
if /i "%wadname:~0,17%" EQU "cIOS250[53]-d2x-v" set md5alt=dedc8ff0c86f390b38f231ac0575397d
if /i "%wadname:~0,17%" EQU "cIOS249[55]-d2x-v" set md5alt=21f8b77ab866e8bfb8d5758d43e6b7be
if /i "%wadname:~0,17%" EQU "cIOS250[55]-d2x-v" set md5alt=b41e2b4ddcdf3afafcc7c98e460ba793
if /i "%wadname:~0,17%" EQU "cIOS249[56]-d2x-v" set md5alt=72a89b87a2f73bc44f06cbcea02ad175
if /i "%wadname:~0,17%" EQU "cIOS250[56]-d2x-v" set md5alt=c9892f4dd13eb2911273059fc0982d6f
if /i "%wadname:~0,17%" EQU "cIOS249[57]-d2x-v" set md5alt=030ed969f8f149566f4c6d8ab3203e4a
if /i "%wadname:~0,17%" EQU "cIOS250[57]-d2x-v" set md5alt=5172f5d2e8f2e1eeb12a7f8505b26ede
if /i "%wadname:~0,17%" EQU "cIOS249[58]-d2x-v" set md5alt=86d29aa879de1b35e3e528a1cbeefe73
if /i "%wadname:~0,17%" EQU "cIOS250[58]-d2x-v" set md5alt=cc9a447efeeea855b58e8ac0540f79f0
if /i "%wadname:~0,17%" EQU "cIOS249[60]-d2x-v" set md5alt=5b5be235462733c48664adb40184dc2e
if /i "%wadname:~0,17%" EQU "cIOS250[60]-d2x-v" set md5alt=7eddecc650d43b1ead2d1329ce6cde18
if /i "%wadname:~0,17%" EQU "cIOS249[70]-d2x-v" set md5alt=ef8ec420508083132363ca60228720ac
if /i "%wadname:~0,17%" EQU "cIOS250[70]-d2x-v" set md5alt=cbe5cee6b8b9567e1dd6f9c58e1c7c6e
if /i "%wadname:~0,17%" EQU "cIOS249[80]-d2x-v" set md5alt=e3c42445de0faf477232d8bb961c0cca
if /i "%wadname:~0,17%" EQU "cIOS250[80]-d2x-v" set md5alt=268d15f4f0cf38080fcdf7eca34661d7
if /i "%wadname:~0,17%" EQU "cIOS251[58]-d2x-v" set md5alt=593570dcd95fc027ebf16c2519e28647
goto:aftervWii

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