Homebrew Need help with vWii gc adapter for project M

JacobM

Well-Known Member
Member
Joined
Jun 16, 2017
Messages
242
Trophies
0
XP
599
Country
United States
Cyan explained the way of how you'd go repackaging it into whatever slot you want with ShowMiiWad
Thats not the issue. I can already get any IOS working through USB Loader GX. I just need an IOS38 based CIOS for loading SSBB from USB. Completely different topics.
 
Last edited by JacobM,

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
if you want a cIOS based on 38 (which was historically used by waninkoko for cIOS rev17 and previous), you can use d2x and select base 38 instead of 56/57/58 !
just try installing base38 in slot 248 (or 251 because base58 is very rarely needed).

vWii version doesn't allow base38?
 

JacobM

Well-Known Member
Member
Joined
Jun 16, 2017
Messages
242
Trophies
0
XP
599
Country
United States
if you want a cIOS based on 38 (which was historically used by waninkoko for cIOS rev17 and previous), you can use d2x and select base 38 instead of 56/57/58 !
just try installing base38 in slot 248 (or 251 because base58 is very rarely needed).

vWii version doesn't allow base38?

Nope. vWii needed custom CIOS made by Fix94 and he only added CIOS maps for 56, 57, 58. Historically, the IOS changed completely between the the Wii and vWii. Wii is running on v4124 while vWii is on v4380.

I'm currently trying to decipher how ciosmaps.xml works to create a CIOS 38 patch. If I happen to get that working (will need a miracle) I don't know if I would feel comfortable distributing a poorly slapped together CIOS. Maybe Fix94 would like to pitch in here. He seems to be one of the only experienced CIOS people around.
 

JacobM

Well-Known Member
Member
Joined
Jun 16, 2017
Messages
242
Trophies
0
XP
599
Country
United States

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
Fix wrote the installer for IOS236 (instead of patching IOS36 from SD he created a patcher which took IOS36 directly from NAND).
He didn't wrote the cIOS or the maps, only the tools to use internal IOS as base, instead of internet or SD as sources. internet wasn't possible at that time (double/ancast key layer) and extracting a clean WAD to patch/install as cIOS was too much effort for noobs.
 
Last edited by Cyan,

JacobM

Well-Known Member
Member
Joined
Jun 16, 2017
Messages
242
Trophies
0
XP
599
Country
United States
Fix wrote the installer for IOS236 (instead of patching IOS36 from SD he created a patcher which took IOS36 directly from NAND).
He didn't wrote the cIOS or the maps.
Ah gotcha! Should I even bother trying to revise the ciosmap?
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
if you understand how it works, and how it was updated from wii to vwii, it might be applicable to other base.
you probably need to know which addresses and area of the IOS need to be patched/replaced. You might have to analyze the IOS's arm code, maybe? I don't know in fact. never tried to learn how d2x worked.
 
Last edited by Cyan,

JacobM

Well-Known Member
Member
Joined
Jun 16, 2017
Messages
242
Trophies
0
XP
599
Country
United States
WELP... I somehow created a CIOS based on IOS38 that has less compatibility than vanilla IOS38 :rofl2:

Unfortunately, IOS 38 changed much more drastically than 56-58 when it was "ported" to vWii. As a result, I could not identify two seemingly critical patches.


Disable Disk Drive?? From IOS38-64-v4123 located in 00000001.app...
Code:
<content id="0x1" patchscount="2">
                <!-- Disable DI DVD Video commands -->
                <patch offset="0x68D" size="1" originalbytes="0x01" newbytes="0x00"/>
                <patch offset="0x719" size="1" originalbytes="0x01" newbytes="0x00"/>
</content>


Hermes Patch?? From IOS38-64-v4123 located in 0000000e.app...
Code:
<content id="0x17" patchscount="1">
                <!-- Reroute IRQ9 to mload -->
                <patch offset="0x266A0" size="4" originalbytes="0xFF,0xFF,0x5A,0xD2" newbytes="0x13,0x6D,0x00,0x11"/>
</content>

The IOS38-64-v4123 00000001.app & 0000000e.app have near matching file sizes as their IOS38 v4380 counterparts (+2 lines, -26 lines respectively) but nothing in common from a hex perspective.

It cannot boot SD/USB Wii games (seems to be mload patch related as CFG loader reports "FRAG: mload_init ERROR") and breaks adapter compatibility (doh!).

I have no clue how I could track down the missing elements above so I guess the USB Loader dream finally dies! Next weekend I'll add d2x cios base 38 to my Wii so we can figure out if the correctly installed d2x patches break adapter compatibility anyways.
 
Last edited by JacobM,

JacobM

Well-Known Member
Member
Joined
Jun 16, 2017
Messages
242
Trophies
0
XP
599
Country
United States
Wait wat?
What crazy thing did happen here?
GC Adapter on vWii?
Could this patch somehow be ported to WiiVC (fw.img aka ios255)?

I believe somebody tried patching it into an ISO directly and installing it as WiiVC, but it didn't work. So far, it only seems to work with IOS 36, 38, and 236 and requires the disc.
 
Last edited by JacobM,
  • Like
Reactions: Billy Acuña

JacobM

Well-Known Member
Member
Joined
Jun 16, 2017
Messages
242
Trophies
0
XP
599
Country
United States
Oh man, hope this could be sorted off, with this I can finally say goodbye to my old Wii.
Maybe. I think our only two options right now are either attempting to create a IOS38 based cIOS (doesn't exist for vWii & we don't even know if this would work) or a complete redesign of the patch to function specifically with d2x cIOS.

