Hacking DIOS MIOS (Lite)

Qetzlcoatl

Active Member
Newcomer
Joined
May 3, 2012
Messages
27
Trophies
1
Age
54
XP
160
Country
Russia
All I was saying is that hard coding it to 4096 instead of 512 might make it try to read 4096 bytes out of every sector it reads from every drive. That way it might work fine with newer 4k sector drives but it might get an error if it tries to keep reading past the end of a 512b sector since it doesn't know to stop at 512 anymore. If this is the case, it wouldn't be a "512b-only" vs a "multisized" version but a "512b-only" version vs a "4k only" version.

In that case, in order to really make it a "multisized" version it would need some extra code to help it choose which value to set instead of just a hardcoded value. I wouldn't think it would make that big of a size difference once compiled but the only way to find out, yes, would be writing the code up and compiling it.

Also, haven't looked at the code that much but just from your mentioning it, WORD might just be the cluster size. That's the first thing I can think of that would it into a 2-byte value since the maximum supported is 32k for DM and 64k for DML.

May be we misunderstand each other. :)
But looking on code I see exactly 2 abilities already in codebase:
- to use 512b sector size;
- to autodetect sector size.
Autodetecton actualy look at sector size parameter in volume "header" while mounting them, hard-coded algorithm simply ignored sector size parameter from volume.
There are no complex "espionage" to "guess" correct sector size, just reading them.
And it look like no overhead in autodetection coz You always need to mount volume before use it.
So what next?
There are two ways to enable 4k sectors without much code rewriting:
- replace 512b with 4k in "hardcoded" part of sources;
- enabling autodetection.
Personaly me will be happy with single autodetection DiosMios .wad as well as with two separate .wad-s hardcoded for 512b and 4k each.
All I need is experienced person who will build any sort of 4k-enabled .wad (autodetection preffered) and check it fits into available memory.
I will test its ability to access my 4k-sector HDD myself and report success or failure to the public.

By the way, WORD is alway 2 bytes in C, I sure, as well as BYTE is exactly 1 byte, DWORD is four and QWORD is eight.
 

Qetzlcoatl

Active Member
Newcomer
Joined
May 3, 2012
Messages
27
Trophies
1
Age
54
XP
160
Country
Russia
More about sector size autodetection.
In addition to one WORD-size parameter in filesystem structure which will increase needed memory by 2 bytes there are 2 lines of code that will increase binary size:
Code:
//if (disk_ioctl(fs->drv, GET_SECTOR_SIZE, &fs->ssize) != RES_OK)
// return FR_DISK_ERR;
I'm unsure how much bytes it is when compiled...
 

kyle007

Well-Known Member
Member
Joined
Oct 5, 2008
Messages
387
Trophies
0
XP
97
Country
United States
I've never had much luck compiling things, but is it really that easy to support 4kb sector sizes? I remember a while back they needed to change some stuff in cios to make 4kb drives compatible, I don't know what, but was it as simple as just changing a few lines? I hope somebody does compile a working 4kb sector size version, though.
 

Maxternal

Peanut Gallery Spokesman
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
Autodetecton actualy look at sector size parameter in volume "header" while mounting them, hard-coded algorithm simply ignored sector size parameter from volume.
There are no complex "espionage" to "guess" correct sector size, just reading them.
And it look like no overhead in autodetection coz You always need to mount volume before use it.
So what next?
There are two ways to enable 4k sectors without much code rewriting:
- replace 512b with 4k in "hardcoded" part of sources;
- enabling autodetection.
By the way, WORD is alway 2 bytes in C, I sure, as well as BYTE is exactly 1 byte, DWORD is four and QWORD is eight.
Okay, I guess I'm just not familiar with C enough, sorry. (A reasonable amount of C++ and a lot of Java)
Good to know it's relatively simple to detect. I do understand that he's commented out everything he could, even borrowing code spinets out of libraries instead of compiling the whole thing in to save space when finally compiled so it's all a judgment call, as you've said, on how much code that actually takes and how much that translates to in the compiled ELF that's actually loaded into memory at runtime.

If this is really all the code addition that's needed to fetch the sector size out of the header, that sounds great.
Code:
//if (disk_ioctl(fs->drv, GET_SECTOR_SIZE, &fs->ssize) != RES_OK)
// return FR_DISK_ERR;
I understand the concepts behind assembly code but my classes just used a simplified theoretical processor to teach us those concepts and I much less know EXACTLY how that translates to the binary actually used by the PowerPC so I can only venture a guess at how much that would take once compiled :
basically just a function call, a comparison and a jump
the comparison and the jump should be the simple part
the function has to
-push the current registers onto the stack 6
-push the frame pointer ... thingy and the return address 2
-get each parameter from memory and push them onto the stack 6
-call the function 1
-pull the old registers off the stack and the return value 6
-put the frame pointer back 1
then
-the comparison 1
-the conditional jump 1
estimated lines of assembly in red (assuming 8 registers and 6 in use)
My estimate is 24 lines of assembly
I'll assume that since the PPC is 64-bit that each line of assembly code is 4 bytes
That would translate to 96 bytes in machine code as my semi-educated guess.

Now, something I also thought of when going through that is that if that function wasn't even used until adding this line of code it may just be completely commented out to save space on unused code, in which case, adding the whole body of the function back would take up more space. If it IS only used once, though, a little space could be saved by making it an inline function and saving the whole function call in the first place.

(still just looking for someone who knows how to compile this to just do it and see if it works)
I'm sure a lot of the other new features that have been added recently have taken up far more space than this, though.
 

sonictopfan

