Fledge68 / WiiFlow_Lite

My mod of the Wii USB Loader WiiFlow
459 stars 58 forks source link

Display titles max out at 64 characters? #305

Closed SylvieWrath closed 2 years ago

SylvieWrath commented 2 years ago

So i noticed this first when i put the Homestar Runner games into the emuNand section of WiiFlow and had it pull the title database, but the titles in the wiiflow menu all cut off at 64 characters. Here's what shows for the five strongbad games: "Strong Bad's Cool Game for Attractive People - Episode 3 - Badd Strong Bad's Cool Game for Attractive People - Episode 2 - Stro Strong Bad's Cool Game for Attractive People - Episode 1 - Home Strong Bad's Cool Game for Attractive People - Episode 5 - 8-Bi Strong Bad's Cool Game for Attractive People - Episode 4 - Dang"

The WiiTDB.xml file is fine, but i notice this cutoff happens for any display title longer than 64 characters. So for example, a rom which doesn't have a database connection and the filename is > 64 characters. Or, even a ROM with a longer than 64 character title in the database.

I am currently using wiiflow 5.5.2, on a Wii, with the latest Rhapsodii Shima, plus the the Wiiflow Plugins Pack and all the various accoutrements that come with it.

eku commented 2 years ago

In many places in the source code buffers are statically created with a size of 64 bytes on the stack. 64 is probably a magic number. If C++ is used, std::String could be used whose size is allocated dynamically.

SylvieWrath commented 2 years ago

what do you mean by 64 being a "magic number"? And would it be possible to change that value to 128? That would give an adequate amount of display space I'd think (though i'm hard pressed to think of any game names (NOT filenames) that would even get close to that limit, the strong bad games would seem to be outliers)

Fledge68 commented 2 years ago

in wiiflow and usblgx disc.h uses header structs with the titles being char[64]. this is the way real wii disc are setup with titles only 64 characters or less - https://wiibrew.org/wiki/Wii_disc

even if i change dir_discHdr that will conflict with wiiflow's cached lists in wiiflow/cache/lists folder.

Strong Bad's Cool Game for Attractive People - Episode 1 - Homestar Ruiner is an extremely large title. you could simply shorten it to SBCGAP - Episode 1 - Homestar Ruiner. I'm not changing the length.

SylvieWrath commented 2 years ago

k, that's a good enough explanation for me. Thanks for answering, i'd much rather know how/why it works this way and know for sure it's gonna stay this way and make such workarounds than wonder idly if it'll ever be "fixed".