ShendoXT / memcardrex

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

Long product codes are truncated #35

Open JukePlz opened 2 years ago

JukePlz commented 2 years ago

Using the BIOS built-in SoundScope function to record a macro, and then saving the macro to memory card produces a save file with the product code "BPLAYSTATION" but MemcardRex only shows "LAYSTATION" and the header editor doesn't support editing text longer than 10 characters. Proper behaviour should support displaying and editing text to at least 12 characters instead.

Region also shows up as "0x5042" could probably add an human readable name for the region, either as "World", "None" or "BIOS", but more research should be done to determine if that specific region code is used on all BIOS versions or if any other game or software uses that region code.

Attached is an example MMC with a SoundScope save, produced in SCPH-101 BIOS.

soundscope.zip

ShendoXT commented 1 year ago

Well, here is the deal. The region+product code+identifier is actually a raw save file name on the file system, a 20 character string. Sony forced developers to use the naming scheme in this format but they themselves as you can see were not following this standard. So 0x5042 is not a region per se, it's actually "BP" in hex.

Regions are "BA" - America, "BE" - Europe "BI" - Asia. For example Tomb Raider save is "BASLUS-00152TOMBRAID" file in the filesystem. So, "BA" - America, "SLUS-00152" - Product code, "TOMBRAID" - Identifier.

For this nonstandard saves something else needs to be implemented because by this logic that save is "BP" - Region, "LAYSTATION" - Product code, "" - Identifier.

I could just lie and when I detect that kind of a save with the invalid region say that the complete file name is "Product Code".

ShendoXT commented 9 months ago
Screenshot 2023-11-29 at 09 41 19

What do you think about this solution? Editor is lying about product code but header editor is revealing the truth.

JukePlz commented 9 months ago

I think it's an acceptable compromise if it's a a hardcoded exception for the SoundScope tool.

Will these 2.0 changes eventually make their way into the Windows builds too?

ShendoXT commented 9 months ago

Yes, all the changes will be ported back to Windows version too.