I have one (4G PNY micro SDHC class 4)
that works in the Wii (SD Menu, Photo, etc.)
But not Homebrew (also tried the sdcard.org formatter)
in main() after - // the console understands VT
printf( ...
Code: Select all
while(1) {
if (!fatInitDefault()) {
printf("fatInitDefault failure: terminating\n");
goto error;
}
DIR *pdir;
struct dirent *pent;
struct stat statbuf;
pdir=opendir("/");
if (!pdir){
printf ("opendir() failure; terminating\n");
goto error;
}
while ((pent=readdir(pdir))!=NULL) {
stat(pent->d_name,&statbuf);
if(strcmp(".", pent->d_name) == 0 || strcmp("..", pent->d_name) == 0)
continue;
if(S_ISDIR(statbuf.st_mode))
printf("%s <dir>\n", pent->d_name);
if(!(S_ISDIR(statbuf.st_mode)))
printf("%s %lld\n", pent->d_name, statbuf.st_size);
}
closedir(pdir);
// Should look into
// void fatUnmount (const char* name);
error:
printf ("\n");
// from TheLemonM on #wiihelp
// extern bool sdio_Deinitialize();
if(sdio_Deinitialize()){
printf ("Ready to change SD cards\n");
printf ("B - for Next Card\n"); }
printf ("HOME - to quit\n");
while(1) {
// Call WPAD_ScanPads each loop, this reads the latest controller states
WPAD_ScanPads();
// WPAD_ButtonsDown tells us which buttons were pressed in this loop
// this is a "one shot" state which will not fire again until the button has been released
u32 pressed = WPAD_ButtonsDown(0);
// We return to the launcher application via exit
if ( pressed & WPAD_BUTTON_HOME ) exit(0);
if ( pressed & WPAD_BUTTON_B ) break;
// Wait for the next frame
VIDEO_WaitVSync();
}
// from TheLemonM on #wiihelp
// extern bool sdio_Startup();
sdio_Startup();
}
return 0;
}