Hacking WiiFlow Lite

kaisersozeh

Well-Known Member
Member
Joined
Mar 21, 2018
Messages
260
Trophies
0
Location
Phobos
XP
1,054
Country
Antarctica
Love wiiflow too - what did you mean by UX stuff ui=user interface, but UX? User experience?
It is all about the rough edges with the interface, couldn't agree more - great work by Fledge keeping it updated, love the guy for it....but yeah.
 
  • Like
Reactions: einsteinx2

einsteinx2

Well-Known Member
Newcomer
Joined
May 3, 2018
Messages
55
Trophies
0
Age
38
XP
363
Country
Colombia
Yep exactly, UX is short user experience. WiiFlow is like 99% there, just some small things that bother me every time I use it. Though I do backend development and system architecture and admin, my main work for the past 8 years in software development has been UI engineering. Mainly iOS and Mac (I actually worked at Apple on Photos for Mac for a few years). So I tend to automatically look for little UI improvements, or rather, am automatically bothered by little UI annoyances haha.
 
Last edited by einsteinx2,
  • Like
Reactions: kaisersozeh

einsteinx2

Well-Known Member
Newcomer
Joined
May 3, 2018
Messages
55
Trophies
0
Age
38
XP
363
Country
Colombia
Well this is...weird. I used dd to create a blank file of just 0's the exact length of gc.ogg called blank.ogg. I used a hex editor to open both the gc.ogg, blank.ogg, and boot.dol files. I copied the entire hex contents of gc.ogg and searched for it in boot.dol. Found it, and replaced it with the contents of blank.ogg. So far so good. Copied it over to my SD card, booted my Wii, opened a game, and...it still played the song. :blink:

I double checked that the boot.dol file on my SD card definitely no longer contained the contents of gc.ogg, booted my Wii again, still plays the song. I have no idea where it could be playing it from. Unless somehow dol files are cached somewhere? It makes no sense... Anyway it's getting late, so I'm done for tonight, but if anyone has any idea how it could possibly still be playing the ogg file when it no longer exists in the dol file, I'd love to hear it!
 

fledge68

Well-Known Member
OP
Member
Joined
Jan 30, 2012
Messages
2,440
Trophies
2
XP
4,981
Country
United States
My plan was actually to just remove it entirely. Or even better add a setting for it, even if it's only in the ini file. I'm putting together a small list of changes and fixes I'd like to attempt once I get it compiling. Currently it includes:

1. Faster or background loading of covers so that the loading cover is never seen
2. Antialiasing or some kind of better smoothing on resized banners (currently they are extremely jaggy when shown in the top right)
3. Add option to disable GameCube boot sound when choosing a game (or maybe have it optionally load an ogg file from the wiiflow settings folder so people can change it).

I'm sure I'll end up adding more as I find more small annoyances :)

Overall I love WiiFlow, I just get easily annoyed by small UX and UI things haha. In any case, it'll be a fun project to tackle in my spare time. Then I can move on to messing with Nintendont!

Since I can't currently compile the binary, I might try the quick and dirty route of just using a hex editor to zero out the ogg file or replace it with a silent ogg file of the same file size...
For covers it might be the hq setting. Wfl it defaults to on. Wf it defaults to off i believe. You can change it in wiiflow_lite.ini.

For gc sound. Yes its built into wiiflow you will have to recompile to remove it or use one of abzs custom banners that includes a sound. Or add a sound file to his custom banners that dont have sound.
 

einsteinx2

Well-Known Member
Newcomer
Joined
May 3, 2018
Messages
55
Trophies
0
Age
38
XP
363
Country
Colombia
For covers it might be the hq setting. Wfl it defaults to on. Wf it defaults to off i believe. You can change it in wiiflow_lite.ini.

For gc sound. Yes its built into wiiflow you will have to recompile to remove it or use one of abzs custom banners that includes a sound. Or add a sound file to his custom banners that dont have sound.

Thanks for the reply! I just double checked my wiiflow.ini and you're right, it has HQ covers off while wiiflow_lite.ini has them on. I'll give it a shot and see if I prefer higher quality covers or faster loading times. Ideally though, I want to have my cake and eat it too, so once I get it compiling I'll see what I can do about optimizing the cover loading or possibly preloading further ahead (memory allowing). At least now I know it's not a code change, so I don't have to waste time trying to figure that out and can go right to working on loading optimization.

