shithub: pokecrystal

Download patch

ref: f954c61668935d7d4a2b41a5528fddedf04d9c6d
parent: 650686476c47d03148dfb93de1388b1a7294e385
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Wed Oct 21 17:54:44 EDT 2020

Remove incomplete fix for the save corruption bug

--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -2019,103 +2019,7 @@
 
 ([Video 1](https://www.youtube.com/watch?v=ukqtK0l6bu0), [Video 2](https://www.youtube.com/watch?v=c2zHd1BPtvc))
 
-**Fix:** Edit `MoveMonWOMail_InsertMon_SaveGame` and `_SaveGameData` in [engine/menus/save.asm](https://github.com/pret/pokecrystal/blob/master/engine/menus/save.asm):
-
-```diff
- MoveMonWOMail_InsertMon_SaveGame:
- 	...
- 	ld a, TRUE
- 	ld [wSaveFileExists], a
- 	farcall StageRTCTimeForSave
- 	farcall BackupMysteryGift
--	call ValidateSave
-+	call InvalidateSave
- 	call SaveOptions
- 	call SavePlayerData
- 	call SavePokemonData
- 	call SaveChecksum
--	call ValidateBackupSave
-+	call ValidateSave
-+	call InvalidateBackupSave
- 	call SaveBackupOptions
- 	call SaveBackupPlayerData
- 	call SaveBackupPokemonData
- 	call SaveBackupChecksum
-+	call ValidateBackupSave
- 	farcall BackupPartyMonMail
- 	farcall BackupMobileEventIndex
- 	farcall SaveRTC
- 	...
-```
-
-```diff
- _SaveGameData:
- 	...
- 	ld a, TRUE
- 	ld [wSaveFileExists], a
- 	farcall StageRTCTimeForSave
- 	farcall BackupMysteryGift
--	call ValidateSave
-+	call InvalidateSave
- 	call SaveOptions
- 	call SavePlayerData
- 	call SavePokemonData
- 	call SaveBox
- 	call SaveChecksum
--	call ValidateBackupSave
-+	call ValidateSave
-+	call InvalidateBackupSave
- 	call SaveBackupOptions
- 	call SaveBackupPlayerData
- 	call SaveBackupPokemonData
- 	call SaveBackupChecksum
-+	call ValidateBackupSave
- 	call UpdateStackTop
- 	farcall BackupPartyMonMail
- 	farcall BackupMobileEventIndex
- 	farcall SaveRTC
- 	...
-```
-
-Then create two new routines, `InvalidateSave` and `InvalidateBackupSave`:
-
-```diff
- ValidateSave:
- 	ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
- 	call OpenSRAM
- 	ld a, SAVE_CHECK_VALUE_1
- 	ld [sCheckValue1], a
- 	ld a, SAVE_CHECK_VALUE_2
- 	ld [sCheckValue2], a
- 	jp CloseSRAM
-
-+InvalidateSave:
-+	ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
-+	call OpenSRAM
-+	xor a
-+	ld [sCheckValue1], a
-+	ld [sCheckValue2], a
-+	jp CloseSRAM
-```
-
-```diff
- ValidateBackupSave:
- 	ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
- 	call OpenSRAM
- 	ld a, SAVE_CHECK_VALUE_1
- 	ld [sBackupCheckValue1], a
- 	ld a, SAVE_CHECK_VALUE_2
- 	ld [sBackupCheckValue2], a
- 	jp CloseSRAM
-
-+InvalidateBackupSave:
-+	ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
-+	call OpenSRAM
-+	xor a
-+	ld [sBackupCheckValue1], a
-+	ld [sBackupCheckValue2], a
-+	jp CloseSRAM
-```
+This does not have a simple and accurate fix. It would involve redesigning parts of the save system for Pokémon boxes.
 
 
 ### `ScriptCall` can overflow `wScriptStack` and crash