Hacking WiiFlow Lite

  • Thread starter Thread starter fledge68
  • Start date Start date
  • Views Views 1,032,085
  • Replies Replies 4,833
  • Likes Likes 66
Just wondering if Wiiflow Lite supports WiiU Gamepad like @FIX94 did with FCEUGX, SNES9XGX etc. I would love to create a WiiU menu icon for WiiFlow Lite and be able to run/control it with the WiiU gamepad :D
For me, the only "missing feature" I have in mind, now that SD-only setups are now being addressed, is one which I think would be covered by what you're talking about - the ability to use generic usb controllers, which of course would enable gc controllers for wiiflow (not the games though, of course on the Wii U.

--------------------- MERGED ---------------------------

LOL! I know why its doing that!

i made a change to that line i mentioned but didnt commit it. yet when i compile wiiflow it includes that change which just happens to be 7 days. thanks for finding this. i will fix in next revision.
I'm not sure I understand - I lost the reference due to "that line" and "that change". I look forward to reading the commit messages!
 
Wiiflow Lite v4.4.0 r1150 released!

https://sourceforge.net/projects/wiiflow-lite/files/wfl_v4.4.0 r1150.zip/download

changes:
-removed sd only arg and replaced it with eisteinx2's code to detect sd only. with slight change because mountall() is called in other places.
-fixed font glyph x spacing so letters like W no longer bleed into or look like they connect to the next letter. also fixes letters like j's. thanks to usbloader gx freetypegx code.
-changed some font sizing. but had to make button fonts in bold. if not bold then sometime's the text would fade out and be hard to read. something to do with the wiiflow button images being transparent. has no effect on non transparent buttons like carbonik abz theme.
-fixed wfl so time and date in games is correct. thanks aphirst!
-now unloading theme.ini from mem after all buttons and labels are created. this is possible since coverflow.ini is now seperate from theme.ini.
- other minor code changes and rem's put in for easier code decyphering.

wfl_as_wf version coming soon!
 
I'm getting these errors
Code:
C:/sources/wiiflow/source/main.cpp: In function 'bool isUsingUSB()':
C:/sources/wiiflow/source/main.cpp:33:14: error: aggregate 'isUsingUSB()::stat dummy' has incomplete type and cannot be defined
  struct stat dummy;
              ^~~~~
C:/sources/wiiflow/source/main.cpp:35:110: error: invalid use of incomplete type 'struct isUsingUSB()::stat'
  if(DeviceHandle.IsInserted(SD) && DeviceHandle.GetFSType(SD) != PART_FS_WBFS && stat(appPath.c_str(), &dummy) != 0)
                                                                                                              ^
C:/sources/wiiflow/source/main.cpp:33:9: note: forward declaration of 'struct isUsingUSB()::stat'
  struct stat dummy;
         ^~~~
C:/sources/wiiflow/source/main.cpp:43:36: error: invalid use of incomplete type 'struct isUsingUSB()::stat'
  if(stat(configPath.c_str(), &dummy) != 0)
                                    ^
C:/sources/wiiflow/source/main.cpp:33:9: note: forward declaration of 'struct isUsingUSB()::stat'
  struct stat dummy;
They seem to pertain to the recent changes?
 
I tried skimming the diffs for this version on sourceforge, but (mainly due to how awful the interface is) I can't seem to figure out which change corresponds to my issue. Could you point it out for me, please? :)
in booter/external_booter.cpp line #99

settime(secs_to_ticks(time(NULL) - 946684800));

i had changed the 946684800 to 946080000 some revisions back. i forget why. but i never committed this change and it didn't dawn me that this change was being compiled into the boot.dol
i simply reverted it back and then compiled wfl. this change doesn't show up in the commits.
 
Ah, I see - thanks! Do you remember why you made that change at all locally?
if i recall i noticed my wii's time over time would be either too fast or too slow. so i saw that line in the code and thought maybe wiiflow was messing with my wii's clock. silly i know.

I'm getting these errors
Code:
C:/sources/wiiflow/source/main.cpp: In function 'bool isUsingUSB()':
C:/sources/wiiflow/source/main.cpp:33:14: error: aggregate 'isUsingUSB()::stat dummy' has incomplete type and cannot be defined
  struct stat dummy;
              ^~~~~
C:/sources/wiiflow/source/main.cpp:35:110: error: invalid use of incomplete type 'struct isUsingUSB()::stat'
  if(DeviceHandle.IsInserted(SD) && DeviceHandle.GetFSType(SD) != PART_FS_WBFS && stat(appPath.c_str(), &dummy) != 0)
                                                                                                              ^