Regarding the GC sound though, I hex edited the .dol file to completely remove the gc.ogg file and replace it with 0's, yet somehow the sound still plays. I'm at a complete loss as to how that could be possible. Do you know if there's some way the Wii is caching the old .dol file or something? I can't think of any other way it could be playing a sound that was physically removed (err well digitally haha) from the binary. If the sound data doesn't exist, it shouldn't play it, or so the logic would go, but yet somehow it does. I'm really confused on that one. I feel like there's something obvious about the Wii architecture I'm missing or something else because I double checked my binary twice and confirmed I completely removed the sound data and yet it still plays after multiple reboots. The only thing I didn't try was completely unplugging it, but that shouldn't make a difference since it's my understanding that it's reading the .dol file and launching whatever is on the SD card each time.

EDIT: Yep switched the cover_use_hq setting to no and I barely see loading covers now! Also I can't really tell much of a difference in quality either, though that could be due to the crappy HDMI upscaler adaptor I'm using right now while I wait for my OEM component cables and non scaling HDMI adaptor to come in the mail. Either way, this is a huge improvement, thanks! I'm glad it was as simple as a config change.
 
Last edited by einsteinx2,
  • Like
Reactions: kaisersozeh

dishe

Well-Known Member
Member
Joined
Apr 11, 2018
Messages
134
Trophies
0
Age
44
XP
231
Country
United States
Ok, I've almost got everything the way I want it for now. One thing I can't seem to find is the option to start on the source menu. What happened to that? It used to be in startup settings, along with the source flow option on WiiFlow, but I see you moved source flow to the settings within the source menu (which makes more sense honestly), but I still can't find the option to show it on boot.
 

dishe

Well-Known Member
Member
Joined
Apr 11, 2018
Messages
134
Trophies
0
Age
44
XP
231
Country
United States
Ok, I've almost got everything the way I want it for now. One thing I can't seem to find is the option to start on the source menu. What happened to that? It used to be in startup settings, along with the source flow option on WiiFlow, but I see you moved source flow to the settings within the source menu (which makes more sense honestly), but I still can't find the option to show it on boot.
Scratch that, got around it. I opened up the ini file in the app folder and found the line to set autoboot to yes. Couldn't find it in the UI, but at least I got it. Works.
I'm having trouble with a different thing now though- using @spacepimp 's advice to make a source menu autoboot option for wiimc, it doesn't show on my source menu. Like, at all. Just skips it. I can't figure out what I'm doing wrong, I copied the syntax exactly. Oddly enough, it works from within WiiFlow mastermod. Did Lite do something that broke that function? Or is the syntax just different now?
 

einsteinx2

Well-Known Member
Newcomer
Joined
May 3, 2018
Messages
55
Trophies
0
Age
38
XP
363
Country
Colombia
Btw for anyone trying to compile on macOS that installed devkitpro ppc but still get the "make[1]: powerpc-eabi-gcc: No such file or directory" error when compiling, make sure to add /opt/devkitpro/devkitPPC/bin to your path so make can find it.
 
  • Like
Reactions: kaisersozeh

kaisersozeh

Well-Known Member
Member
Joined
Mar 21, 2018
Messages
260
Trophies
0
Location
Phobos
XP
1,054
Country
Antarctica
Scratch that, got around it. I opened up the ini file in the app folder and found the line to set autoboot to yes. Couldn't find it in the UI, but at least I got it. Works.
I'm having trouble with a different thing now though- using @spacepimp 's advice to make a source menu autoboot option for wiimc, it doesn't show on my source menu. Like, at all. Just skips it. I can't figure out what I'm doing wrong, I copied the syntax exactly. Oddly enough, it works from within WiiFlow mastermod. Did Lite do something that broke that function? Or is the syntax just different now?
Funnily enough i'm using the sourceflow to start wiixplorer in the same way and its working fine with the new build. Let me check ...
[BUTTON_2]
source=homebrew
autoboot=wiixplorer
image=wiixplorer.png
title=WiiXplorer

I have a blank source menu button after, I dont know when or why that's become needed, used it after I had problems and saw someone else doing it...


[BUTTON_3]
image=
image_s=
title=
source=
magic=
emuflow=

If i remember, you have to be careful about having every numerical slot filled - no blanks - and the last number the blank.
@einsteinx2 I have that picture facing the door in my hallway when you walk in. Seriously, I love that photo!
 
Last edited by kaisersozeh,

einsteinx2

Well-Known Member
Newcomer
Joined
May 3, 2018
Messages
55
Trophies
0
Age
38
XP
363
Country
Colombia
@GreyWolf @Cyan ok so im updating wiiflow lite to compile with the latest ppc and libogc. i've got the code cleaned up but after it says linking elf i get errors pertaining to libvorbisidec, libturbojpeg, and libcustomfat.

i suck at libs. what is custom about libfat? how do i update these libs? where do i get them?

