View Single Post
  #52  
Old 17th March 2018, 07:08 PM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,236
Default

Quote:
Originally Posted by buckchow View Post
Has anyone been able to convert between JP and US/PAL saves? I've been trying to do a JP -> US conversion without luck so far.

I've done the following:
- Use zs to change the name so that valid characters are used for the US/PAL versions
This is optional. If you leave the file names stored under the code page that old Japanese versions interpret names through, then the US/PAL versions will still recognize the save blocks as valid. (The file names will just have some gibberish in them.)

Though, if you've read the doc, you know that digits 0 through 9 share the same code points in the US/PAL code page as with the JP one, so you could just keep the file name under stuff like "13371337" or whatever for consistency. I think it has to be the full 8 characters wide, though, because the spaces ' ' used to null-terminate file names shorter than 8 characters has a different code point in JP versions.

Quote:
Originally Posted by buckchow View Post
- Copied 8kb block from the start of the JP save to a US save file (of the same endianess)
This should work. Though I would just rename/copy the JP save file to the file name Project64 looks for when loading the US/PAL versions. Ideally it should be possible to convert the "File 1" (File 2 looks like it should work just as well.) portion of any JP version save file to US/PAL without even having to use a hex editor or copy any blocks.

Quote:
Originally Posted by buckchow View Post
- Duplicated that 8kb at 0x2000 to complete save slot 0 (File 1)
This is also optional. The new file format will use &file[0x2000] as a 8-KiB backup of &file[0x0000] if &file[0x0000] fails to validate. The 8-KiB block starting at &file[0x2000] is completely ignored if we did everything right to get &file[0x0000] working.

Quote:
Originally Posted by buckchow View Post
- Run zs to update the checksum
Should be the only step needed I believe.

Quote:
Originally Posted by buckchow View Post
The end result is always that File 1 appears as unused. File 2 always shows up fine, so I know the .fla endianess is correct in PJ64.

Any help would be appreciated.

Thanks!
Yeah, endianness should never be a factor. Actually, the trick is that the .fla endianness is always wrong in PJ64, but my utility just analyzes what endian the save file is already stored in and just maintains that byte order. The only possible way you should ever have a mix-up between .fla endians is if you're getting the save file off of a real Nintendo 64 cartridge save chip, which is going to have the correct endian that Project64 never uses. (Again, my utility will detect and maintain storage in this byte order, but it will be incompatible with Project64 only in cases like that.)

If it's not working, can I have a sample .fla save file that you are using and see if I can get it to work myself? Maybe there is some detail I accidentally left unchecked in the editor.
Reply With Quote