pj64team / Project64-Legacy

Finishing what we started.
79 stars 7 forks source link

Fix APPS file corruption #74

Closed parasyte closed 1 year ago

parasyte commented 1 year ago

Here are the steps to reproduce the corruption. After applying this patch, these steps should no longer leave the APPS file in a state that the emulator cannot handle.

  1. Setup: Enable "Remember selected cheats" in options.

  2. Pick two games, A and B. I'll use Body Harvest as A, and Donkey Kong 64 as B. IMPORTANT: Make sure these two games have not had any cheats saved before! You may have to manually remove the [XXXXXXXX-XXXXXXXX-C:XX] sections in the APPS file by hand.

  3. Edit cheats for game A: Add a new cheat and enable it. This should add a new entry to the APPS file.

  4. Edit cheats for game B: Enable any cheat. This should add another new entry to the APPS file, directly following the entry for game A.

  5. Edit cheats for game A again: Delete the cheat that you added in step 3. This should remove the saved cheat name from the APPS file but leave an empty section for game A directly preceeding the section for game B. This is the corruption.

  6. Close PJ64 and try to open it. It will not open until the corruption is resolved (manually remove the empty section from the APPS file for game A).