i get these errors - undefined reference to `__ctype_ptr__'

please help

Do you have the cleaned up code pushed anywhere? Now that I'm able to start to get compiling working, I've been fixing the compilation errors as well, but I think I'm mostly duplicating your work. I didn't see anything pushed to SVN. I think I've also fixed a few issues that may only affect building on macOS. If I can get your changes as well, I'm pretty good with fixing lib errors so maybe I can get it compiling tonight.

EDIT: Actually never mind, I've got all the compile errors fixed and am now at the libturbojpeg linker issue that you're on.
 
Last edited by einsteinx2,
  • Like
Reactions: kaisersozeh

fledge68

Well-Known Member
OP
Member
Joined
Jan 30, 2012
Messages
2,440
Trophies
2
XP
4,981
Country
United States
does anyone really care about the jpg support in wiiflow? i mean before it everything was png and png is lossless and includes transparency and just as good as jpg. i could easily remove the jpg support and then i wouldn't even need tubojpeg lib. except i would have to also remove the thp videos support since it uses turbojpeg as well but again thats something most people don't use.
 
  • Like
Reactions: kaisersozeh

einsteinx2

Well-Known Member
Newcomer
Joined
May 3, 2018
Messages
55
Trophies
0
Age
38
XP
363
Country
Colombia
does anyone really care about the jpg support in wiiflow? i mean before it everything was png and png is lossless and includes transparency and just as good as jpg. i could easily remove the jpg support and then i wouldn't even need tubojpeg lib. except i would have to also remove the thp videos support since it uses turbojpeg as well but again thats something most people don't use.
I don't know what the main difference is between libturbojpeg and libjpeg, but devkitpro has a jpeg lib here: https://sourceforge.net/projects/devkitpro/files/portlibs/ppc/

EDIT: Nevermind, I think libturbojpeg is actually just a wrapper for libjpeg
 
Last edited by einsteinx2,

fledge68

Well-Known Member
OP
Member
Joined
Jan 30, 2012
Messages
2,440
Trophies
2
XP
4,981
Country
United States
I don't know what the main difference is between libturbojpeg and libjpeg, but devkitpro has a jpeg lib here: https://sourceforge.net/projects/devkitpro/files/portlibs/ppc/

EDIT: Nevermind, I think libturbojpeg is actually just a wrapper for libjpeg
thanks for the info. i got wfl to compile with ppc r28 and libogc 1.8.15-1 with the errors fixed that r29 detected. wfl is bigger in bytes now but seems to run much smoother. i didn't notice any funky covers. the only thing is its still using the old libvorbis, libfat, libturbojpeg.
 
  • Like
Reactions: kaisersozeh

einsteinx2

Well-Known Member
Newcomer
Joined
May 3, 2018
Messages
55
Trophies
0
Age
38
XP
363
Country
Colombia
thanks for the info. i got wfl to compile with ppc r28 and libogc 1.8.15-1 with the errors fixed that r29 detected. wfl is bigger in bytes now but seems to run much smoother. i didn't notice any funky covers. the only thing is its still using the old libvorbis, libfat, libturbojpeg.
Whoa how'd you get it to compile? I've replaced libfat and libivorbisdec and the only issue I have left is with libturbojpeg. Specifically undefined reference to `__ctype_ptr__'

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

I'm using the latest devkitpro ppc kit with presumably the latest libogc as I just installed everything yesterday. I fixed a ton of compiler errors, almost all of them were implicit casts with a few that I think are macOS specific (needed to add #define _GNU_SOURCE to the tops of those files). Then I was down to just linker errors, but after finding replacement fat and vorbis libs from other Wii projects, I'm now left only with the turbojpeg lib linker error.
 

einsteinx2

Well-Known Member
Newcomer
Joined
May 3, 2018
Messages
55
Trophies
0
Age
38
XP
363
Country
Colombia
is your OS 64 bit?
Yep. I'm running macOS High Sierra on a touch bar MacBook Pro.

@fledge68: Also it looks like the only place libturbojpeg is used is in ONE function called decodeRealJpeg in gcvid.cpp, which just decodes a jpeg to presumably bitmap data. It calls only 2 functions from the library: tjDecompressHeader2 and tjDecompress2, so it seems like it should be easy to replace.
 
  • Like
Reactions: kaisersozeh

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
If you want to just use the real libfat and WiiFlow uses the "fatfile_frag.h" header you can just use this. It's an amalgamation I made of just what's necessary to get the frag list. Make sure you link with "-lfat" instead of "-lcustomfat".
 

Attachments

  • fatfile_frag.zip
    2.2 KB · Views: 85
Last edited by GreyWolf,
  • Like
Reactions: einsteinx2

einsteinx2

