Jump to content

Corrupted Pokemon Emerald File


Recommended Posts

I am helping a friend diagnose a sudden loss of all save data with the more uncommon error message of:

The save file has been erased due to corruption or damage.

as well as

The internal battery has run dry...

1. Naturally, the first step was discerning whether the game was legit: It is authentic

2. Next, I decided to clean the cartridge and check for damage. The game had a crude electrical tape battery install that I remediated properly with a new battery and solder. All pins cleaned; No visible damage. After cleaning/inspection/new battery the battery message disappeared but the save error remained.

3. Next I dumped the save file to my computer (joey Jr) and attempted to load it into PKHeX. Received the error message:

Binary is not compatible with save file.
Current SAV Generation: 3

4. Also inspected the file size...normal file size of 128KB (131,072 bytes)

5. Tried to open the save with other editors (PKMDS and PokeGen): Did not work with other editors

6. I then tried to open it with WC3Tools...it did open, and some decorations are visible in the decoration editor.

7. To determine if there is a proper connection from the ROM to the SRAM on the cart, I then decided to start a new game and save. Creating a new save game worked

8. Upon booting with the fresh save I was greeted with the message
 

The save file is corrupted.
The previous save file will be loaded.

9. This is obviously because both the A and B saves on the cart are bad. Saving a second time removed the error.

 

So: I have an authentic, fully functional Emerald with a new battery, alongside a corrupted save backup on my computer. If the save as a whole isn't salvageable, I would hope to at least extract the pokemon using a hex editor (if that is feasible). 

Also tried to use FlashGBX, but I can't seem to get it to work (with any of my games). Think that would be nice for a brief analysis of the cart, but I have exhausted all of the troubleshooting tips.

 

Thanks for your time.

Link to comment
Share on other sites

40 minutes ago, Kaphotics said:

Open it in a hex editor and compare it to a valid working save file. If it is similar, you might be able to change it manually to get it to be recognized. Can't tell if you don't share the save file.

Will do later. Haven't changed much in hex editors before, am reviewing the Save Data Structure for Emerald.
And duh, here it is.

POKEMONE.SAV

Link to comment
Share on other sites

Same issue as other threads that have been reported and fixed. Using the 0x1000 block layout of gen3 saves, I rearranged the order of blocks since it seems like the save writing was interrupted when overwriting the flash chip, so that each save (primary and main) has a complete set of save blocks, and re-exported from PKHeX.

 

image.png

POKEMONE.SAV

  • Like 1
Link to comment
Share on other sites

On 8/2/2024 at 5:20 PM, Kaphotics said:

Same issue as other threads that have been reported and fixed. Using the 0x1000 block layout of gen3 saves, I rearranged the order of blocks since it seems like the save writing was interrupted when overwriting the flash chip, so that each save (primary and main) has a complete set of save blocks, and re-exported from PKHeX.

 

image.png

POKEMONE.SAV 128 kB · 15 downloads

You're doing God's work, thank you. (Why are there 15 downloads for the save??? XD)

I thought I did my due diligence researching the error. Apparently not. 

Can you elaborate on how you re-ordered the blocks? Just copied and pasted chunks inside a hex editor, or what?

Link to comment
Share on other sites

Thanks, I will take a look.

So, I am getting an error message when attempting to open the 'Misc Edits' window:

Exception Details:
System.ArgumentOutOfRangeException: Value of '2409996727' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'. (Parameter 'value')
Actual value was 2409996727.
   at System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
   at PKHeX.WinForms.SAV_Misc3.<>c__DisplayClass33_0.<LoadRecords>g__LoadRecordID|8(Int32 index)
   at PKHeX.WinForms.SAV_Misc3.LoadRecords()
   at PKHeX.WinForms.SAV_Misc3..ctor(SaveFile sav)
   at PKHeX.WinForms.Controls.SAVEditor.B_OpenMiscEditor_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)

I can continue or abort, but neither opens the window. I don't know which record this is anyhow; is this another fix that needs to be done in a HxD?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...