libMc

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

libMc

Post by rinco »

I have been toying with the 3 unknown variables in the mcIcon struct
(ps2sdk/ee/rpc/memorycard/include/libmc.h):

Code: Select all

typedef struct
{
    unsigned char  head[4];     // header = "PS2D"
    unsigned short unknown1;    // unknown
    unsigned short nlOffset;    // new line pos within title name
    unsigned unknown2;          // unknown
    unsigned trans;             // transparency
    iconIVECTOR bgCol[4];       // background color for each of the four points
    iconFVECTOR lightDir[3];    // directions of three light sources
    iconFVECTOR lightCol[3];    // colors of each of these sources
    iconFVECTOR lightAmbient;   // ambient light
    unsigned short title[34];   // application title - NOTE: stored in sjis, NOT normal ascii
    unsigned char view[64];     // list icon filename
    unsigned char copy[64];     // copy icon filename
    unsigned char del[64];      // delete icon filename
    unsigned char unknown3[512];// unknown
} mcIcon;
Changing unknown1 in an icon.sys file makes the Ps2 file browser
indicate a different "File Type". I have compiled a list:

Code: Select all

#define MC_FILETYPE_SAVED_DATA          0 // Saved Data
#define MC_FILETYPE_SOFTWARE_PS2        1 // Software (Playstation 2)
#define MC_FILETYPE_SOFTWARE_POCKET     3 // Software (Pocketstation:)
#define MC_FILETYPE_SETTINGS_FILE_PS2   4 // Settings File (Playstation 2)
All other values I have tried result in "Unrecognizable Data".

Changing unknown2 and unknown3 appears to make no visible changes
in the file browser.

Does anyone know anything more about these unknowns?

Or unknown3 and unknown4 in the mcTable structure? Can I update
a memory card with a new mcTable? Or set MC_ATTR_EXECUTABLE
on a particular file?

And I'm also interested in the MC_RPCCMD_UNKNOWN_1,
MC_FUNC_UNKNOWN_1 (and 2).

Oh and I can find little information on Magic Gate and how it relates to
the Memory Card... is this freely available information or a trade secret?
Last edited by rinco on Mon Apr 25, 2005 6:42 pm, edited 1 time in total.
Guest

Re: libMc

Post by Guest »

rinco wrote:Oh and I can find little information on Magic Gate and how it relates to
the Memory Card... is this freely available information or a trade secret?
Well, there seems to be differences of opinion on this. I know in that every time the subject came up in the IRC channel, a lot of the long-timers considered it a skittish topic and strongly discouraged any open discussion. This is something I have seen several times.

It has not been discussed hardly at all in the forums, I have assumed for the same reason. In my mind, I saw a certain consensus with respect to the MG topic.

For this reason, this is why I have been wondering, for consistancy sake, whether we should allow similar discussion related to PSP crypto.

However, other key members of these forums to not appear to have witnessed this so-called consensus the way I have. This started a discussion in the PSP forums, but naturally, out of consistancy, whatever we decide should be applied equally I think.

My personal feeling, is to leave magic gate alone. Why ?

Sony doesn't MG everything. In fact, Sony appears to use various levels of obfuscation depending on the importance of the material.

MG seems to be reserved for the highest level, the stuff Sony really really doesn't want people to know about.

My feeling is - if it serves no useful purpose for dev, other than to simply know it, it may not be worth the trouble of possibly stirring up a hornets nest.

And if you really want to dig into it, openly doing so may not be a good plan of action. If you want a perfect example of how things can go bad and screw alot of nearby people, just recall (or ask about) the HDL fiasco of last summer. Carelessly approaching magic gate, IMHO, carries the same risk.

So from my standpoint, I would ask to you, is there really something to be gained from it ? But thats just me. Others might ask, what did you have for lunch ? Did you un-MG it first ?
Last edited by Guest on Mon Apr 25, 2005 6:02 pm, edited 1 time in total.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

The only "big gain" that could be found in fiddleing with magic gate are:

-) booting from memory card straight -- we don't need that to boot homebrew
-) creating third party memory card -- we are no hardware makers
-) using the a non-official HDD straight I think, or something -- we don't really need that either
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

So libMc is unfinished because there is no need for it to be finished?
Guest

Post by Guest »

rinco wrote:So libMc is unfinished because there is no need for it to be finished?
That may be the case, and it may have been intentional even. I believe some things are intentionally left out by people who know more than they reveal, not so much to keep secrets, but because some information can ruin alot of things for alot of people. I am glad there are people who think about those kinds of things in PS2DEV.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Well, the part about MagicGate, most probably. But I am sure there are some other parts in libmg which may need to be updated/upgraded. Do anything you want with it; fill in the blanks you may find; just don't add anything helpful about magic-gate. I mean, you could for example add detection of a magic gate file. Note that we actually have magic gate reading stub into the loadfile. But the no-no for example would be to have code that encrypts an elf file so that it is bootable from memory card.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

pixel wrote: -) creating third party memory card -- we are no hardware makers
-) using the a non-official HDD straight I think, or something -- we don't really need that either
Neither of these could be done by tearing apart magicgated files anymore than they can be done without. Legally you'd still have to license the magicgate technology from sony to use it in a third party product, which you can already do.

So, your point is even stronger than you intended it to be ;)
Shoot Pixels Not People!
Makeshift Development
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

I can see this topic went head-first into boring and useless.

I apologise for even mentioning "Magic Gate"... as it appears to be
synonymous with illegal activities. Perhaps this should be noted in
the forum rules?
Post Reply