Skip to content

[MCMAN/MCSERV]: mcGetInfo always returns -2 when accessing an unknown format card #785

@israpps

Description

@israpps

I have found this issue while making a program to format PS2 memory cards as soulcalibur2 conquest cards

based on the reading i'm doing here of the comments, mcSync should return -2 when detecting a new unformatted memory card. then 0 when calling the function on a card it was called before.

To rephrase:

What happens:

  • plug unknown format card
  • call mcGetInfo
  • mcSync returns -2
  • call mcGetInfo
  • mcSync returns -2

What I expected to happen based on the comments

  • plug unknown format card
  • call mcGetInfo
  • mcSync returns -2
  • call mcGetInfo
  • mcSync returns 0

/** get memcard state
* mcSync result: 0 = same card as last getInfo call
* -1 = formatted card inserted since last getInfo call
* -2 = unformatted card inserted since last getInfo call
* < -2 = memcard access error (could be due to accessing psx memcard)
*
* @param port port number
* @param slot slot number
* @param type pointer to get memcard type
* @param free pointer to get number of free clusters
* @param format pointer to get whether or not the card is formatted (Note: Originally, sceMcGetInfo didn't have a 5th argument for returning the format status. As this is emulated based on the return value of sceMcSync() when rom0:MCSERV is used, please keep track of the return value from sceMcSync instead!)
* @return 0 = successful; < 0 = error
*/
extern int mcGetInfo(int port, int slot, int* type, int* free, int* format);

I will check the behaviour of rom0:MCMAN and report back if it's either an issue on the comment or a bug on MCSERV/MCMAN

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions