Hacking DIOS MIOS (Lite)

  • Thread starter Thread starter sk0ld
  • Start date Start date
  • Views Views 1,056,150
  • Replies Replies 4,949
  • Likes Likes 38
Does anyone really know *why* audio streaming does not work?
Audio Streaming works by simply sending the audio tracks from the disc directly to the audio chip, where it is mixed with the other sounds.
There's no way to do this without discs, you need to read the ISO and mix it with the ingame sounds, which will probably use some CPU power, and you will need to intercept the system calls related to audio streaming.
There's probably an additional RAM cost added to that.
 
Does anyone really know *why* audio streaming does not work?
Audio Streaming works by simply sending the audio tracks from the disc directly to the audio chip, where it is mixed with the other sounds.
There's no way to do this without discs, you need to read the ISO and mix it with the ingame sounds, which will probably use some CPU power, and you will need to intercept the system calls related to audio streaming.
There's probably an additional RAM cost added to that.

I don't see how this is actually different from the way non-audio streaming sound works, and why that would actually eat up more memory
 
I could be mistaken but I think other games store the music in a temporary memory during the loading process then runs it during gameplay, Audio Streaming however looks for the music right from the disk during gameplay, getting them to work in Dios Mios may require writing a code to make those type of games read the music from the SD/USB instead which requires even more coding, I could be wrong though!
 
Does anyone really know *why* audio streaming does not work?
Audio Streaming works by simply sending the audio tracks from the disc directly to the audio chip, where it is mixed with the other sounds.
There's no way to do this without discs, you need to read the ISO and mix it with the ingame sounds, which will probably use some CPU power, and you will need to intercept the system calls related to audio streaming.
There's probably an additional RAM cost added to that.

I don't see how this is actually different from the way non-audio streaming sound works, and why that would actually eat up more memory

Well, since your asking, and a reply was given, ask Crediar exactly how its done, and whats involved.....
 
Audio streaming doesn't tell "read the file named Voice01.wav"

I'll resume what's happening (don't take it for true, it's just the idea)

it says "hey sound chip, while I'm still playing the rest of the game, go play what you find on the disc at location 0x82FD47E474 and tell me when you are done"
so, the sound chip (not the CPU), check the disc drive (not the ISO, so the USB HDD is replacing the disc drive I guess the sound chip check the HDD), without knowing if what it will find is what was expected. He just read what's there, and send "done" when it thinks the data at that place is read.

so, imagine you are using a shrink, or extracted fst format, the address on the disc doesn't exist anymore.
DIOS MIOS would need to rewrite all address in real time to point to the correct location of the file on the shrink/scrubbed disc, or on the sector on the HDD.

The game is coded in a way that the developers knew where will be located each sound files on the retail disc.
It's directly in the game's code, there's no file with corresponding filenameaddress on the disc.

You need to patch the game to redirect the files on the correct location (different for every users if you are not using a 1:1 ISO!).

meanwhile, the game wait for the "done" information to display the next subtitle for example, leading in unsynch audio/sub.
or doesn't care if the "done" is there or not, and just continue the game (no audio at all, but it doesn't care).


It's just a supposition, I don't know if it works like that:
- Use a 1:1 ISO.
- Check the start of the disc before launching the game (like Devolution is doing).
- Redirect all call for audio streaming addresses to the address+disc sector start, to match the sector on the device, taking in account the device sector's size.

It's certainly not how it's working :ph34r:


It might contains false informations, it's only a big idea on what's happening.
 
Devolution is emulating and based on IOS with Wii access.
DIOS MIOS (Lite) is run in native GameCube mode with limited ram to replace code and do patches.
 
I think is not in that way and not even easy Cyan... I think the devo workaround is read the audio streaming files from the iso in the hdd when detect the calls to the drive for read that audio streaming files and then downsampling and mixing they/it with everyting else, and for that it may need a specific/only purpose thread in the cpu and some memory.

I dont know how crediar are planing to do that in "gc mode" with the very short memory that are disposable... achieve that in gc mode will be magical.
 
Thanks Cyan for the explanation and examples for us noobs, now that I know what the case is I see why it would be so complicated, I imagine if it ever got fixed the only way would be making a tool to convert each one of these games!

