hdfduhuan / cfg-loader

Automatically exported from code.google.com/p/cfg-loader
0 stars 0 forks source link

Auto Un-Mount HDD on Shutdown! #108

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello! :)
When I am playing a game with *Configurable USB Loader* and pause the game and 
then *turn off* my Wii using the *Power button* (on the WiiRemote or on the Wii 
itself), my external USB Hard-Drive does some weird sound just like when it is 
reading/writing something and there's a power failure and it *stops spinning 
abruptly*... :/

I'm not exactly sure, but I think that would probably damage/corrupt the 
Hard-Drive in the long term... :S

So, I would like to know if it was possible for example to "hijack" the 
*Shutdown button* (both on the Wii and the WiiRemote) callback function to 
perform a *safe Un-Mount* of the hard-drive just before the Wii shuts down!

I think it would be a pretty useful feature to extend the life of the HDD!
Can that be done? ;)

Original issue reported on code.google.com by francisc...@gmail.com on 2 Jan 2011 at 3:04

GoogleCodeExporter commented 8 years ago
I don't know if it's possible, but it would need to be done inside the CIOS, 
not in the loader, since the loader is not present in the memory anymore when 
the game is running, so this request needs to be made elsewhere.

Original comment by ogg...@gmail.com on 12 Jan 2011 at 4:05

GoogleCodeExporter commented 8 years ago
Oh, ok! I understand!
What about if we are at the game selection screen (inside CFG) and shut down 
the Wii from there?
Doesn't libogc has some functions to detect the shutdown button press and 
un-mount the drive?
Or at least check if all the file handles are closed?
Thank you very much! ;)

Original comment by francisc...@gmail.com on 13 Jan 2011 at 4:32

GoogleCodeExporter commented 8 years ago
It already does that.
You can check Do_Shutdown() in wpad.c
If anyone knows a better way let me know.

Original comment by ogg...@gmail.com on 13 Jan 2011 at 8:04