Well-Known Member
Member
Joined
Mar 2, 2010
Messages
2,702
Trophies
1
XP
1,950
Country
I have a question regarding Dios Mios, my hard drive still goes to sleep mode while playing GC iso whenever it's not loading anything "paused game, no background music, games with audio stream problems... etc" however it works just perfect with Wii games, I sadly can't play games like Crazy Taxi and Super Monkey Ball because they will always give me an error message due to them having audio streaming issues, they work fine from SD though, I tried contacted the company a while ago but got no replies whatsoever, anyone knows how to make the hard drive never go to sleep mode on DM? I'm using a 500gb LG!
 

ReidParsekian

New Member
Newbie
Joined
Sep 28, 2012
Messages
3
Trophies
0
XP
1
Hey everyone, I'm having a problem getting ocarina codes to work on DML
I'm using DML because I have a WBFS formated drive for my Wii games and I only need a couple of Gamecube games. So I took the DML route and I'm using a 16GB sd card.
I downloaded DML 2.3 and got it working right away on USB Loader GX r1202 with zero problems. However getting codes to work is a different story. I enabled ocarina and saved the .gct under sd/codes/GAMEID and got a message saying "Warning: The GCT Cheatcodes path must be on SD" when starting a game. Weird because all I'm using is an SD?? So I looked around online and people were saying that it has to be under the directory usb/game/GAMEID so I tired that on my SD but had no luck. I also tried renaming the GCT to ID6.gct and I tried using Dios Mios Booter and nothing! I really just want to get cheats to work! So if any one knows what to do please help me! Thanks.
 

marcioap1

Well-Known Member
Member
Joined
Sep 15, 2012
Messages
137
Trophies
0
XP
432
Country
Brazil
The version number only fools Nintendo's update installers, WAD Manager will not care about what version you have and will simply install DM over youur cMIOS.
I always install everything with 249 in WAD Manager, which at the moment is d2x-v7beta49-base56. I think any recent d2x will be fine. I've never had an issue with that.
Good luck!

Thanks themanuel, Maxternal and JoostinOnline for the answers! I installed it with no problems and it's working fine!
 

Reckless

Active Member
Newcomer
Joined
Nov 22, 2006
Messages
35
Trophies
0
XP
133
Country
Hope I ve picked the right thread!

Dios Mios Lite does not have any UI right?
I want to use DML with wiiflow 4.0.2

what I ve done: copied my with DiscEx extracted games into HDD:\games folder.
installed DML2.3 and the DML Channel.

when I open wiiflow my games are shown -> I select a game and wiiflow copies the game onto my sd card.
After copiing the game I want to play it and the screen just goes and stays black... any suggestions what I can do?
I dont use any emulated NAND.

EDIT: Nevermind ;) seems like I have tried to play a incompatible game. With another game it works :D
 

sonictopfan

Well-Known Member
Member
Joined
Mar 2, 2010
Messages
2,702
Trophies
1
XP
1,950
Country
what I ve done: copied my with DiscEx extracted games into HDD:\games folder.
installed DML2.3 and the DML Channel.

Here's your problem, DML runs the games off SD not HDD, if you wanna run them via HDD you have to instal DM2.3 not DML2.3!

Edit: I see you got it working, alright!
 

TyBlood13

As Seen On GBATempTV
Member
Joined
Jul 1, 2012
Messages
1,534
Trophies
1
Age
26
Location
Lexington, Kentucky
XP
2,450
Country
United States
I need help downloading DIOS MIOS 2.3, the google code page redirects me to another downlaod site instead of download DM like it usally does when I upgrade. When I try to download, it looks legit, but is actually a virus file.
 

otenis

Member
Newcomer
Joined
May 3, 2012
Messages
22
Trophies
1
XP
23
Country
I need help downloading DIOS MIOS 2.3, the google code page redirects me to another downlaod site instead of download DM like it usally does when I upgrade. When I try to download, it looks legit, but is actually a virus file.
Strange, just redownloaded the file to check that out, and it's still the same I installed on my Wii, and is free of any kind of virus. Must be a false positive.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
I need help downloading DIOS MIOS 2.3, the google code page redirects me to another downlaod site instead of download DM like it usally does when I upgrade. When I try to download, it looks legit, but is actually a virus file.

You're sure it's not a false positive? Those happen a lot nowadays.
 

TyBlood13

As Seen On GBATempTV
Member
Joined
Jul 1, 2012
Messages
1,534
Trophies
1
Age
26
Location
Lexington, Kentucky
XP
2,450
Country
United States
I need help downloading DIOS MIOS 2.3, the google code page redirects me to another downlaod site instead of download DM like it usally does when I upgrade. When I try to download, it looks legit, but is actually a virus file.

You're sure it's not a false positive? Those happen a lot nowadays.
the file isn't even .wad
 

Lumnous

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
160
Trophies
0
Age
31
XP
223
Country
Glad 2.3 is out when i tried to play Starfox on 2.2 or lower it wouldnt let me pick up the barrel in the begining part which is vital in order to get further on. the shame is audio is still out and subtitles are still late but it is playable now.

I tried Prince of persia Warrior within on it and it went green screen. No disc works and im glad which means i dont have to always have the disc in to play them. Now if only metal gear could work in swapping discs.
 

TyBlood13

As Seen On GBATempTV
Member
Joined
Jul 1, 2012
Messages
1,534
Trophies
1
Age
26
Location
Lexington, Kentucky
XP
2,450
Country
United States
What was the file you downloaded and from which adress?
I start @ this page to download DM 2.3 for real nand :http://code.google.com/p/diosmios/wiki/Downloads
Then when I click on download I am redirected here: http://uploaded.net/file/qab04rgu
Then when the timer is up IE says the file I want to download is: qab04rgu0cc4c307.js
I have done multiple virus scans on my computer and nothing came up, btw.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: im back