Terranigma uses two checksum to verify its save file, an ADD of all the bytes and a XOR of all the bytes.
Due this its vulnerable to moving values around in the save file as long as the byte is at the same align.
In the following POC three values are being moved around to achieve item duplication.
- Equipped Item (0x4C)
- Fluffy Position (0x00)
- First Slot ID Item (0x10)
- Equipped Item (0x00)
- Fluffy Position (0x10)
- First Slot ID Item (0x4C)
Note: Terranigma automatically sorts the inventory but only when reentering the inventory screen.
- Get item you want to duplication and nine small heals, since they will always be left most in the inventory
- Save to second slot
- Equip item you want to dupe
- Put Fluffy on the top left door in the inventory
- Save to first slot
- Reset game
- Load second save file
- Unequip the item
- Delete all the small heals
- Reenter the item inventory screen
- Place Fluffy on the 2nd row and the 4th slot
- Save to first slot but as soon as the first slot item ID is written reset the system
Example: (Note: This shows a way using money)