[TuT] DIOS-MIOS - How to compile and set it up

Find all your Nintendo Wii related topics here
Post Reply
User avatar
Cubelover
Posts: 313
Joined: Wed Apr 07, 2010 1:22 am

[TuT] DIOS-MIOS - How to compile and set it up

Post by Cubelover » Sat Nov 20, 2010 8:30 am

+++This tutorial was written by me and only for GC-forever.com. It is not allowed to rehost, edit, translate or modifiy it in any way+++

Hey guys, since Crediar released his MIOS replacement named DIOS-MIOS, I thought I could make a tutorial how to compile and set it up :) .

First a few questions.

What is DIOS-MIOS?
DIOS-MIOS is kind of a replacement of the Wiis MIOS. With DIOS MIOS you can basicly launch GC games on an emulated NAND from an FAT32 formated USB device (32kb or lower cluster size) via SNEEK.

What is SNEEK?
SNEEK is Crediars SD/NAND ES Emulation Kit. It can emulate a decrypted NAND backup on a SD Card or on an USB device (UNEEK).

Does DIOS-MIOS work on the real NAND?
No, it does not work on a real NAND (yet). You have to install it on an emulated NAND.

How is the compatibility?
The compatibility is currently quite a mess. It's kind of proof of concept. Crediar made it open source because he has run into serious problems and is asking for help.
Click here for the official compatiblity list.

:arrow: Official DIOS-MIOS website
:arrow: Official SNEEK website

Make sure you have at least the Homebrew Channel, BootMii and a clean MIOSv10 installed! If you dont have MIOSv10 installed, download it with NUS Downloader and install it.

You need the following downloads:

:arrow: MIOSInject, DiscEx (and optionaly precompiled dios-mios files)
:arrow: NUS Downloader
:arrow: Ben Wilsons Wii NAND Extractor
:arrow: Microsoft Visual Redistribution Package 2010 (Win32, Win64) (No need to install it if it's already installed ;) )
:arrow: SlikSVN (Win32, mirror), (Win64, mirror)
:arrow: devkitPro-Updater
:arrow: Python (Windows, mirror), (Windows AMD64 / Intel 64 / X86-64 binary, mirror)

Setting up the Development Environment

1. Install SlikSVN in a directory of your choice.
2. Launch devkitpro-Updater and install at least devkitPPC, devkitARM and Programmers Notepad. Or just use full mode install, which will then load and install everything needed.
3. Install python in the directory C:/ (after the installation there will be a C:/Python27 directory.
4. Press the Windows and Pause button. That will open the system properties screen. Go to Advanced --> Environment Variables. Look for "Path" under the "System variables" section and click at Edit. This will open the "Edit System Variable" window. There you see an input field named "Variable Value". Go to the end and add your path to your python directoy. Mine is C:/Python27. Dont forget to put at the beginning and end of the directory name a ";" (;C:/Python27;)

Our Development Environment is now set up.

Downloading and compiling SNEEK

1. Go to your install directoy of SlikSVN. There you can see a folder named bin. Open Windows Command (CMD) in that folder and type the following line into it:

Code: Select all

svn checkout http://sneek.googlecode.com/svn/trunk/ sneek
Press Enter. That will download the latest source of SNEEK.

2. You have now a sneek folder with the source. Open it. There you find a folder named es. Open it as well and look for the Es.c file. Open this file with Programmers Notepad and look for the following lines:

Code: Select all

        //if( *TitleID == 0x0000000100000100LL )
        //      *TitleID =  0x0000000100000101LL;

        if( *TitleID == 0x0000000100000100LL )
        {
                _sprintf( path, "/title/%08x/%08x/content/title.tmd", (u32)((*TitleID)>>32), (u32)(*TitleID) );
You have to replace them with these lines:

Code: Select all

        if( *TitleID == 0x0000000100000100LL )
        {
                *TitleID =  0x0000000100000101LL;

                _sprintf( path, "/title/%08x/%08x/content/title.tmd", (u32)((*TitleID)>>32), (u32)(*TitleID) );
Now close Programmers Notepad, but dont forget to save the changes. If you do, DIOS MIOS will not work.

3. Launch NUS Downloader, go to Extras --> Retrieve Common Key. This will create the important decryption key. Close NUS Downoader and re-open it. Mark "Decrypt" and download IOS80 v6943 and IOS60 v6174. Open the folder 000000010000003Cv6174 and copy the 00000001.app into the sneek source folder. Then open the folder 0000000100000050v6943 and copy the 0000000e.app into the sneek source folder.

4. Go to your sneek source folder and launch build_boot2.cmd. This will compile SNEEK. After successfully comiling SNEEK, there should be several bin files on the source directory:

- boot2_sd.bin
- boot2_usb.bin
- boot2_di.bin
- di.bin

Rename boot2_sd.bin to kernel.bin and put it with the di.bin in a separate folder named sneek. Put that folder on the root directory of a FAT32 formated SD Card. In the mini-tree-mod folder you can find an armboot.bin. If not, you can grab a precompiled version here. Put the armboot.bin in a folder named bootmii and place it also on the root directory of your FAT32 formated SD Card.

Now we are ready for making a NAND backup and compiling DIOS-MIOS.


Compiling DIOS-MIOS and setting up a NAND backup

1. Go to the BootMii menu and make a backup of your NAND. Open the backup (nand.bin) with Ben Wilsons "Wii NAND Extractor" and click "Extract All" This will decrypt your NAND backup to several folders.

2. Download the source of DIOS-MIOS the same way we already downloaded the source of SNEEK. Type this line into the CMD to retrieve the source:

Code: Select all

svn checkout http://dios-mios.googlecode.com/svn/trunk/ dios-mios
3. Now open Windows Command in the dios-mios folder (do NOT open the makefile with Programmers Notepad, that wont work!) and type "make". This will compile the source. If the compiling process succeeds, there should be an iosmodule.elf and dimodule.map somewhere in the dios-mios source directory. We need those two files a bit later.

4. Extract the MIOSInject archive to a directory of your choice. Put the iosmodule.elf and dimodule.map in there.

5. Launch NUS Downloader, mark "Decrypt" and download MIOSv10. A folder with the name 0000000100000101v10 should appear. There you will find a 0000000c.app. Rename it to mios.bin and copy it in the MIOSInject directory.

6. Now we should have following files in the MIOSInject directory:

- mios.bin
- iosmodule.elf
- dimodule.map

Open Windows Command in that directory and type the following line:

Code: Select all

MIOSInject.exe iosmodule.elf mios.bin dimodule.map 0000000c.app
This will inject the important dios-mios code into MIOS and create a new 0000000c.app

7. Open the following directory of your NAND backup and replace the new 0000000c.app with the old one already in the NAND Backup:

Code: Select all

\title\00000001\00000101\content\0000000c.app
Copy the NAND backup (all folders) into the root directory of the SD Card. We are almost done :) We still have to convert GC images to the required format.


Converting GC disc images

1. Dump a GC game with the awesome CleanRip and make sure it's not under- and overdumped.

2. Extract the DiscEx archive and put the GC images in there. Open Windows Command in the DiscEx folder and type:

Code: Select all

DiscEx.exe game.iso
Then press Enter. This will convert the game in the required format. You will find then a folder with the Disc-ID in the DiscEx folder. Create the directory USB:/games on a FAT32 formated USB device (remember, 32kb or lower cluster size) and copy the folder with the converted game in it.

Code: Select all

USB:/games/*whatever discid*/
We have finaly finished :) Put the USB device into the right USB port of the Wii and the SD Card into the SD Card slot and turn on your Wii. Wait patiently until the System menu shows up. Via 1-Button you can access the DI menu and configure the setting of your game (video mode, some patches, etc, and select the game you want to play. Open the Disc Channel and start the game.

Have fun ;)

You can report working or non working games here. I already said the compatibility is quite bad, dios-mios has some serious issues. Those are

* ARAM/DSP not working correctly
* DSP problems cause no sound and nintendo memory cards can not be unlocked
* ARAM problems cause games to freeze and/or crash
* All DVDLow* functions except DVDLowRead currently cause a delay
* slow disc loading at certain points
* Only FAT32 is supported with cluster size 32KB or lower

Since emukidid is a skilled developer, maybe he can help crediar a bit out if he finds some freetime :)
Last edited by Cubelover on Sun Nov 21, 2010 1:05 am, edited 5 times in total.
gtmtnbiker
Posts: 163
Joined: Fri Apr 09, 2010 4:30 pm

Re: [TuT] DIOS-MIOS - How to compile and set it up

Post by gtmtnbiker » Sat Nov 20, 2010 11:45 am

Cubelover wrote:Hey guys, since Crediar released his MIOS replacement named DIOS-MIOS, I thought I could make a tutorial how to compile and set it up :) .
Thanks for pulling the info together. It looks nice.
Since emukidid is a skilled developer, maybe he can help crediar a bit out if he finds some freetime :)
I can't imagine how many projects he has on his plate. I really should try to get into development myself but it's hard when you spend all day coding for work and then you have a family to attend to.
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: [TuT] DIOS-MIOS - How to compile and set it up

