Hacking d2xl-cIOS - a fork of davebaol's d2x-cIOS

leseratte

Wiimmfi Team
OP
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
In ciosmaps.xml, I noticed that there are some console= tags, with values like Wii, mini and vWii. Tried it in d2x cios installer, they don't seem to be honored. (I see all Wii and vWii cIOS's on my Mini.) Is there a newer d2x cios installer which detects what hardware it is running on and filter down the selection so that you will never install vWii stuff on Wii? Or on Mini? Or is this still on your todo list?
It's been a long time since I last did stuff with the cIOS, but I believe that was one of the things that's not finished yet. I intended to make the cIOS installer check the console type and only offer to install cIOSes for the correct console, but never got around to updating the installer to actually implement that.

You are probably correct that it'd be simpler to just offer three independant packages for each of the consoles.

I've seen the FAKEMOTE module made by xerpi which you can apparently compile with the newest devkitARM - I've been wanting to look into that to see if I can maybe adapt his changes to the cIOS itself to get that to compile with a newer devkitARM, too, but again - too many different open projects at once, so, who knows when I'll have time for all that.

Thanks a lot for your PR and for developing new features for the cIOS.
 

cyberstudio

Member
Newcomer
Joined
Dec 2, 2020
Messages
17
Trophies
0
Age
53
XP
108
Country
Canada
I had 4 ciosgroups: Wii, vWii, Wii Mini PAL and Wii Mini NTSC-U. The same d2x-cios-installer 2.2 Mod will do. Instead of detecting the console type the user will have to select the correct one. But still, no more worrying about tmd 31776 or 31775. I believe your design is the best from the user's standpoint - it is just that no one is available to carry out the vision.

I saw another fork called d2xb on GitHub. Apparently they are fixing the code to compile with the latest devkitARM. I have not tried that, but I did do kind of the same thing in the beginning, and the resulting modules didn't run, and I gave up. You already did all the work to bring back r32 and there was no reason for me not to just leverage that.

Fakemote is not on CI or docker. I simply pulled in their 0.5.0 release binary instead of compiling it. If we really want, that can be compiled with the old r32 toolchain, too. I bet that is easier than to move the entire cIOS to the latest devkitARM.

It sounds too good to be true, so I tested Reload IOS Block again.
  • console: Wii Mini NTSC-U (Canada)
  • loader: USB Loader GX v3.0 r1272 e25c4e7
  • game: Kirby Dream Collection 20th anniversary
  • replication steps:
    1. Launch USB Loader GX channel (forwarder) from Wii System Menu. I have Priiloader but this should be irrelevant.
    2. Reload IOS Block = ON. Return to = "USB Loader GX".
    3. Start Kirby game.
    4. At the "hold remote horizontally" screen, click "Home" button and click "Wii Menu"
  • result
    • d2xl-cios-v1-beta2: black screen, HDD had intermittent activity, seems to be some infinite time out loop.
    • d2xl-cios-v9-6e57e71: returns to USB Loader GX as set!
Link: please choose the first/latest workflow and your help with confirmation is greatly appreciated

My changes were not directly related to Reload IOS Block but fixed it by accident. However, fixing this bug is a big deal, and in my opinion, this alone deserves a release (or a "released" beta).
 
Last edited by cyberstudio,

leseratte

Wiimmfi Team
OP
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
I saw another fork called d2xb on GitHub. Apparently they are fixing the code to compile with the latest devkitARM. I have not tried that, but I did do kind of the same thing in the beginning, and the resulting modules didn't run, and I gave up.
Interesting, I did not know about that fork. I'm going to take a look at that and see if that fork already has any meaningful changes that I should merge into mine.
 
  • Like
Reactions: impeeza

Dantepicachu

New Member
Newbie
Joined
Aug 8, 2023
Messages
1
Trophies
0
Age
30
XP
14
Country
Argentina
I really hope that before making it available for all the Wii, please make it that we can play any game, because games such as "The amazing Spiderman" and "Super smash brawl" do not work at all, just crash at the start. Btw I'm using Wii Lite in a Wii mini
 

TiredKorok

Well-Known Member
Newcomer
Joined
Mar 13, 2017
Messages
77
Trophies
0
Age
25
XP
192
Country
United States
hello :)

Nice to see someone are working on cIOS again !
I know you'll achieve a lot based on your last works on the loaders and network.