If I may ask though, how does it work on Dolphin then?
 
I never checked how dolphin worked, but I guess there's a SPU emulator too.
each chipset should have its own process and own tasks.
I don't know how the addresses are processed.
 
GC game are loading for me most of the time, but on occasions it will either shutdown the Wii or do nothing, which requires a hard reset. It happens before the DIOS MIOS splashscreen.

I am using DIOS MIOS 2.3 and Wiiflow loading from USB HDD.

I have read the FAQ, I have HDD format correctly, marked as active, plugged in to the bottom usb port.

I am not a 100% whether it is Wiiflow or DIOS MIOS problem or something else I over look. It just seems like either DIOS MIOS doesn't kick in correctly or Wiiflow doesn't tell to it start properly. Any tips appreciated?
 
It's a HDD detection problem. (a seagate?)
DM waits until the drive is mounted correctly, and often the device doesn't send the correct PID/VID. when it happens, DM crashes and switch off the WII or just wait until the receive a correct value.
if the Wii doesn't shutdown, you can try to disconnect/reconnect your drive while DM is waiting.
 
It's a HDD detection problem. (a seagate?)
DM waits until the drive is mounted correctly, and often the device doesn't send the correct PID/VID. when it happens, DM crashes and switch off the WII or just wait until the receive a correct value.
if the Wii doesn't shutdown, you can try to disconnect/reconnect your drive while DM is waiting.

Yeah its a Seagate, I was just puzzled if it was drive detection, why would it would work some times and not other? (not that I know, I am just assuming it would either work or not work)

Thanks for the unplug/plug back in HDD tip, I will give that a try next time.
 
My seagate seems to have an "interactive" system. (not the best word)

Usually, drives have a Products and Vendor ID (PID/VID) and product name, this is what is detected by any operating system connecting to them.
They also have Interfaces to communicate (like drivers I suppose, I didn't find a lot of information on these Config/Interfaces).

When the drive is an external HDD, it's not directly connected to the IDE/SATA port, there's a USB to IDE card.
such USB also have PID/VID and product names.


When the seagate is connected, the USB2IDE card provide these informations:
Code:
Found 1 USB devices
Device 0: id e71f0021 
VID 0BC2 
PID 2100
Number of configurations: 1
Configuration 1 has 1 interfaces
Using storage device: "USB Seagate FreeAgent Go", serial 20E13004
DIOS MIOS works right away!

but sometime, it seems this card doesn't send its own information and it's skipped completely.
The REAL device data are seen by DIOS MIOS (or Devolution):
Code:
Found 1 USB devices
Device 0: id e71f0021
VID 0928
PID 0007
Number of configurations: 1
Configuration 1 has 2 interfaces
Using storage device: "USB OEM Mass Storage Plus", serial 500040F5
DIOS MIOS stay in a HDD reset loop.


the device ID is identical.
the PID/VID are different
Number of interface is different.
Device name is different.
Serial # is different.


DIOS MIOS doesn't work when there are 2 interfaces. (I don't know why)
Devolution works fine (IOS58), USB Loaders too.



Correct detection
Code:
DEVO: Loading game: usb1:/games/Star Fox Adventures [GSAP01]/game.iso
DEVO: Memory Card: Original
DEVO: device: 0x4D53
USB Gecko initialized
AI clocks configured
Exception vectors placed.
MMU initialized.
IOS was reloaded
stm_eh_fd: 0
stm_imm_fd: 1
GPIO Flags: 00ff8080
IOS communication initialized.
Network initialization failed.
USB FD: 2
Found 1 USB devices
Device 0: id e71f0021 VID 0BC2 PID 2100
Device class 00, subclass 00, protocol 00
Number of configurations: 1
Configuration 1 has 1 interfaces
Interface 0 has 2 endpoints
Endpoint 01 Attributes 02 MaxPacket 0200
Endpoint 81 Attributes 02 MaxPacket 0200
Current device configuration: 1
Using config 1, interface 0, alt 0, ep_in 81, ep_out 01
Device MAX_LUN returned 9: 1
USB device reset returned 8
Cleared USB storage device error status
LUN 0 is a Direct Access device
USB_MS sector size for LUN 0: 512, max LBA: 488397167
Using storage device: "USB Seagate FreeAgent Go", serial 20E13004
MBR partition offset: 0000003f
MBR partition offset: 03d778ac
MBR partition offset: 00000000
MBR partition offset: 00000000
Found a FAT partition at sector 63 (1)
Number of bytes per FAT entry: 4 (FAT32)
Sectors per cluster: 32 (16K)
FAT1 first sector: 95
FAT2 first sector: 15823
Root cluster / sector: 2 / 31551
First Data sector: 31551
End sector boundary: 64452780
Total number of clusters: 2013163
Cluster for MEMCARD file: 0 (31487)
Specified cluster for iso file: 0001D81B
ISO file found: GSAP Disc 0
Checking file fat chain...