Post by liquitt » Sun Nov 21, 2010 8:54 am

nice tutorial. never heard of that stuff - well i sold my wii long ago.
now i want to buy one again, just to install that sneek stuff :D
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr

we also have a wiki filled with knowledge
http://is.gd/dX58Rm
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: [TuT] DIOS-MIOS - How to compile and set it up

Post by emu_kidid » Sun Nov 21, 2010 9:57 pm

wow lots of bugs.. I wouldn't even know where to begin :P
Image
User avatar
Cubelover
Posts: 313
Joined: Wed Apr 07, 2010 1:22 am

Re: [TuT] DIOS-MIOS - How to compile and set it up

Post by Cubelover » Tue Nov 23, 2010 11:25 am

A message from crediar:
Why GC USB Loading won't work

The Wii has two main memory regions MEM1(24MB) and MEM2(64MB) the GC had MEM1(24MB) and ARAM(I think 16MB I can't find the value right now).

Now as we know some facts we see that the Wii has no ARAM, but GC needs it to work!

So when switching to GC mode a part of MEM2 is used as ARAM(the infamous twiizer attack was possible due this fact).

So why is this a problem? once it's turned into ARAM it's not accessible from ARM( aka starlet, aka IOS) anymore, why is that bad? well the EHCI(aka USB2.0) device can only access MEM2 so no MEM2 no EHCI and no USB.

(sad face)
Source

Well at least we still have the upcoming SD-Boot 1.0 :)
User avatar
Cubelover
Posts: 313
Joined: Wed Apr 07, 2010 1:22 am

Re: [TuT] DIOS-MIOS - How to compile and set it up

Post by Cubelover » Mon Nov 29, 2010 6:45 pm

Crediar has removed the DIOS-MIOS site: http://code.google.com/p/dios-mios/
This means the tutorial does not work anymore :(
Post Reply