Maybe you could find a way to fix the ehci module to properly initialize all usb devices ? new ones and flashdrives?
that would remove the need to boot into IOS58 to init some devices, as some users have issues with 58, and some have issue with d2x. there are currently no proper setup. I forced IOS58 by default on USBGX1272 based on all the user's report, and now there are many reports that IOS58 is not working for a lot of users.

Having a single cIOS for all devices and console type would be a real savior to finally get an easy setup for everyone.

I wish you good luck on achieving all your ideas.



IOS EXPLANATION AND INSTALL TIPS

There is NO definitive answer to your question.
You first need to understand what a IOS is, an IOS Slot, an IOS base and how applications are using them.

I explained hundred times what it was, how it works, but nobody read previous tutorials and explanations, so here it is again (very quick) :

IOS and IOS Slot:

The Wii console uses the "IOS" system to communicate with the hardware, it's like a driver (compared to Windows). It contains information and communication tools (like how to access the Disc drive, how to access USB, read the savegames data stored on internal memory, etc.)

Each game uses and requires a specific version of that "IOS".
As games can't be updated on Wii (this is no PS4, or wiiu!), they are made to work on a specific version of IOS to ensure they ALWAYS use that version to prevent unexpected bugs due to updated functions.
Nintendo decided to install new released IOS in a different folder on the system (called a slot) instead of updating one single IOS for all the library (like the wiiU).

Therefore the Wii contains multiple IOS versions:
IOS9, IOS..., IOS30, IOS...., IOS53, IOS56, IOS57, IOS58, etc.

Any application running on the console (system menu, homebrew, games, etc.) uses ONE SINGLE IOS Slot at a time, and doesn't care what are installed on other slots. This is the "requested IOS", expecting to use a specific version of IOS containing the specific functions version it requires for the application or game to work properly.
Zelda twilight princess requests IOS9 (first IOS used by the oldest game), while Dragon Quest MMORPG requests IOS59 (last released version, which contains external encrypted HDD support).


As you can imagine, nintendo would release each new IOS by installing them in higher slots (folders), so IOS located in slot 57 contains more functions and features than the IOS located in slot 9.
So you can think that higher the better, but it's not necessarily the case. Nintendo didn't always release new version in higher slots, they sometime released IOS and installed it in random or lower slots.
Don't see the slot number as the IOS version, but as just another version containing different drivers and functions that a games can use.

Some IOS contains specific functions (IOS58 contains USB2 support for accessories like WiiSpeak, microphones, etc.), while some games will work only on specific slot number (Spyro NFC portal accessory works only with IOS56) and Animal city folk Keyboard support works only with IOS38!

Generally speaking, 99% of games will work fine with IOS57 which contains almost all required functions and drivers :)
So, your best bet is to use that IOS for general setup and be almost sure all your games will work.
Only a very few exception will require specific IOS version (located in specific numbered slots) like I said above : Spyro (56), Animal crossing (38), sponge bob (53/58), DQ (59).

IOS Slot:

If you noticed, I said all new IOS versions are installed in a different folder to keep previous versions available to old games.
This is what a slot is, just a folder containing an IOS version.

IOS58 is one IOS version located in slot 58.
IOS57 is another IOS version located in slot 57. not older, just a DIFFERENT version.


The Wii has 256 available slots for IOS to be installed into, but Nintendo only ever used IOS slots up to 59.
As a common rule, hackers decided to use empty slots to install their own patched versions of the IOS (custom IOS, or cIOS) in higher slots to prevent conflicting with Nintendo official releases and keep the official IOS "clean", untouched and working properly for disc based playing.
You can freely install cIOS anywhere between slot 200 and slot 255, but please do NOT fill all your slots with random data, 1) your console has limited storage space, and 2) it's useless! only install or replace slots using common sense and your own requirement!
Common usage for USBLoaders are slot249, 250 and 251, but only one is ever required ! don't ever install all 3 slots if you don't know why and only follow random and bad tutorials.
by default, ONLY slot249 will be used by USBLoaders, but can be changed in USBLoader's settings anytime to use a different slot containing specific "drivers" (features and functions) for specific games!


IOS base:


The IOS base is the IOS to use as "base" for the added hacked features and patches, such as signature check patch, redirecting Disc access to USB (for USB Loaders to load games from USB), EmuNAND features, etc.
The resulted patched IOS has to be installed somewhere on the console to be used on request by an application, and NOT overwrite the existing IOS from nintendo, so anything above slot 200.

