PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
Other
10.61k stars 1.54k forks source link

[Feature Request]: MemCard Pro2 memory card support #11317

Open Metroid24 opened 1 month ago

Metroid24 commented 1 month ago

Description

If possible, It would be great if pcsx2 supported the memory card format used by MemCard Pro2: .mc2

Reason

It would make it easy to switch between playing PS2 on the system using the MemCard Pro 2, and then taking that save on the go using steam deck or playing with it on pcsx2 on pc/laptop.

Examples

image https://8bitmods.com/memcard-pro2-for-ps2-and-ps1-smoke-black/

Attached memory card with save for Shining Force EXA MemCardPro2_MemoryCard.zip

stenzek commented 1 month ago

Is this format documented anywhere?

Metroid24 commented 1 month ago

I'm not sure, i know i was able to take that memory card i attached, and per someone on reddit, run an app called ecc_checker, then change the extension to .ps2, and it loaded in to pcsx2 on emudeck on my steam deck. But copying the file back to the MemCard Pro 2, it wouldn't load. So i would guess it's fairly close to the ps2 format.

Related reddit post: https://www.reddit.com/r/ps2homebrew/comments/1aug0h3/memcard_pro_2_computerside_tools/

RedPanda4552 commented 1 month ago

I opened it in HxD and it looks like the same thing as an OPL VMC, where it is a standard memory card image but with the ECC segments stripped out. Try changing the file extension to .bin instead - PCSX2 already has functions to convert OPL VMCs without ECC to standard PCSX2 cards with ECC. If you try running a .bin card it should automatically convert for you.

Metroid24 commented 1 month ago

I opened it in HxD and it looks like the same thing as an OPL VMC, where it is a standard memory card image but with the ECC segments stripped out. Try changing the file extension to .bin instead - PCSX2 already has functions to convert OPL VMCs without ECC to standard PCSX2 cards with ECC. If you try running a .bin card it should automatically convert for you.

When I do that the game gets stuck in a "checking memory card"/"loading" loop where it just keeps switching between those two. It's weird. It shows as Formatted: Yes, but of unknown size.

stenzek commented 1 month ago

We cannot implement something that's not documented. Unless someone wants to reverse-engineer it.

If it is simply an ECC-less memory card image, then the conversion would be one-way with the current code.

Metroid24 commented 1 month ago

Sorry, that's a good point about documentation, i definitely don't want to waste anyones time. I reached out to the creator to see if they'd be willing to share any info they have.

They directed me towards their discord where people were talking about an app (mymcplusplus) that supports exporting/importing game saves for both .ps2 and .mc2. Here's a pull request for the pyton code showing how someone added support for .mc2: https://github.com/Adubbz/mymcplusplus/commit/680d61db2ba2f0b96a58d893fd13267650efaba6

It doesn't seem to be much different than the .ps2 format, but as mentioned it might just be ECC-less. I don't know enough about this to understand why it's 1 way only, but that would be disappointing.

Metroid24 commented 3 weeks ago

The creator of the MemCard Pro2, super nice dude by the way, responded saying this: "There is nothing special to the MemCard PRO2 format. It is a plain binary file with no ECC attached to it."

I'm not sure about the formatting of the .ps2 memory cards or any other format, but hope this helps.

RedDevilus commented 3 weeks ago

The creator of the MemCard Pro2, super nice dude by the way, responded saying this: "There is nothing special to the MemCard PRO2 format. It is a plain binary file with no ECC attached to it."

I'm not sure about the formatting of the .ps2 memory cards or any other format, but hope this helps.

Old PCSX2 memcards were just virtual .ps2 extension cards without ECC until: https://github.com/PCSX2/pcsx2/pull/2995

So if it's indeed like that then I don't see why it wouldn't work, probably need to add .mc2 extension to Qt and probably work fine then. I did pre-order it so I can test in future if need to be. Easy test would be exporting the save and rename extension to .ps2 if it even loads at all, quickest way to find out.

shawly commented 2 weeks ago

It would be especially cool if PCSX2 could use the MemCard PRO2's file structure with game ID's, e.g.:

____memCardPRO2
| |____PS2/
| | |____MemoryCard1/
| | | |____MemoryCard1-1.mc2
| | |____SLUS-20743/
| | | |____SLUS-20743-1.mc2
| | |____SLUS-21050/
| | | |____SLUS-21050-1.mc2
| | |____SLUS-20946/
| | | |____SLUS-20946-1.mc2
| | |____SCUS-97399/
| | | |____SCUS-97399-1.mc2
| | | |____SCUS-97399-2.mc2
...

MemoryCard1 is just a generic VMC that contains homebrew and homebrew save data e.g. usually contains an FMCB installation to boot the PS2 from. And the rest are game IDs containing 1-8 VMCs for that game specifically.

That way one could just use their MCP2's SD card, plug it into a pc and point PCSX2 to that SD, this way we would never have to copy and paste saves around if we wanted to play on an emulator or on an original system.

stenzek commented 2 weeks ago

I would make the argument that they should support our memcard folder-based structure (files, not images). It's more space-efficient, and PCSX2 definitely has the majority ;)

If you want to use this sort of structure in PCSX2, you can, it would just require manually setting up the paths in the gamesettings ini for each game.

shawly commented 2 weeks ago

I would make the argument that they should support our memcard folder-based structure (files, not images). It's more space-efficient, and PCSX2 definitely has the majority ;)

I fully agree, but since all the Memcard Pros seem to use this raw image system with eight channels per memcard which are just new vmcs that are used under the same name/gameid, I think it is more of a hardware limitation than a software one. I might be mistaken though.