If you have a Wii on hand and know your way around cIOS we could use you! There are a number of IOS 38 based cIOS fully fleshed out for the Wii that could help us figure out if that can even be a viable option on the vWii.
 
Last edited by JacobM,

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
Maybe the disc is not required if "base36" is the solution.
a d2x cIOS based on IOS36 would allow USB Loading. But currently, could be tested only on Wii.

this way, we could narrow the problem (the usb/disc mode, the base IOS, or the d2x/hermes/cIOS modules?)
 
Last edited by Cyan,

JacobM

Well-Known Member
Member
Joined
Jun 16, 2017
Messages
242
Trophies
0
XP
599
Country
United States
Maybe the disc is not required if "base36" is the solution.
a d2x cIOS based on IOS36 would allow USB Loading. But currently, could be tested only on Wii.

this way, we could narrow the problem (the usb/disc mode, the base IOS, or the d2x/hermes/cIOS modules?)
Yup, but I don't know of any IOS 36 based cIOS other than IOS236. According to ModMii there are none. 38 seems to have equal compatibility and has a fair number of cIOS developed for it on the Wii. Would all of the modules still be needed if we wanted to make a lean cIOS for USB loading with no neek support, etc?

<content id="0x19" module="MLOAD" tmdmoduleid="-1"/>
<content id="0x1a" module="FAT" tmdmoduleid="-1"/>
<content id="0x1b" module="SDHC" tmdmoduleid="-1"/>
<content id="0x1c" module="EHCI" tmdmoduleid="3"/>
<content id="0x1d" module="DIPP" tmdmoduleid="-1"/>
<content id="0x1e" module="ES" tmdmoduleid="-1"/>
<content id="0x1f" module="FFSP" tmdmoduleid="-1"/>
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
sorry, I don't know enough about IOS structure.
Maybe @damysteryman could help (or not, I know he made patches, but he said he doesn't know how to do more. plus, he is not often on the forum)

Fix94 or Davebaol would be the most appropriate person to look into it.
Maybe Dimok too, but same as DMM he is not often on the forum.
 
  • Like
Reactions: JacobM

JacobM

Well-Known Member
Member
Joined
Jun 16, 2017
Messages
242
Trophies
0
XP
599
Country
United States
sorry, I don't know enough about IOS structure.
Maybe @damysteryman could help (or not, I know he made patches, but he said he doesn't know how to do more. plus, he is not often on the forum)

Fix94 or Davebaol would be the most appropriate person to look into it.
Maybe Dimok too, but same as DMM he is not often on the forum.

Gotcha. I'll see if I can get this stuff ironed out on the Wii before reaching out to any other experts in Wii homebrew.

What about using Uneek2O+DI r96 beta 9.6
1. Under the 1+2 settings, I see hooktype as a function under debugger. Any way to hijack that feature to load the gameconfig.txt you generated?
2. If we manage to patch the ISO directly, and boot the "disc" from disc channel what IOS would it be acting under? It wouldn't be cIOS based, right?
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
if the cheatcode works (it does), then you don't need to hijack anything in neek, you need the kenobiwii.bin file in sneek folder to enabled debug/codehandler.
I don't know how to enable the cheat file, maybe it's loaded automatically based on titleID? you'll have to read how neek works with cheat.
but then, you can use neek with extracted game FS or even neek2o with wbfs format.


you said the game request IOS36 by default, so it would work under IOS36.
 
  • Like
Reactions: JacobM

wilm0x42

Active Member
Newcomer
Joined
Mar 10, 2018
Messages
28
Trophies
0
Age
22
XP
139
Country
United States
I leave for ONE week, and everything's dissolved into cIOS chaos. Lovely. :P

*Ahem* Perhaps things have gotten a bit off-track? Allow me to recap what's been done so far. Please correct me if I've made any mistakes here.
  1. As it was, the main outcome of failed configurations was the "Now Loading" loop. This suggests that the game encountered some error that was never expected to happen, and thus goes unhandled, so everything besides the initialization thread assumes everything is normal. I haven't gotten around to reproducing this situation in a debuggable environment, so it's hard to say where and how things are going wrong.
  2. You guys confirmed that this problem is caused by cIOS (Well done, @JacobM !)
  3. To fix it, you tried running the game with several (c)IOSes, finding that IOS 38 is the most tolerant to the situations thrown at it.
  4. Now you're trying to find an effective way to run the game with a custom IOS 38, to "solve" the problem.
I don't know about you, but the last thing I want to happen to this hack is for it to require generally uncomfortable changes to IOS in order to work for a sizeable chunk (If not the majority) of its users.

The only part of the code that would be affected by IOS at all would be communication with USB. I guarantee that's where the problem is coming from, and I'd bet the cleanest way of fixing will be by fixing the hack itself. (We shouldn't need sub-hacks for USB loader support.) The only hard part is finding out how the different IOSes are breaking the code. I'd guess that cIOS is likely patching the behaviour of the OHCI (USB 1.1) driver. (Whyever the heck that's helpful to them. Maybe that's how they did it before USB2.0 support in IOS58?). If that's the case... I guess I'll be looking into cIOS source code. :P

Anyway, I guess the most helpful thing I could ask you guys to do right now would be to try running a USB loader setup in dolphin, to get a look at the debug output. (lol, dolphin has so many useful useless uses. :P) Probably an obnoxious task, I know; I'll try this myself, when I have time.

As a small thanks for all your patience and hard work, I wanted to share a small look at how I debugged this during development. :P
https://user-images.githubusercontent.com/26749441/37751462-09e643ec-2d69-11e8-9a15-33fb56dccd03.png
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: good night