There are exceptions:
Slot <230 are usually reserved for hermes cIOSes (202, 220-225)
Slot236 is a patched IOS36 installed in slot 236 usable by any very old homebrew who wants it. just forget about it.
Slot254 is Bootmii launcher! NEVER REPLACE OR INSTALL ANYTHING IN THAT SLOT!

Only ever use slot 240-251 for your needs.


To make debugging and helping users more easily, the Wii scene started using a written format to be easier to understand what were installed in each slots.
So if you run a syscheck (tool and tutorial linked in my signature) you'll see something like this :

IOS249[57] d2x v8 final revision 21008
It means that the slot 249 contains a modified IOS, based on the IOS located on slot57. it has been patched with hacked feature using the "d2x v8 final" cIOS version.


Another example:

IOS248[53] d2x v10-alt r53 revision 65535
Resume: A patched IOS53 is located in slot248.
detailed: Slot 248 is not empty! It contains a patched IOS, based on the the official IOS from nintendo located in slot53 (base53). It has been patched with additional hacked features using the cIOS version "d2x v10-alt, revision 53", and installed on the console in slot 248 with file's revision number 65535.

Attention: Do not mix cIOS version (d2x v10), cIOS revision (d2x r53), cIOS base (base53), cIOS slot (248), and file's revision (65535).



IOS revision:

You can see that as the "file's revision".
When Nintendo released an updated version of a specific IOS (to fix a bug for example), it increased its revision (not its slot number!).
For example, there are different revisions of IOS57, which can be newer than IOS58. remember, the slot number doesn't define its version!

If the console detects a new higher revision of a specific file or IOS is available (from nintendo update server, or from inserted game disc's update partition) then the console would prompt you to update your console.
revisions go from v0 to v65535.

cIOS are usually released with a revision number reflecting the "cIOS patcher version", for example "cIOS r21 d2x v8" had revision 21008.
But nintendo started to release new IOS 249 and 250 with higher revision in order to counteract piracy. They released they own IOS249/250 with revision 65280.

Imagine you have a cIOS d2x v8 installed in slot249, with revision 21008.
If you insert a game disc, and it contains IOS249 r65280, the console will tell you there's a new update (for your slot249)! it'll replace your cIOS located in slot 249 which is revision v21008 with the higher version found on the disc (v65280) and your slot will become "stub". it's a dummy IOS with no function, it just does nothing, no function, no drivers, no application will work if it tries to use that IOS slot.

To prevent nintendo from updating (and replacing) a cIOS into a stub IOS (useless, empty, doing nothing IOS), and to prevent the console to prompt you to update when you insert a disc containing that fake 249, you can set the revision of your installed cIOS to something even higher than 65280.
cIOS installer lets you choose whether you want the "real" revision (21008) or a maxed out revision (65535) to prevent any further replacement from automatic update checks.

Another option to prevent updates of the IOS with low revision numbers is Priiloader's hacks "prevent updates from disc/network".


cIOS version:


In order to fix bugs and add new features to cIOS (usb redirection, emuNAND, vWii support, Wii mini support, etc.) the cIOS patch needs to be updated.
This is the "d2x" version as you know it.
When a new cIOS version is released (v8, v10, etc.), it's common usage to also increment the "IOS revision". v21008 (d2x v8) -> v21010 (d2x v10)




The cIOS version is the version of the patches applied to an original (base) IOS.
for example cIOS revision 17, or cIOS d2x v10 r52, or cIOS d2x v10-alt r53, etc.

To get an idea of which version exists and which one you are currently using, here are the last used ones, declined in two different "main branches" from the two initial developers who created them:

1) Hermes cIOS:
• cIOS v4 : has USB Port 0 and Port 1 support. IOS base selection, multiple base in one slot! (37+38)
• cIOS v5
• cIOS v5.1
• cIOS v6 (hermesrodries mod)



2) Waninkoko cIOS
...
• cIOS rev17 : last revision with mandatory WBFS for games, adds emuNAND supports but limited to 1st FAT32 partition of a 512 bytes/sector HDD, NandEmuPath must be on root, Full EmuNAND only. base IOS38 only. clone the installed IOS in both 249 and 250 only.
• cIOS rev18 : adds Partial EmuNAND mode. Adds support for different base IOS and different destination slots!
• cIOS rev19 :
• cIOS rev20 : don't use, it has wiimote freeze issue!
• cIOS rev21 : adds EmuNAND paths, latest release from Waninkoko.