Incorrect detection (but working with Devo)
Code:
DEVO: Loading game: usb1:/games/Star Fox Adventures [GSAP01]/game.iso
DEVO: Memory Card: Original
DEVO: device: 0x4D53
USB Gecko initialized
AI clocks configured
Exception vectors placed.
MMU initialized.
IOS was reloaded
stm_eh_fd: 0
stm_imm_fd: 1
GPIO Flags: 00ff8080
IOS communication initialized.
Network initialization failed.
USB FD: 2
Found 1 USB devices
Device 0: id e71f0021 VID 0928 PID 0007
Device class 00, subclass 00, protocol 00
Number of configurations: 1
Configuration 1 has 2 interfaces
Interface 0 has 2 endpoints
Endpoint 01 Attributes 02 MaxPacket 0200
Endpoint 81 Attributes 02 MaxPacket 0200
Current device configuration: 1
Using config 1, interface 0, alt 0, ep_in 81, ep_out 01
Device MAX_LUN returned 9: 1
USB device reset returned 8
Cleared USB storage device error status
LUN 0 is a Direct Access device
USB_MS sector size for LUN 0: 512, max LBA: 488397167
Using storage device: "USB OEM Mass Storage Plus", serial 500040F5
MBR partition offset: 0000003f
MBR partition offset: 03d778ac
MBR partition offset: 00000000
MBR partition offset: 00000000
Found a FAT partition at sector 63 (1)
Number of bytes per FAT entry: 4 (FAT32)
Sectors per cluster: 32 (16K)
FAT1 first sector: 95
FAT2 first sector: 15823
Root cluster / sector: 2 / 31551
First Data sector: 31551
End sector boundary: 64452780
Total number of clusters: 2013163
Cluster for MEMCARD file: 0 (31487)
Specified cluster for iso file: 0001D81B
ISO file found: GSAP Disc 0
Checking file fat chain...
[title:DIOS MIOS reset loop]
DIOS-MIOS v2.2b
Built: Jul 20 2012 14:49:47
This software is licensed under GPLv3, for more details visit:
http://code.google.com/p/diosmios
DIP:f_mount():0
EHCI:port 0 has usb2 device connected! reset it...
EHCI:port 0 reseted status:1005...
EHCI:device 1: 928 7...
 
So the problem is the usb to sata bridge, thanks for the detailed explanation. I think it is strange that is gives different manufacturer and product ID. Maybe sometimes it sends ID from actual HDD and other times the usb to sata adapter sends its ID? (Again I just speculate)

Edit

I tried to look around to see if I could find a firmware update for the drive from Seagate, never know there might have been bug with drives firmware but I couldnt find anything from Seagates site. It is a Freeagent Go with firmware 10.2F.

Edit 2

Dunno if I am just on tear with good luck but if I go to GC mode in Wiiflow, click on the game I want to play and wait for the GC boot sound to stop and maybe half a second more, then start the game it has been booting games first time.
 
If anyone here is having trouble getting DM to detect and use their USB HD, make sure it is in MBR and not GPT! Mine was in GPT, and while it worked fine in USB Loader GX, Dios Mios apparently didn't like that. I followed this guide and suddenly it all works! http://www.ehow.com/...-mbr-linux.html (A Linux guide, I'm sure there are other ways to do it in Windows, or you could use a Live CD) Thought I'd share the tip, because it sure took me a while to figure out this one. Thank god, no more copying GC games to my 4 GB SD, now I have 250 GB to work with!
 

Site & Scene News

Popular threads in this forum