calvinhendriks / MKW-LAN-Brainslug

Play Custom Distributions of Mario Kart Wii in LAN mode up to 12 players using Brainslug.
2 stars 2 forks source link

Can't load a brainslug module on some games by USB Loader GX #4

Open JohnTitour opened 1 week ago

JohnTitour commented 1 week ago

Hello, I followed your tutorial in order to load brainslug modules by USB Loader GX and it works ! (It's genius, thank you). The module I want to load is a brainslug module that permit to use the Wii U Gamecube controllers adapter on Wii games (because I own a Wii U and not a Wii), it works on some games (I would say 50%), but on others it don't and I have this error: image Which is kind of strange because this module is the only one loaded on my games and the same symbols are loaded if the same modules are. I saw that some members of your team worked on brainslug modules, do you know were this error can come from ? Thank you !

PS: I saw in the TODO section of you repository that you wanted to load different modules depending of the mods. By searching in the brainslug code, I found out that brainslug can load modules by the gameId: If, in the bslug/modules, a folder have a name which is the prefix of the loaded gameId (the first four characters of the id, the compagny id is excluded), the modules contained in the folder will be loaded (it won't work if the compagny characters are part of the folder name). Maybe you already knew this information, maybe not, I just leave this here in case because I didn't saw it anywhere on the internet.

calvinhendriks commented 1 week ago

Hi, Really nice to see that someone uses my tutorial. Unfortunately, im not very skilled at coding in C, so i really have no idea what the issue is. Is had a lot of help from other people on discord. @lilousky might be up for it. They made it possible i could have super nice LAN parties and helped with a ton of stuff.

JohnTitour commented 1 week ago

Hi, Thank you for your answer, I'll ask her if she maybe has some clue. I think I have some skills in C (even if it's been a quite long time since I did some) but my knowledge in brainslug modules is really light.

lilousky commented 1 week ago

Hello, I followed your tutorial in order to load brainslug modules by USB Loader GX and it works ! (It's genius, thank you). The module I want to load is a brainslug module that permit to use the Wii U Gamecube controllers adapter on Wii games (because I own a Wii U and not a Wii), it works on some games (I would say 50%), but on others it don't and I have this error: image Which is kind of strange because this module is the only one loaded on my games and the same symbols are loaded if the same modules are. I saw that some members of your team worked on brainslug modules, do you know were this error can come from ? Thank you !

PS: I saw in the TODO section of you repository that you wanted to load different modules depending of the mods. By searching in the brainslug code, I found out that brainslug can load modules by the gameId: If, in the bslug/modules, a folder have a name which is the prefix of the loaded gameId (the first four characters of the id, the compagny id is excluded), the modules contained in the folder will be loaded (it won't work if the compagny characters are part of the folder name). Maybe you already knew this information, maybe not, I just leave this here in case because I didn't saw it anywhere on the internet.

Heya! Looking at the error message, it seems like the game you're trying to load doesn't have/has a different version of PADRead, which is an SDK function for GameCube controllers. This makes sense, as MP8 doesn't support GC controllers, so you'll want to ensure the GCN module isn't being loaded here. Ideally bslug would have a way of disabling a module for a certain game, but in its current state that isn't something it can do.

JohnTitour commented 1 week ago

Heya! Thank you very much for your reply :), So it seems they functions are missing on these games... Actually, on these screenshots, I was trying to launch a MP8 rom hack that is suppose to add GC controllers support, but I also had this error with other roms like Muramasa [RSFP99] (which -I'm sure- support GC controllers) ; maybe these functions have a different name with these or are not available during the start of the game (this is pure speculation, I'm a big newbie for bslug modules). On the other hand, the module works on games like Naruto Clash of Ninja Revolution European Version 1 [RNXPDA], 2 [RNYPDA] and 3 [RNXPDA] ; and and the PAL version of Mario Kart Wii [RMCP01].

lilousky commented 1 week ago

Oh I see for the mp8 mod. Unfortunately I can't seem to find any info on how the mod was made, so getting it to work with this module might be easier said than done. In regards to other vanilla games that have gcn support but that still aren't working, it might be possible that there's yet another version of the PADRead function that doesn't have it's symbol accounted for.

maybe these functions have a different name with these or are not available during the start of the game (this is pure speculation, I'm a big newbie for bslug modules

As stated in the last paragraph, it's probably the case that these names use a different version of the PAD library than the two for which chadderz included symbols for. You mentioned looking through the source code so you probably already know this, but bslug searches executable memory for specific bytes corresponding to a function's machine code (as symbol names aren't shipped in most Wii games, and this allows modules to work across most games seamlessly) so getting it to work here should just be a matter of identifying where the symbol that differs is and adding a symbol for it in pad.xml

JohnTitour commented 1 week ago

Hello Lilousky, Thank you very much for your help, I'll start to search if different versions of Pad read exists then ! I saw a pull request of this brainslug module for Fire Emblem Path of Radiance that use different symbols, it may be part of the solution :)