sithlord48 / blackchocobo

Save Editor For Final Fantasy VII
http://www.blackchocobo.com
GNU General Public License v3.0
87 stars 11 forks source link

[Bug Report] VMP Export broken #12

Closed wmxp closed 4 years ago

wmxp commented 4 years ago

You've been a busy guy over the last few days, but you haven't quite licked this one yet sir. Tried an exported VMP from BC on both my PSP and Vita, neither worked. On PSP the game booted, went to load save with "Continue" and it showed the memory card as being empty. On Vita, the game straight up wouldn't start and spat out an error code. The same save file converted with dots-tb's tool works fine on both consoles.

Did a quick hex comparison, and it looks like you're 99% there, as the only difference between the files is highlighted here. Top = BC export, bottom = dots convert: image

Haven't tried the PSV export yet, but I'll give it a go later. Your work is greatly appreciated as always. :)

sithlord48 commented 4 years ago

Should be fixed now just wait for the newer continuous build to finish and try again .

wmxp commented 4 years ago

Alright then. VMP is fixed nicely - output files are identical to what mcr2vmp spits out, and thus work everywhere without issue. :)

PSV on the other hand is very broken and neither the base file BC produces, nor that same file run through ps3-psvresigner work. When trying to import the PSV through the PS3's memory card utility, it spits back a "Data is corrupted" message.

PSV works by: Open .VMP in BC -> Save as .MCR Open .MCR in MemcardRex -> Save single slot as .MCS (MemcardRex Source) Import .MCS in PSV Exporter -> Save as .PSV

sithlord48 commented 4 years ago

Oops when i enabled psp signing i set the ps3 key to the psp one.. try again after the bots rebuild the commit and do try both again . thanks

wmxp commented 4 years ago

Whew...freaking hours of testing today trying to figure out what makes everything tick. Okay, here we go:

A) VMP is fine, still outputting files 100% byte for byte identical as vita-mcr2vmp

B) PSV...oh man. Lots of discoveries here after a lot of trial an error.

1) File names for PSV's are critical. If the file name is even one character off, when trying to import the PSV into the PS3 you are greeted with:

Corrupt

So what are the file names? Well, for the FF7 NTSC-US release, all the files names are "BASCUS-941634646372D533X3X.PSV", where the "X" values change depending on the FF7 save slot number - and SPECIFICALLY the GAME'S save slot number, NOT the slot number of the virtual .VM1 memory card file it's being exported out of. Used the PS3 to export slots 1 through 15 in order, and it spat out this:

PS3PSV_Exports

The first part of the file name makes sense, it's the SonyID for the game, BASCUS-94163. The second part, "4646372D533", I have no idea. I originally thought it was a console unique value, but every FF7 PSV I can find on the net follows this exact naming, so it's clearly some extended product ID.

I tried renaming a slot 1 US save as a EU one - BESCES-008674646372D533031.PSV - no dice, same corrupt error screen. Again, if the file name is wrong in any way, including mismatched slot values, you are greeted with the corrupt error screen.

2) Checking PSV file creation itself, I wanted to see how close each tool was at creating PSV's like the PS3 did. To make the test as fair as possible, I wanted a different entry point into the PS3 rather than exporting the very same file again that I just imported via PSV, so I did the following:

-"ff7data" from PS4 -> Open in BC -> Save as ff7data.mcr (Note that exported save data from PS4 save containers, while identical to the PC file structure, is extensionless - having no .ff7 suffix)

-Open ff7data.mcr in MemCardRex -> Export slot 3 save -> BASCUS-94163FF7-S03.mcs

-Import BASCUS-94163FF7-S03.mcs in PSV Exporter -> Save as BASCUS-941634646372D533033.PSV -> Rename to BASCUS-941634646372D533033.PSV.Exporter

-On PS3 -> Memcard Utility -> make new blank test.VM1 file

-FTP /dev_hdd0/savedata/vmc/test.VM1 over to computer

-Open test.VM1 in MemcardRex -> Import BASCUS-94163FF7-S03.mcs -> save, FTP file back.

-Quickly launch then exit FF7 on PS3 to refresh test.VM1 file -> Export save BASCUS-941634646372D533033.PSV -> Rename to BASCUS-941634646372D533033.PSV.PS3

Comparison:

Export_vs_PS3

Looks good, just the header and sig changed. Next up, BC export.

Open ff7data.mcr in BC -> Select slot 3 -> Save as BASCUS-941634646372D533033.PSV.BC

BC_vs_PS3