C:/sources/wiiflow/source/main.cpp:33:9: note: forward declaration of 'struct isUsingUSB()::stat'
  struct stat dummy;
         ^~~~
C:/sources/wiiflow/source/main.cpp:43:36: error: invalid use of incomplete type 'struct isUsingUSB()::stat'
  if(stat(configPath.c_str(), &dummy) != 0)
                                    ^
C:/sources/wiiflow/source/main.cpp:33:9: note: forward declaration of 'struct isUsingUSB()::stat'
  struct stat dummy;
They seem to pertain to the recent changes?

not sure. maybe add #include <sys/stat.h> to the top of main.cpp
 
had to add that #include <sys/stat.h> in menu_nandemu.cpp
Code:
gecko.cpp
C:/sources/wiiflow/source/gecko/gecko.cpp:63:1: warning: missing initializer for member 'devoptab_t::lstat_r' [-Wmissing-field-initializers]
 };
 ^
C:/sources/wiiflow/source/gecko/gecko.cpp:63:1: warning: missing initializer for member 'devoptab_t::utimes_r' [-Wmissing-field-initializers]
Built past this error
But getting
Code:
fileOps.c
C:/sources/wiiflow/source/fileOps/fileOps.c:12:10: fatal error: cmath: No such file or directory
 #include <cmath>
          ^~~~~~~
compilation terminated.
I've had a look through the references earlier in the thread - I can't make out what I need to do regarding this cmath error
I updated devkitpro
 
released wfl_as_wiiflow for r1150! for those of you who would rather just replace wiiflow with my mod.

https://sourceforge.net/projects/wiiflow-lite/files/wfl_as_wiiflow/

had to add that #include <sys/stat.h> in menu_nandemu.cpp
Code:
gecko.cpp
C:/sources/wiiflow/source/gecko/gecko.cpp:63:1: warning: missing initializer for member 'devoptab_t::lstat_r' [-Wmissing-field-initializers]
 };
 ^
C:/sources/wiiflow/source/gecko/gecko.cpp:63:1: warning: missing initializer for member 'devoptab_t::utimes_r' [-Wmissing-field-initializers]
Built past this error
But getting
Code:
fileOps.c
C:/sources/wiiflow/source/fileOps/fileOps.c:12:10: fatal error: cmath: No such file or directory
 #include <cmath>
          ^~~~~~~
compilation terminated.
I've had a look through the references earlier in the thread - I can't make out what I need to do regarding this cmath error
I updated devkitpro
try changing it to #include <math.h>
in my wfl code i don't have cmath i have #include <math.h>
 
is it useful to post this stuff here?
made those changes - comment out cmath and replaced with math.h
cmath appears in fileops, BNS decoder, vector and more...
this error
Code:
fileOps.c
C:/sources/wiiflow/source/fileOps/fileOps.c: In function 'fsop_MakeFolder':
C:/sources/wiiflow/source/fileOps/fileOps.c:433:16: error: storage size of 'filestat' isn't known
    struct stat filestat;
                ^~~~~~~~
C:/sources/wiiflow/source/fileOps/fileOps.c:434:8: warning: implicit declaration of function 'stat'; did you mean 'swab'? [-Wimplicit-function-declaration]
    if (stat(parentpath, &filestat) == 0)
        ^~~~
        swab
C:/sources/wiiflow/source/fileOps/fileOps.c:433:16: warning: unused variable 'filestat' [-Wunused-variable]
    struct stat filestat;
                ^~~~~~~~
C:/sources/wiiflow/source/fileOps/fileOps.c:449:6: warning: implicit declaration of function 'mkdir'; did you mean 'rmdir'? [-Wimplicit-function-declaration]
  if (mkdir(dirnoslash, 0777) == -1)
      ^~~~~
      rmdir
make[2]: *** [/opt/devkitpro/devkitPPC/base_rules:18: fileOps.o] Error 1
make[1]: *** [/c/sources/wiiflow/Makefile.main:144: build] Error 2
make: *** [Makefile:15: all] Error 2/[code]
 
had to add that #include <sys/stat.h> in menu_nandemu.cpp
Code:
gecko.cpp
C:/sources/wiiflow/source/gecko/gecko.cpp:63:1: warning: missing initializer for member 'devoptab_t::lstat_r' [-Wmissing-field-initializers]
 };
 ^
C:/sources/wiiflow/source/gecko/gecko.cpp:63:1: warning: missing initializer for member 'devoptab_t::utimes_r' [-Wmissing-field-initializers]
Built past this error
But getting
Code:
fileOps.c
C:/sources/wiiflow/source/fileOps/fileOps.c:12:10: fatal error: cmath: No such file or directory
 #include <cmath>
          ^~~~~~~