branch from cIOS rev21, maintained/developed by Davebaol
• cIOS rev21 d2x beta : adds partition selection for emuNAND.
• cIOS rev21 d2x v2
• cIOS rev21 d2x v3 : officially supports partition selection
• cIOS rev21 d2x v4 : adds 4096 bytes/sector support
• cIOS rev21 d2x v5 :
• cIOS rev21 d2x v6 :
• cIOS rev21 d2x v7 : Adds support for "block ios reload", and fixes Wiimote+ games (Zelda skyward sword, redsteel2, etc.), but also games with menus (Metroid Prime, Sam&max, etc.)
cIOS rev21 d2x v8 final : Latest stable and best version for Wii. THIS IS THE ONE YOU WANT ON WII !
• cIOS rev21 d2x v9 beta r49 : Fix a HDD init bug. adds support for Port1, plug&play, but breaks some games and other features such as emuNAND, games from SD and some hardware support.
• cIOS rev21 d2x v10 r52 : Fallback to d2x v8 with HDD init bug fix only. this is v8 ! don't be fooled by version number ! it was re-released as v10 only to prevent users installing the real v10 vWii on Wii because of incremented version.... (higher IS NOT better! but people don't understand or never read install instructions)
• cIOS rev21 d2x v10-alt r53: This is d2x v9 beta ! with all its bugs. don't use it please.
cIOS rev21 d2x v10 vWii : This is d2x v8, for vwii. THIS IS THE ONE YOU WANT ON vWII !
• cIOS rev21 d2x v10-alt vWii : This is d2x v9 beta with all its bugs, for vWii. still don't use it please!

Branch from cIOS rev21 d2x v10 (r52/r53), maintained/developed by Leseratte
cIOS rev21 d2xl-IOS beta : You are here ! This is the cIOS for Wii mini. It's an updated branch from latest d2x v10.





What you want to install:



So, here we are :
in the cIOS installer you have to choose what to install, and where.

most common setup will be this one :
IOS 57 patched with d2xl-cIOS, installed in slot 249.



And if you ever want to play spyro, you'll ALSO need an IOS based on the one located in slot 56 :
IOS 56 patched with d2xl-cIOS, installed in slot 250.


:!: Adapt the "cIOS base" based on the game requirement, spyro, animal crossing, wiiware, etc.
:!: Adapt the "IOS Slot" (spot, or destination), based on your current internal content already installed on your console ! keep track of what you install. if you ever forget, run syscheck homebrew again :)


Using a specific IOS slot:

IMPORTANT!
If you properly read what I said several times until now, an application or a game running on the Wii uses ONE and only one IOS slot at a time.
you need to specify which one to use for the game at any given time to work properly.

By default, all usbLoaders are using slot249 and DO NOT CARE WHAT YOU INSTALLED IN OTHER SLOTS! installing 20 cIOS at the same time has no effect and won't magically fix your compatibility issues!
Following random (and bad) youtube tutorial which make you install 3 cIOS in 3 random slots will be of no use if you don't actually USE the correct slot!
All your USBLoader's interface and its features will depends on the currently used and loaded in memory IOS, and if you followed the recommendation you'll have access to functions provided by the IOS57 (which is patched and installed in the default slot249).
That's the same for all your games, the slot249 will be used and will provide needed communication with the hardware (wiimote, usb access, savegame, network, NAND, etc.)

If you want to play a game which requires a specific IOS (for example Spyro), then you'll have to tell Spyro to use the slot where you installed the patched IOS, based on official IOS it expects to use, located on slot 250 (base56).
In your loader, go to Spyro game individual settings, change the IOS Slot to use from 249 to 250 (if you installed cIOS base 56 in 250! if you installed based 56 in 251 then set 251!).


Like you see, you can install any base in any slot, it's UP TO YOU to decide and choose what you need, where you install it and properly setup your USBLoader to use the specific slot for specific games !
If you are unsure, go with slot249 base57, that's all you'll need for 99% of your library. if a game doesn't work, ask or search if someone else used another base !


I hope it was detailed enough, sorry I wanted to make it shorter but I couldn't.
I also thought better explanation would be useful on the first page of this thread for future users asking the same questions :)
I'll probably update it to explain what the "revision" is and its purpose. Done!
I did it again, I wrote a full guide instead of leaving the answer to others or just post 3 lines of config without explanations.
Dear god this finally all makes sense.... thank you again
 
  • Like
Reactions: Cyan

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Lol rappers still promoting crypto