A little bit more changed, but does it work on the PS3? Provided it's renamed to follow the correct file name structure, yes - but with some minor interface hiccups.

First, the PSV from PSV Exporter:

PS3-1

Imports just fine into the PS3. Immediately followed by the output file from BC:

PS3-2

Wait, slot 4? The initial .mcr file I used didn't even have anything past the first three slots...okay...does it import?

PS3-3

Yes...no...wait, what? So it is slot 3, but showing as slot 4 in the XMB. Everything is fine in game, and it shows correctly as slot 3 once FF7 starts.

Tried another test with BC again, using the same .mcr base. Exported 1, 2, then 3 in order using the Alt+Right hotkey to change slots, and this time the slot names showed correctly on the PS3, but all three PSV's had Cloud as the icon.

So yeah, a few bugs but this is of course the first time BC has been made to work with a single save format instead of the whole memory card. Perhaps it would be easier to tackle .MCS single saves first to get the kinks out, before .PSV?

sithlord48 commented 4 years ago

The save name problem is a problem with all formats. Its noted here https://github.com/sithlord48/ff7tk/issues/51

I have a local patch for this im just trying to smooth out the UX portion so its name suggestions are not annoying. You can not just rename the psv files since the name has to match the internal region data located at offset 0x64. the filename encodes the Games text portion in Shift-JIS so "FF7-S01" becomes "4646372D533031".

Black Chocobo has supported raw psx saves since forever. I've just never added support for all the "single save" formats . This can be done (report an issue to ff7tk) and list the types and where i can find some samples. I would expect them to be a raw PSX file with a block count and the region data stuffed inside. so should be simple to support.

I have further Improvements planned to smooth out full PSV support but signing was more important to do first as without it the rest is pointless.( they include)

wmxp commented 4 years ago

If you need samples, there's always a plethora of multiple save types and regions on gamefaqs - https://gamefaqs.gamespot.com/ps/197341-final-fantasy-vii/saves It's easy enough to dump single block saves with MemCardRex or PSXGameEdit...but there's far better use of your time than messing with features that save the end user a few seconds. I feel like I'm making a rod for your back, and that was never the intention. In any case, if I can help you in any way just let me know.

Alas, I must confess I am really late to the FF7 party. I was 14 years old when the game came out, and watched a good portion of it second hand from friends. I didn't get my own PS1 until maybe early 1999, and snagged a dex drive later that year...but in all this time, I never played the game for myself. FF6 snes, FFTactics, and FF9 have always been my fav three in the series in that order. Now, here I am 23 years later, mere months from the Remake drop, and I'm finally getting around to it for the first time. X_X

sithlord48 commented 4 years ago

Newest version should be good with psv files i have added a bunch of extras to make it smoother. all the stuff above and a few more things. Let me know how it works for you. If its well you can close the bug here.

wmxp commented 4 years ago

Alright, looks like you have fixed up PSV support nicely now. Two small notes about your new suggested file names feature: -When changing formats, it fills in the file name box with the user configured path from Options->More Options - leading to a "the file name is not valid" error box if just hitting save, requiring the user to backspace out the path portion -RAW PS1 save format is using .gme filenames as a suggestion

sithlord48 commented 4 years ago

When changing formats, it fills in the file name box with the user configured path from Options->More Options - leading to a "the file name is not valid" error box if just hitting save, requiring the user to backspace out the path portion

You should get a suggestion for each type. I did change it up a bit so try the current build again

-RAW PS1 save format is using .gme filenames as a suggestion

the Suggestion for the raw psx name is the same as the region string.

wmxp commented 4 years ago

2

3

Hopefully this better illustrates what I'm talking about. Note the part where I highlight the .gme extension that shouldn't exist for the RAW format. This was captured with build 8dcca63, which also appears to be going through some new growing pains, though I'm sure you would prefer a new ticket.

sithlord48 commented 4 years ago

Hmmm that is not what i see when i open any of the save / open boxes on my system.. Ill have to look at this on windows and maybe update the Qt Version there. Thanks for pointing that out.. As for the new ticket wait Im in the middle of updating it anyway.

sithlord48 commented 4 years ago

You should try the new continuous based on https://github.com/sithlord48/blackchocobo/commit/4e6a890ba35ad4368ecf42e62e1027e8ac14c755 and let me know any issues you find. This will be the base for the next release.

wmxp commented 4 years ago

eab6d35 still doing the same thing

sithlord48 commented 4 years ago

I just landed a patch that by default uses the non native dialog that should resolve your issue. As usual use the continuous build.