compilation terminated.
I've had a look through the references earlier in the thread - I can't make out what I need to do regarding this cmath error
I updated devkitpro

1. Add two NULLs to the end of the "gecko_out" array for lstat and utimes callbacks. They're new.

2. You cannot use <cmath> in C source. Use <math.h> instead.
 
  • Like
Reactions: kaisersozeh
Hey guys- been busy a while and haven't checked in.
The wii in my minivan has been pretty sweet, I love the setup with the version of WiiFlow lite I've been using. But recently we started having issues. Certain games (mario Kart) would just freeze upon loading. I thought maybe the IOS setting in the launcher got mixed up, and after playing around with those got it working again. But then it happened again to that and another game. I started to think maybe the USB drive is failing, but then one of my kids pointed out it started happening to a VC NAND console game as well. It seems the only things that consistently work 100% are the plugins (videos and emulators), which makes me think it has something to do with IOS, but I can't figure out what is causing it. I don't have a kill switch for the wii and they can't reach the buttons (buried under seats), so every time it happens I have to turn off the car to reboot. I'm starting to think I may need a remote kill button to reboot the circuit if I can't figure out why this keeps happening! Any thoughts?
 
1. Add two NULLs to the end of the "gecko_out" array for lstat and utimes callbacks. They're new.

2. You cannot use <cmath> in C source. Use <math.h> instead.
I'm not sure why the #include <cmath>. is appearing in the wiiflow code I updated over svn - I didn't put them there - but I have made those #include changes.
Thanks
added gecko.cpp:63
NULL, // device lstat
NULL, // device utimes

is it useful to post this stuff here?
made those changes - comment out cmath and replaced with math.h
cmath appears in fileops, BNS decoder, vector and more...
this error
Code:
fileOps.c
C:/sources/wiiflow/source/fileOps/fileOps.c: In function 'fsop_MakeFolder':
C:/sources/wiiflow/source/fileOps/fileOps.c:433:16: error: storage size of 'filestat' isn't known
    struct stat filestat;
                ^~~~~~~~
C:/sources/wiiflow/source/fileOps/fileOps.c:434:8: warning: implicit declaration of function 'stat'; did you mean 'swab'? [-Wimplicit-function-declaration]
    if (stat(parentpath, &filestat) == 0)
        ^~~~
        swab
C:/sources/wiiflow/source/fileOps/fileOps.c:433:16: warning: unused variable 'filestat' [-Wunused-variable]
    struct stat filestat;
                ^~~~~~~~
C:/sources/wiiflow/source/fileOps/fileOps.c:449:6: warning: implicit declaration of function 'mkdir'; did you mean 'rmdir'? [-Wimplicit-function-declaration]
  if (mkdir(dirnoslash, 0777) == -1)
      ^~~~~
      rmdir
make[2]: *** [/opt/devkitpro/devkitPPC/base_rules:18: fileOps.o] Error 1
make[1]: *** [/c/sources/wiiflow/Makefile.main:144: build] Error 2
make: *** [Makefile:15: all] Error 2/[code]
 
I've come to believe that wiiflow-lite is very good at corrupting my 64GB Sandisk microSD card in my Wii U, specifically through use of the Covers/Banners feature. If I never scan for covers, I don't seem to have any problems. As soon as I do, all hell breaks loose. All the following can suddenly become corrupted:

1. Banner data
2. Cover data
3. Game data

I had just copied over r1150 for testing, and figured it'd be a good idea to start from a fresh sd:/wiiflow directory, so I deleted the previous one.

I performed a scan for missing banners, and since there were still some missing, I fiddled about with the "from which regions" settings and scanned again. I got a few more, but after still not seeing too many even after choosing "refresh cache", I quit back to the HBC and opened WFL anew.

From here, some of the previously-obtained covers were garbled with coloured noise, which worried me, so I tried loading a game, which worked perfectly fine yesterday, and got the dreaded Exception DSI Error.
Note: The corruption looks a lot like this ancient wiiflow bug report, back when there were issues with USB, but SD worked fine. https://code.google.com/archive/p/wiiflow/issues/107

When trying to delete my cache directory I got an error from my file manager about LULZ.bnr, at which moment the following appeared in dmesg:
Code:
[ 2046.041633] FAT-fs (mmcblk0): error, fat_free_clusters: deleting FAT entry beyond EOF
[ 2046.041639] FAT-fs (mmcblk0): Filesystem has been set read-only

