View Single Post
  #63  
Old 30th July 2018, 09:48 AM
buckchow buckchow is offline
Junior Member
 
Join Date: Mar 2018
Posts: 6
Default

Quote:
Originally Posted by HatCat View Post
And yeah, if you're adding this feature in just for yourself then that makes it a little easier to implement. One good thing about open-source.
I finally had time to get automatic inventory and button conversion working between the old (early Japan) and new (other) save versions. The new/additional code is attached (not full source files, sorry).

Adding -S will cause the inventory (0x0070-0x009F) and button assignments (0x004C-0x005B) to be converted to the opposite format.

To convert save slot 0 (file 1) from old -> new:
Code:
zs flash.fla -J true -S -J false
-J true = treat input as old format
-S = swap/convert old format to new format
-J false = set checksum calculation mode for new format

To convert save slot 0 (file 1) from new -> old:
Code:
zs flash.fla -S -J true
-S = swap/convert new format to old format
-J true = set checksum calculation mode for old format

To convert save slots 0 and 1 (file 1 and file 2) from new -> old:
Code:
zs flash.fla -S -J true "-@" 1 -J false -S -J true
-S = swap/convert new format to old format
-J true = set checksum calculation mode for old format
"-@" 1 = calculate checksum for slot 0 (file 1) and select slot 1 (file 2)
-J false = treat input as new format
-S = swap/convert new format to old format
-J true = set checksum calculation mode for old format

The order of the items on the command-line is essential so that the old/new mode is always set correctly.

Currently no attempt is made to change anything else like the name.

Hopefully somebody finds this useful.
Attached Files
File Type: zip zs_data changes.zip (1.2 KB, 2 views)
Reply With Quote