Dlanor is better at explaining some of this stuff but if you have any questions just ask.
If you don't like this format, let me know and I'll gladly change it.
ps2sdksrc\ee\rpc\memorycard\include\libmc.h
Code: Select all
60a61,64
> // Additional valid bits for MC attributes, deduced by 'dlanor'
> #define MC_ATTR_FILE 0x0010 //Set for any file on MC
> #define MC_ATTR_OBJECT 0x0030 //Mask to find either folder or file
>
147a152,156
> #define MC_TYPE_RESET 0xDEAD
> //RA NB: mcInit(MC_TYPE_RESET) after IOP Reset, to forget old modules
> //RA NB: This will not reinitialize anything for use of MC. To do that
> //RA NB: you will need to mcInit(MC_TYPEMC) or mcInit(MC_TYPEXMC),
> //RA NB: after having loaded modules to the IOP again.
281,282c290,291
< // data to be changed
< // flags to show which data is valid
---
> // data to be changed //RA NB: This is an mcTable struct
> // flags to show which data is valid //0xFFFF works with valid mcTable structs
285c294
< int mcSetFileInfo(int port, int slot, const char* name, const char* info, unsigned flags);
---
> int mcSetFileInfo(int port, int slot, const char* name, const mcTable* info, unsigned flags);
Code: Select all
228a229,234
> if (type == MC_TYPE_RESET)
> { mclibInited = 0;
> cdata.server = NULL;
> return 0;
> }
>
673c679
< int mcSetFileInfo(int port, int slot, const char* name, const char* info, unsigned flags)
---
> int mcSetFileInfo(int port, int slot, const char* name, const mcTable* info, unsigned flags)
Code: Select all
129a130,135
> /* Since padEnd() further below doesn't work right, a pseudo function is needed
> * to allow recovery after IOP reset. This function has nothing to do with the
> * functions of the IOP modules. It merely resets variables for the EE routines.
> */
> int padReset();
>
Code: Select all
257a258,270
> /* Since padEnd() further below doesn't work right, a pseudo function is needed
> * to allow recovery after IOP reset. This function has nothing to do with the
> * functions of the IOP modules. It merely resets variables for the EE routines.
> */
> int
> padReset()
> {
> padInitialised = 0;
> padsif[0].server = NULL;
> padsif[1].server = NULL;
> return 0;
> }
>
568c581
< else if (pdata->nrOfModes < index) {
---
> else if (index < pdata->nrOfModes) {
Code: Select all
129a130,135
> /* Since padEnd() further below doesn't work right, a pseudo function is needed
> * to allow recovery after IOP reset. This function has nothing to do with the
> * functions of the IOP modules. It merely resets variables for the EE routines.
> */
> int padReset();
>
Code: Select all
256a257,270
> /* Since padEnd() further below doesn't work right, a pseudo function is needed
> * to allow recovery after IOP reset. This function has nothing to do with the
> * functions of the IOP modules. It merely resets variables for the EE routines.
> */
> int
> padReset()
> {
> padInitialised = 0;
> padsif[0].server = NULL;
> padsif[1].server = NULL;
> return 0;
> }
>
>
566c580
< else if (pdata->nrOfModes < index) {
---
> else if (index < pdata->nrOfModes) {
Change that fixes an issue when compiling with the older 2.8.1 IOP compiler.
The change from 1024 to 512 was do to an inaccuracy in partition sizes. Size is in bytes.
Code: Select all
362a363
> u64 size;
367,368c368,369
< u64 size = clink->header->length;
< size *= 1024;
---
> size = clink->header->length;
> size *= 512;
The first change forces the hour timestamp to Tokyo time to matchup with the mc driver.
Note: this change now resides in the usbhdfsd driver.
The second change with the IlinkID allows for those using hard drives in their slim model PS2's.
Code: Select all
46c46
< timeBuf.hour = (timeBuf.hour + 4) % 24; // TEMP FIX (need to deal with timezones?)
---
> //timeBuf.hour = (timeBuf.hour + 4) % 24; // TEMP FIX (need to deal with timezones?)
69,73c69,70
< if(CdReadIlinkID(idbuf, &err))
< if(err==0)
< return 0;
< dprintf1("ps2hdd: Error: cannot get ilink id\n");
< return -EIO;
---
> CdReadIlinkID(idbuf, &err);
> return 0;
Changes hour timestamp to Tokyo time to matchup with the mc driver
Note: this change now resides in the usbhdfsd driver.
Code: Select all
47c47
< timeBuf.hour = (timeBuf.hour + 4) % 24; // TEMP FIX (need to deal with timezones?)
---
> //timeBuf.hour = (timeBuf.hour + 4) % 24; // TEMP FIX (need to deal with timezones?)