Well-Known Member
Newcomer
Joined
May 3, 2018
Messages
55
Trophies
0
Age
38
XP
363
Country
Colombia
So I commented out the contents of the decodeRealJpeg function and it links now. Also I commented out the code that plays the GameCube sound so I would know it was different. Booted up...and it still played the GC sound. :blink:

So then I deleted the .dol file completely and rebooted...and it launched fine without the dol. Went to homebrew launcher and it wasn't listed which makes sense since I deleted the dol file lol. So then I tried the forwarder channel, and it just pops back to the channel list also as expected. Rebooted again and it loaded fine.

So it looks like I found out why my hex edited build wasn't loading. It looks like since I have priiloader set to auto-launch WiiFlow, it's presumably installed in the system NAND. I don't really know much about priiloader, so I had just assumed that when I installed a launch title, it just meant it would run the forwarder. At least that's one mystery solved. I'm going to turn off the auto-launching in priiloader or try using a separate app folder for my custom builds to see if that works. I swear I also tried loading my hex edited build using the homebrew launcher and the forwarder channel with the same result, but maybe I'm misremembering.

Well at least that's one mystery solved!

EDIT: Haha well so much for that. It compiles, but when I try to launch it (I used a separate app folder this time), it just tries to read the hard drive for like 10 seconds and then crashes:

0pIalkh.jpg


EDIT 2: OK now I'm completely confused... I replaced my compiled version with my hex edited version that removed the gc sound and replaced it with 0's, launched it from the hombrew launcher from the separate folder I created for this (/apps/wiiflow_ben) and it runs this time instead of crashing (sweet!) and then plays the gc sound when I choose a game (wtf!?!?). I just don't get what the hell is going on here. How can it possibly play a sound that it doesn't have data for? Is it somehow still using the priiloader version even though I'm explicitly launching it from a separate folder using homebrew launcher? None of this makes any sense.

EDIT 3: I removed the installed title from Priiloader and set it to launch the system menu, then I opened the homebrew launcher and loaded the hex edited version again. Still plays the sound. I just don't get it. Is it because both titles have the same ID or something? If I can get my build to stop crashing, I can make changes to the UI or something to confirm it's really loading my version, but until then I'm stumped.
 
Last edited by einsteinx2,
  • Like
Reactions: kaisersozeh

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    @mthrnite, Cheetah Girls, the sequel to Action 52's Cheetah Men.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Pokemon Black I played that one a lot
  • K3Nv2 @ K3Nv2:
    Honestly never messed with Pokémon on ds much
  • mthrnite @ mthrnite:
    I played pokemon once, was bored, never tried again
  • Psionic Roshambo @ Psionic Roshambo:
    Oh Dragon Quest IX
  • K3Nv2 @ K3Nv2:
    Spent like 5 hours on switch one never touched it again
  • Psionic Roshambo @ Psionic Roshambo:
    Sentinel of the stary skies
  • K3Nv2 @ K3Nv2:
    Ds is 20 years old this year
  • Psionic Roshambo @ Psionic Roshambo:
    So MJ no longer wants to play with it?
  • K3Nv2 @ K3Nv2:
    He put it down when the 3ds came out
  • SylverReZ @ SylverReZ:
    @K3Nv2, RIP Felix does great videos on the PS3 yellow-light-of-death.
  • Jayro @ Jayro:
    Eventhough the New 3DS XL is more powerful, I still feel like the DS Lite was a more polished system. It's a real shame that it never got an XL variant keeping the GBA slot. You'd have to go on AliExpress and buy an ML shell to give a DS phat the unofficial "DS Lite" treatment, and that's the best we'll ever get I'm afraid.
    +1
  • Jayro @ Jayro:
    The phat model had amazingly loud speakers tho.
    +1
  • SylverReZ @ SylverReZ:
    @Jayro, I don't see whats so special about the DS ML, its just a DS lite in a phat shell. At least the phat model had louder speakers, whereas the lite has a much better screen.
    +1
  • SylverReZ @ SylverReZ:
    They probably said "Hey, why not we combine the two together and make a 'new' DS to sell".
  • Veho @ Veho:
    It's a DS Lite in a slightly bigger DS Lite shell.
    +1
  • Veho @ Veho:
    It's not a Nintendo / iQue official product, it's a 3rd party custom.
    +1
  • Veho @ Veho:
    Nothing special about it other than it's more comfortable than the Lite
    for people with beefy hands.
    +1
  • Jayro @ Jayro:
    I have yaoi anime hands, very lorge but slender.
  • Jayro @ Jayro:
    I'm Slenderman.
  • Veho @ Veho:
    I have hands.
    Veho @ Veho: +1