How is it hard to code a cIOS module ?

  • Thread starter Thread starter creedof69
  • Start date Start date
  • Views Views 650
  • Replies Replies 5

creedof69

Well-Known Member
Member
Joined
Apr 28, 2023
Messages
191
Reaction score
29
Trophies
0
Age
27
XP
446
Country
France
Hi everyone, I motivated myself to create a cIOS module (like the creator of fakemote did) to make the official GameCube USB adapter acting like GameCube physical port for the Wii.
I want to do this in order to use again GameCube controller on Wii games originally compatible with it like Mario kart Wii and make games displays the GameCube layout and not the Classic Controller one like DBZ BT3 or Resident Evil Archives games.
Does anyone know what should I know or study to begin with ?
I plan to do this especially for the vWii but I prefer to begin with the normal Wii nand because mine has boot2.
Thanks for future help.
 
ask @blackb0x
also blackb0x has said why this is not really feasible
And do you think it would be possible to make Wii U pro controller compatible and acting like a classic controller, either wireless even if it only with USB loader (the controller make the battery icon blinking briefly when you tried to pair it to the vWii), or wired like fakemote ?
 
Hi everyone, I motivated myself to create a cIOS module (like the creator of fakemote did) to make the official GameCube USB adapter acting like GameCube physical port for the Wii.
It would actually be nice to do this in fakemote itself. Fakemote could read a configuration file which would carry the information whether the given USB controller needs to be presented as a Wiimote or as a GC controller.

Realistically, though, it would be easier to do this in a new cIOS module, because the way that fakemote injects the wiimote events into the system is not trivial or easily extensible.

Either way, the main functionalities of your module would be these:
1) Read the events from the USB adaptor. This is the easier of the two, there's nothing really hard in this. I recommend using our embedded-game-controller library for this, because it allows you to test the reading without writing a cIOS module; also, once you write a driver for it, it can be used in any other application using the library (including fakemote).
2) Injecting the events into the system. For this you first need to study how games read the GC controller; I suspect that the code is all in libogc, and that the USB controller OH0 is open directly. Your cIOS module could then register itself as a handler for /dev/usb/oh0 and decide which functions it handles directly and which it delegates to the original IOS (like fakemote does). This is assuming that the GC controller is accessed via OH0 -- which I haven't checked.

UPDATE: I checked libogc's code, and my assumption is wrong: the GC controllers are not presented as USB devices, but they are read via the serial interface. That is, the data is exchanged via those hardware registers, so it remains to be seen if it's possible to emulate it (maybe the cIOS module could write emulated data into the input buffers?).
 
Last edited by mudrik,
  • Like
Reactions: creedof69
Hi everyone, I motivated myself to create a cIOS module (like the creator of fakemote did) to make the official GameCube USB adapter acting like GameCube physical port for the Wii.
I want to do this in order to use again GameCube controller on Wii games originally compatible with it like Mario kart Wii and make games displays the GameCube layout and not the Classic Controller one like DBZ BT3 or Resident Evil Archives games.
Does anyone know what should I know or study to begin with ?
I plan to do this especially for the vWii but I prefer to begin with the normal Wii nand because mine has boot2.
Thanks for future help.
Missed this thread? https://gbatemp.net/threads/play-wi...adderz121-wup-028-bslug-little-update.674840/
 
No I answer him but, even if it's a real big step, it only works for few games like Mario Kart Wii, my prefered games like RE4, or even RE0 and 1 works few seconds but at the first loading screen they just freeze on a black screen.
And moreover it would be the best if the adapter could be usable in the homebrew channel + USB loader GX, to not launch game with a Wiimote and THEN turn it off for using the GC controller. And it would even make us able to run RvLoader from a Wii U !
Post automatically merged:

It would actually be nice to do this in fakemote itself. Fakemote could read a configuration file which would carry the information whether the given USB controller needs to be presented as a Wiimote or as a GC controller.

Realistically, though, it would be easier to do this in a new cIOS module, because the way that fakemote injects the wiimote events into the system is not trivial or easily extensible.

Either way, the main functionalities of your module would be these:
1) Read the events from the USB adaptor. This is the easier of the two, there's nothing really hard in this. I recommend using our embedded-game-controller library for this, because it allows you to test the reading without writing a cIOS module; also, once you write a driver for it, it can be used in any other application using the library (including fakemote).
2) Injecting the events into the system. For this you first need to study how games read the GC controller; I suspect that the code is all in libogc, and that the USB controller OH0 is open directly. Your cIOS module could then register itself as a handler for /dev/usb/oh0 and decide which functions it handles directly and which it delegates to the original IOS (like fakemote does). This is assuming that the GC controller is accessed via OH0 -- which I haven't checked.

UPDATE: I checked libogc's code, and my assumption is wrong: the GC controllers are not presented as USB devices, but they are read via the serial interface. That is, the data is exchanged via those hardware registers, so it remains to be seen if it's possible to emulate it (maybe the cIOS module could write emulated data into the input buffers?).
Thanks you for the answer, I will study it, I didn't understand EVERYTHING, but I'll check this out.
 
Last edited by creedof69,

Site & Scene News

Popular threads in this forum