Welcome! Log In Create A New Profile

Advanced

IOS Numbering

Posted by tona 
IOS Numbering
August 11, 2008 12:19AM
Right now libogc limits IOS_ReloadIOS() to values above 4 and less than 255. Is this an arbitrary limit or does IOS not accept values > 255 for system titles for some reason?

TMDs store a full title ID for the IOS version they request--it seems like we should be able to load IOS from just about any Title ID we want.

Looking at ios.c, it looks like __IOS_LaunchNewIOS() (which does the version check) simply gets a ticket for the title, and then does ES_LaunchTitle like one would for launching any other title. Unless ES_LaunchTitle (or ES_GetTicketViews) fails for 1-x titles where x > 255, it seems like we should be able to load whatever we want.

Also, if there is such a limit, I propose an alternative solution for using custom IOS:
1. Patch a version of IOS such that there is no TitleID limit on ES_LaunchTitle
2. Install said IOS as IOS255
3. When a custom IOS is needed, load IOS255, then load your patched IOS from elsewhere (should make some sort of standard, or start using ASCII titles).

While not entirely necessary, this would help us avoid version conflicts with official and unofficial IOS. ASCII-based IOS titles would be really nice for identification and organization. Heck, we could create our own title directory.

/title/HAXX/LDVD/
/title/HAXX/cIOS/
etc. etc.

While it's not really a big impending terror we need to find a solution for, this would be a nice change we could make to try to keep our stuff separate from Nintendo's official items.

Edit: I guess this doesn't completely count as "Reverse Engineering," but it has to do with how the IOS system works, and may have to do with some IOS hacking... so....



Edited 1 time(s). Last edit at 08/11/2008 12:22AM by tona.
Re: IOS Numbering
August 12, 2008 07:41PM
Indeed, LaunchTitle has special treatment for system titles. I think the logic goes like this (it's been a while since I looked at it):

- If the first half is >1, then it's a channel
- If the titleID is 1-2, then it's the system menu ( a channel ) (also gets special privs)
- If the titleID is 1-3 to 1-ff (255), then it's an IOS
- If the titleID is 1-100 or 1-101 then it's BC or MIOS and it mostly gets loaded as an IOS.

The main difference is between IOS-like and channel-like title IDs. IOSes get loaded as is, while channels have their IOS version checked. If the same, it just loads the channel. If different, it sets a flag file in NAND with the titleID and ticket view and then loads the IOS specified in the channel TMD, which then proceeds to load the channel itself.

Basically, the only way that IOS can tell whether a title is an IOS or a channel is by the title ID, and it turns out that the space of IOS titleIDs is quite small.
Re: IOS Numbering
November 11, 2008 09:22PM
Hmm, tona, interesting idea. For the patched IOS, maybe we could set it to load IOSs from the default range, and a custom range.
Maybe I'll go poke around in IDA a bit, and see how it does this check. If it's not too hard, I might write a PatchMii patch for it.
Sorry, only registered users may post in this forum.

Click here to login