ShendoXT / memcardrex

Advanced PlayStation 1 Memory Card editor
GNU General Public License v3.0
432 stars 53 forks source link

[Feature Request] Adding support for 2x MC file used by BizHawk.. #5

Closed MelchiorGaspar closed 3 years ago

MelchiorGaspar commented 7 years ago

The multi console emulator BizHawk... for PS1 emu it generates a single memory card file that has cards for both slot 1 and 2 combined as one file...

Any chance of adding support for reading file combined mc file format..?? Rex can at this point read card 1 of that 2 card file...

SaveRAM.zip

TheBlueTroll commented 7 years ago

Right, good news is its literally 2 memory cards written one after the other. so really you can read the second memcard just by splitting the file in 2. as i have done here: FirstHalfandSecondHalf.zip

As for longer term solution, that's gonna be real "fun". But seriously, just split the file in half, use memcardrex to edit each half and then just binary merge them back into a single file. I used HexEdit4 to do it, but that would probably be overkill. just split it at byte 131,072.

MelchiorGaspar commented 7 years ago

too much work.. to d oit over and over again. for syncing fsaves between ePSXe and BizHawk... adding a bit of extra read ability is a better thing.. if they will do it that is... idk.. only time will tell...

ShendoXT commented 7 years ago

A while back I've started working on a new card class which will support virtually unlimited number of saves in a single container format (old formats will still be supported) When it's done it could be adapted to support what you are asking so if there are more than 15 saves it will spill to the second half of the file.

It's no where near finished but if you want check out testing branch or this thread on psxdev forums.

MelchiorGaspar commented 7 years ago

OK thx.. his SaveRAM/MemoryCard file is exactly two 128KB MemoryCards on end.. if its anymore then that feel free to ask him...

For UNLIMITED sizes it should still be done in whole card sizes at a time

ShendoXT commented 3 years ago

Since I started working on MemcardRex again I wanted to tackle this issue. Initially I wanted to make a new class and by extension a new format which would hold unlimited number of saves so this format would be compatible with it.

But FreePSXBoot arrived and it requires a complete and raw memory card format, so in order for MemcardRex to be compatible with it I can't use format with individual saves, I must have raw cards.

So the only way to support BizHawk's SaveRAM format is to open two separate cards at once. That's all good but what should happen when users wants to save those cards again? Should they be linked somehow and merged to one file again? What happens when user saves one card to other format, is the other one unlinked now and left floating? What if user wants to convert .mcr card to SaveRAM? Should it just slap empty card at the end? Add another opened card to it? Ask what opened cards to merge to that one file?

MelchiorGaspar commented 3 years ago

I didn't really like BizHawk's PS1 support much so I got rid of it.. sorry I forgot about this ticket...

I am using DuckStation now... which is raw memory card files I think.. just like ePSXe I was able to move my memory card files over to DuckStation without problem... I or you can close this matter now if you want.. ;-) :-D

ShendoXT commented 3 years ago

Oh ok. I'll close the issue. If it ever comes up again I'll see what can be done (hope it doesn't as it really complicates things :P).

MelchiorGaspar commented 3 years ago

lol ok