When trying to read (md5sum) one of the affected game (.wbfs) files, I get an input/output error, and dmesg is spammed with:
Code:
[ 2141.992698] FAT-fs (mmcblk0): error, fat_bmap_cluster: request beyond EOF (i_pos 1164160003)
[ 2141.992702] FAT-fs (mmcblk0): error, fat_bmap_cluster: request beyond EOF (i_pos 1164160003)
[ 2141.992706] FAT-fs (mmcblk0): error, fat_bmap_cluster: request beyond EOF (i_pos 1164160003)
[ 2141.992712] FAT-fs (mmcblk0): error, fat_bmap_cluster: request beyond EOF (i_pos 1164160003)

Now, I'm sure you're thinking "your SD card must be screwed". However I ran f3write and then f3read, and got 0 errors! It's only when I use the covers/banners feature that my microSD gets screwed up - if after a fresh SD setup I just play games without getting banners, it works fine!

As far as I can tell, the only files and folders to get screwed up are ones which either WFL directly accesses (either read or write), or which have similar filenames (e.g. cover art in the usb-loader folder can get screwed up, as can GameCube SD:/saves, where it's to be noted that these files share game IDs in their filenames.

@fledge68, How should I best proceed? I'm currently repeating f3.

P.S. I have actually been having these problems with all the versions of WFL I've ever tried, but I've always chalked it up to having copied something wrong. I'm however now totally convinced that it relates to the Cover/Banner update feature. I also have never experienced this corruption behaviour in CFG USB Loader Mod.

P.P.S. The new SD / USB detection logic seems to be failing in my case. I have a Wii U with one external hard disk attached (for Wii U Content), and my SD card has the /games and /wbfs folders. I get the 20 second pause regardless.
 
Last edited by aphirst,
  • Like
Reactions: kaisersozeh
To be clear, my issue with games failing to load are not necessarily related aphrist, as I'm still using the version before the SD-only wait option. I actually only found out another version had been rolled out when I came in to ask about my issue. Is there any reason certain USB and NAND titles would be having issues, but never plugins like snes9x or wiiMC? Unless perhaps there's a bug with covers like aphrist mentioned that predates the recent update?
 
Wiiflow Lite v4.4.0 r1150 released!

https://sourceforge.net/projects/wiiflow-lite/files/wfl_v4.4.0 r1150.zip/download

changes:
-removed sd only arg and replaced it with eisteinx2's code to detect sd only. with slight change because mountall() is called in other places.
-fixed font glyph x spacing so letters like W no longer bleed into or look like they connect to the next letter. also fixes letters like j's. thanks to usbloader gx freetypegx code.
-changed some font sizing. but had to make button fonts in bold. if not bold then sometime's the text would fade out and be hard to read. something to do with the wiiflow button images being transparent. has no effect on non transparent buttons like carbonik abz theme.
-fixed wfl so time and date in games is correct. thanks aphirst!
-now unloading theme.ini from mem after all buttons and labels are created. this is possible since coverflow.ini is now seperate from theme.ini.
- other minor code changes and rem's put in for easier code decyphering.

wfl_as_wf version coming soon!
I'm so glad I asked about this! :D thanks so much you guys, I've literally been bothered by this for years now. Love WiiFlow but being unable to get rid of that delay from SD-Only has ruined the WiiFlow experience for me and now that it's gone and I can also use it sensibly on my WiiU is a huge change for me. Kudos to you kind people for doing the work for the masses :D
 
I've come to believe that wiiflow-lite is very good at corrupting my 64GB Sandisk microSD card in my Wii U, specifically through use of the Covers/Banners feature. If I never scan for covers, I don't seem to have any problems. As soon as I do, all hell breaks loose. All the following can suddenly become corrupted:

1. Banner data
2. Cover data
3. Game data

I had just copied over r1150 for testing, and figured it'd be a good idea to start from a fresh sd:/wiiflow directory, so I deleted the previous one.

I performed a scan for missing banners, and since there were still some missing, I fiddled about with the "from which regions" settings and scanned again. I got a few more, but after still not seeing too many even after choosing "refresh cache", I quit back to the HBC and opened WFL anew.

From here, some of the previously-obtained covers were garbled with coloured noise, which worried me, so I tried loading a game, which worked perfectly fine yesterday, and got the dreaded Exception DSI Error.
Note: The corruption looks a lot like this ancient wiiflow bug report, back when there were issues with USB, but SD worked fine. https://code.google.com/archive/p/wiiflow/issues/107

When trying to delete my cache directory I got an error from my file manager about LULZ.bnr, at which moment the following appeared in dmesg:
Code:
[ 2046.041633] FAT-fs (mmcblk0): error, fat_free_clusters: deleting FAT entry beyond EOF
[ 2046.041639] FAT-fs (mmcblk0): Filesystem has been set read-only

When trying to read (md5sum) one of the affected game (.wbfs) files, I get an input/output error, and dmesg is spammed with:
Code:
[ 2141.992698] FAT-fs (mmcblk0): error, fat_bmap_cluster: request beyond EOF (i_pos 1164160003)
[ 2141.992702] FAT-fs (mmcblk0): error, fat_bmap_cluster: request beyond EOF (i_pos 1164160003)
[ 2141.992706] FAT-fs (mmcblk0): error, fat_bmap_cluster: request beyond EOF (i_pos 1164160003)
[ 2141.992712] FAT-fs (mmcblk0): error, fat_bmap_cluster: request beyond EOF (i_pos 1164160003)

Now, I'm sure you're thinking "your SD card must be screwed". However I ran f3write and then f3read, and got 0 errors! It's only when I use the covers/banners feature that my microSD gets screwed up - if after a fresh SD setup I just play games without getting banners, it works fine!

As far as I can tell, the only files and folders to get screwed up are ones which either WFL directly accesses (either read or write), or which have similar filenames (e.g. cover art in the usb-loader folder can get screwed up, as can GameCube SD:/saves, where it's to be noted that these files share game IDs in their filenames.

@fledge68, How should I best proceed? I'm currently repeating f3.

P.S. I have actually been having these problems with all the versions of WFL I've ever tried, but I've always chalked it up to having copied something wrong. I'm however now totally convinced that it relates to the Cover/Banner update feature. I also have never experienced this corruption behaviour in CFG USB Loader Mod.

P.P.S. The new SD / USB detection logic seems to be failing in my case. I have a Wii U with one external hard disk attached (for Wii U Content), and my SD card has the /games and /wbfs folders. I get the 20 second pause regardless.
Wow umm sorry i guess. Im confused by your talk of cover scanning and banner updating. first off its cover downloading and there is no updating or downloading of banners. the banners are gotten from the games themselves except for gc games which you will have to manually download on your pc and transfer to your sd card.

i also want to specify to any one reading this - he does mention that its been happening in previous versions not just this new release. which makes sense since i haven't really changed anything related to cacheing the covers and banners.

the first thing i noticed is you are using a micorSD which means you are using an adapter. i've heard that using microsd cards don't always work on wii and wii u.

I will try clearing my sd card and try a fresh install too. sometime this week i hope. unless someone else wants to. but i recommend back up your current sd card first. cause wfl seems to work fine with my current setup.
as for the 20 second pause. keep in mind the very first time on a fresh install you will still experience the 20 second wait because the ini cfg file is not created yet.

--------------------- MERGED ---------------------------

I'm so glad I asked about this! :D thanks so much you guys, I've literally been bothered by this for years now. Love WiiFlow but being unable to get rid of that delay from SD-Only has ruined the WiiFlow experience for me and now that it's gone and I can also use it sensibly on my WiiU is a huge change for me. Kudos to you kind people for doing the work for the masses :D
so it works for you? cause it doesn't for aphirst
 
  • Like
Reactions: WesMods
Wow umm sorry i guess. Im confused by your talk of cover scanning and banner updating. first off its cover downloading and there is no updating or downloading of banners. the banners are gotten from the games themselves except for gc games which you will have to manually download on your pc and transfer to your sd card.

i also want to specify to any one reading this - he does mention that its been happening in previous versions not just this new release. which makes sense since i haven't really changed anything related to cacheing the covers and banners.

the first thing i noticed is you are using a micorSD which means you are using an adapter. i've heard that using microsd cards don't always work on wii and wii u.

I will try clearing my sd card and try a fresh install too. sometime this week i hope. unless someone else wants to. but i recommend back up your current sd card first. cause wfl seems to work fine with my current setup.
as for the 20 second pause. keep in mind the very first time on a fresh install you will still experience the 20 second wait because the ini cfg file is not created yet.

--------------------- MERGED ---------------------------


so it works for you? cause it doesn't for aphirst
I just downloaded the newest r1150 and I'm about to fire it up with my monster WiiFlow setup (WesFlow :P). I've got about 8000+ games, covers etc so I'll see if anything breaks with your r1150 and post back soon with the results. I also have SanDisk 64gb MicroSD and adapter in both my Wii and WiiU and I've also got some 128gb and 256gb Sandisk MicroSD I'll test as well.
 

Site & Scene News

Popular threads in this forum