How to do RAM dump of DS cartridge? (trying to extract save from repro cart)

TheMismatcher

Active Member
OP
Newcomer
Joined
May 18, 2022
Messages
30
Trophies
0
Age
25
Location
Maryland
XP
48
Country
United States
If you can dump your 3ds's fcram immediately following a hard reset, you can run my script to extract the game's dsiram and possibly find your save.

Instructions: Boot your DS game, load your save, press home, select return to home menu, immediately hold start, this should allow you to chainload godmode9 given it exists in luma/payloads.

When in godmode9, go to MEMORY VIRTUAL, select fcram.bin and dump it to gm9/out.

Then put the 3ds sd card in your PC and run my attached python script. You may have to change the drive letter in the script, I have it preset to F. It should then create dsiram.bin, and you can search that for your save.

Note that I had to rename the file + .txt so it would upload, so take off that .txt extension.
Here is a dropbox link to my .mem file


https://www.dropbox.com/s/532xfo36s1n1rpx/fcram.mem?dl=0
 

TheMismatcher

Active Member
OP
Newcomer
Joined
May 18, 2022
Messages
30
Trophies
0
Age
25
Location
Maryland
XP
48
Country
United States
If you can dump your 3ds's fcram immediately following a hard reset, you can run my script to extract the game's dsiram and possibly find your save.

Instructions: Boot your DS game, load your save, press home, select return to home menu, immediately hold start, this should allow you to chainload godmode9 given it exists in luma/payloads.

When in godmode9, go to MEMORY VIRTUAL, select fcram.bin and dump it to gm9/out.

Then put the 3ds sd card in your PC and run my attached python script. You may have to change the drive letter in the script, I have it preset to F. It should then create dsiram.bin, and you can search that for your save.

Note that I had to rename the file + .txt so it would upload, so take off that .txt extension.
Ran the script and I got dsiram.bin. What in it should I be looking for? And what exactly is dsiram.bin?

here is a drop box link to my dsiram.bin

https://www.dropbox.com/s/lnb5iv5duqnfa9i/dsiram.bin?dl=0
 

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of

TheMismatcher

Active Member
OP
Newcomer
Joined
May 18, 2022
Messages
30
Trophies
0
Age
25
Location
Maryland
XP
48
Country
United States
Well I found it, I just don't know if it's going to be corrupted or not.
About to test the save in an emulator.

It's at dsiram.bin + 0x27C28C, size 0x80000 if you're curious.
Wow! Thank you for your help! Fingers crossed.


If we need to look through the files I have some of the Hex code for specific identifiers I know are in there, like my trainer name in hex is 380133012D012D01FFFF

Edit- searching for that makes it light up with many results- looks like this is it!! Hopefully its still playable/workable
 
Last edited by TheMismatcher,

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
Wow! Thank you for your help! Fingers crossed.


If we need to look through the files I have some of the Hex code for specific identifiers I know are in there, like my trainer name in hex is 380133012D012D01FFFF

Edit- searching for that makes it light up with many results- looks like this is it!! Hopefully its still playable/workable
Emulators aren't accepting it and pxhex doesn't like it either.
Still, it's definitely your savegame. Maybe ask some pokemon experts if some data can be recovered.
 

Attachments

  • save.zip
    171.6 KB · Views: 41

Pk11

A catgirl with a DSi
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
pk11.us
XP
3,895
Country
United States
Emulators aren't accepting it and pxhex doesn't like it either.
Still, it's definitely your savegame. Maybe ask some pokemon experts if some data can be recovered.
pkmn-chest accepts it (and PKSM should too) so assuming this looks right can probably recover the Pokémon with either of those.
 

Attachments

  • 1652852976.jpg
    1652852976.jpg
    335.1 KB · Views: 51

TheMismatcher

Active Member
OP
Newcomer
Joined
May 18, 2022
Messages
30
Trophies
0
Age
25
Location
Maryland
XP
48
Country
United States
Emulators aren't accepting it and pxhex doesn't like it either.
Still, it's definitely your savegame. Maybe ask some pokemon experts if some data can be recovered.
Thank you so much! This is a big step. I'll reach out to some people with pokemon experience, and if anyone here has any suggestions please let me know

Could the problem have been with the rip? If I repeat the process is it possible to receive a less corrupted version, or a differently corrupted version we could use to reconstruct the .sav?
 

Pk11

A catgirl with a DSi
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
pk11.us
XP
3,895
Country
United States
I just saved it in pkmn-chest then tried loading it with Heart Gold (saves are the same) from TWiLight Menu++ and it appears to work! It did warn me about losing battle hall data and a battle video, but the bulk of the save seems to be correct, assuming this info all looks right.

Doing a hex compare it looks like pkmn-chest fixed some checksums or something so if you simply load it in PKSM, save, and inject that to your cart it should work it seems.
 

Attachments

  • 1652853537.jpg
    1652853537.jpg
    318.3 KB · Views: 49
  • Like
Reactions: zoogie

TheMismatcher

Active Member
OP
Newcomer
Joined
May 18, 2022
Messages
30
Trophies
0
Age
25
Location
Maryland
XP
48
Country
United States
Anywhere on the SD, then go to settings -> misc. -> Extra Saves -> HGSS -> and browse for it on the SD card iirc. There's more details on the PKSM wiki.
It's working!!!!
I just saved it in pkmn-chest then tried loading it with Heart Gold (saves are the same) from TWiLight Menu++ and it appears to work! It did warn me about losing battle hall data and a battle video, but the bulk of the save seems to be correct, assuming this info all looks right.

Doing a hex compare it looks like pkmn-chest fixed some checksums or something so if you simply load it in PKSM, save, and inject that to your cart it should work it seems.
This is fantastic!!! I'll do that now! I got it to load in PKSM but I noticed some oddities with a couple nicknames and it crashed. I'll do the method you described now!
 

TheMismatcher

Active Member
OP
Newcomer
Joined
May 18, 2022
Messages
30
Trophies
0
Age
25
Location
Maryland
XP
48
Country
United States
It's working!!!!

This is fantastic!!! I'll do that now! I got it to load in PKSM but I noticed some oddities with a couple nicknames and it crashed. I'll do the method you described now!
I just saved it in pkmn-chest then tried loading it with Heart Gold (saves are the same) from TWiLight Menu++ and it appears to work! It did warn me about losing battle hall data and a battle video, but the bulk of the save seems to be correct, assuming this info all looks right.

Doing a hex compare it looks like pkmn-chest fixed some checksums or something so if you simply load it in PKSM, save, and inject that to your cart it should work it seems.
Well, we seem pretty close! I was able to take the data from PKSM and inject it into my cart. The game booted right away without any issues! I was even to go play voltorb flip, which use to crash the game on my old cart, and honestly was part of what inspired me to do this. I then went to the PC boxes. I had two bad eggs in my box, and scrolling a few boxes back there was a questionmark. Soon after getting to that box, the game froze.

Opening it in PKSM caused a crash as well when scrolling. Any suggestions? I did clone one pokemon when I first opened it to give it something to save, could that cause an adverse effect? I believe the pokemon that showed as a question mark on the ds showed as two bad egss next to each other as one sprite on PKSM
 

TheMismatcher

Active Member
OP
Newcomer
Joined
May 18, 2022
Messages
30
Trophies
0
Age
25
Location
Maryland
XP
48
Country
United States
I thought I could try to release all the glitched pokemon with PKSM, but unfortunately PKSM crashes when I scroll to the page the glitched pokemon are kept on. I'm trying to figure out how to get rid of them now
 

Gamemaster1379

Well-Known Member
Member
Joined
May 5, 2008
Messages
834
Trophies
1
Age
29
Location
United States
Website
1379tech.110mb.com
XP
2,247
Country
United States
I thought I could try to release all the glitched pokemon with PKSM, but unfortunately PKSM crashes when I scroll to the page the glitched pokemon are kept on. I'm trying to figure out how to get rid of them now
A thought, but are you able to import the save into your system, save it (without ever accessing the glitched Pokemon), re-dump that save, then open it in PkHex? From there, you might be able to actually open and manipulate the save and either rebuild those Pokemon's metadata or just delete them.
 
  • Like
Reactions: Pk11

Pk11

A catgirl with a DSi
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
pk11.us
XP
3,895
Country
United States
Well, we seem pretty close! I was able to take the data from PKSM and inject it into my cart. The game booted right away without any issues! I was even to go play voltorb flip, which use to crash the game on my old cart, and honestly was part of what inspired me to do this. I then went to the PC boxes. I had two bad eggs in my box, and scrolling a few boxes back there was a questionmark. Soon after getting to that box, the game froze.

Opening it in PKSM caused a crash as well when scrolling. Any suggestions? I did clone one pokemon when I first opened it to give it something to save, could that cause an adverse effect? I believe the pokemon that showed as a question mark on the ds showed as two bad egss next to each other as one sprite on PKSM
Could maybe be that some parts of RAM were corrupted between quitting the game and dumping it? I'm not sure exactly how DSi mode RAM on 3DS works so not sure if that could be the case, but if so perhaps repeating the RAM dumping process again would yield different (if maybe not ever fully complete) dumps? Might be worth a try.

In pkmn-chest I appear to be able to release the glitched Pokémon fine, perhaps PKSM is loading additional info or something that pkmn-chest doesn't, so maybe try using pkmn-chest to release them. You can download pkmn-chest from Universal-Updater or Universal-DB's website then just choose "sd:" from the main menu and browse for your save.

Edit: Using PKHeX as Gamemaster1379 suggested may work too, I don't have a Windows computer handy so I can't try that
 
  • Like
Reactions: zoogie

TheMismatcher

Active Member
OP
Newcomer
Joined
May 18, 2022
Messages
30
Trophies
0
Age
25
Location
Maryland
XP
48
Country
United States
Could maybe be that some parts of RAM were corrupted between quitting the game and dumping it? I'm not sure exactly how DSi mode RAM on 3DS works so not sure if that could be the case, but if so perhaps repeating the RAM dumping process again would yield different (if maybe not ever fully complete) dumps? Might be worth a try.

In pkmn-chest I appear to be able to release the glitched Pokémon fine, perhaps PKSM is loading additional info or something that pkmn-chest doesn't, so maybe try using pkmn-chest to release them. You can download pkmn-chest from Universal-Updater or Universal-DB's website then just choose "sd:" from the main menu and browse for your save.

Edit: Using PKHeX as Gamemaster1379 suggested may work too, I don't have a Windows computer handy so I can't try that
I installed Pokemon chest a bit ago but haven't used it since getting an error message saying to copy the file to somewhere else or use twilight menu to launch, I'll follow the error instructions it provides then try that!

Just saw about PkHEx- I'll try that

And I had similar thoughts to the ram dumping method- luckily, because I can trade from the initial game on the repro cart still I can trade over any pokemon that were corrupted. I'll continue to investigate the extent of the corruption though and if there's more I'll try re-dumping. Or how difficult would it be to "combine" two different dumps to use each to fill in the missing parts on the other?


Also y'all are wonderful- Thanks so much!
 
  • Like
Reactions: Pk11

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
I thought I could try to release all the glitched pokemon with PKSM, but unfortunately PKSM crashes when I scroll to the page the glitched pokemon are kept on. I'm trying to figure out how to get rid of them now
It might be a good idea also to redump dsiram.bin as pk11 suggested, as a way to hopefully get a cleaner savefile. I'm thinking maybe pressing home and rebooting right at the *beginning where the game shows a box with your savefile metadata (right after the title screen). This hopefully is at the save verification stage where no real RAM manipulation has occurred.

* Maybe right after an in-game save confirmation as well - before you've done anything else like resuming the game.
 
  • Like
Reactions: E1ite007 and Pk11

Pk11

A catgirl with a DSi
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
pk11.us
XP
3,895
Country
United States
I installed Pokemon chest a bit ago but haven't used it since getting an error message saying to copy the file to somewhere else or use twilight menu to launch, I'll follow the error instructions it provides then try that!

Just saw about PkHEx- I'll try that

And I had similar thoughts to the ram dumping method- luckily, because I can trade from the initial game on the repro cart still I can trade over any pokemon that were corrupted. I'll continue to investigate the extent of the corruption though and if there's more I'll try re-dumping. Or how difficult would it be to "combine" two different dumps to use each to fill in the missing parts on the other?


Also y'all are wonderful- Thanks so much!
Ah yeah trading should work too, for corrupted Pokémon the simplest way to combine dumps would be to just use PKHeX/PKSM/Pokémon Chest to transfer between them, essentially just trading but perhaps a bit quicker though since it looks like there's only a few corrupted ones it would probably be quicker to just trade. If there's any other missing/corrupted data might just want to try a couple times and stick with the best dump, things like badges or other story events would be trickier to recombine, though I think it should be possible in PKHeX.
 

TheMismatcher

Active Member
OP
Newcomer
Joined
May 18, 2022
Messages
30
Trophies
0
Age
25
Location
Maryland
XP
48
Country
United States
It might be a good idea also to redump dsiram.bin as pk11 suggested, as a way to hopefully get a cleaner savefile. I'm thinking maybe pressing home and rebooting right at the *beginning where the game shows a box with your savefile metadata (right after the title screen). This hopefully is at the save verification stage where no real RAM manipulation has occurred.

* Maybe right after an in-game save confirmation as well - before you've done anything else like resuming the game.
So my game has the issue on the repro cart where to get it to boot without crashing I have to select new game, mash through the tutorial until I can walk, then soft reset, then I can hit continue. Last time I did all that and then after making it to the overworld took the dump.

Do you think I should take the dump before doing all that. or after the first softreset?

I suppose I could also try multiple times in different ways and we see what is cleanest
 

TheMismatcher

Active Member
OP
Newcomer
Joined
May 18, 2022
Messages
30
Trophies
0
Age
25
Location
Maryland
XP
48
Country
United States
Ah yeah trading should work too, for corrupted Pokémon the simplest way to combine dumps would be to just use PKHeX/PKSM/Pokémon Chest to transfer between them, essentially just trading but perhaps a bit quicker though since it looks like there's only a few corrupted ones it would probably be quicker to just trade. If there's any other missing/corrupted data might just want to try a couple times and stick with the best dump, things like badges or other story events would be trickier to recombine, though I think it should be possible in PKHeX.
Yeah I'm a tad nervous about story or other data corruption which might not be immediately apparent. I'll try doing as many different things in game as I can to test. There's a lot of potential avenues of corruption though- phone numbers, battle frontier, battled trainers...
A thought, but are you able to import the save into your system, save it (without ever accessing the glitched Pokemon), re-dump that save, then open it in PkHex? From there, you might be able to actually open and manipulate the save and either rebuild those Pokemon's metadata or just delete them.
I tried opening in PkHex and it shows far more pokemon as corrupted and unreadable then the other programs I've tried (though it's still 0-5 per box). I don't know if that's a good thing as it identifies more potentially bad pokemon or if PkHex can't read pokemon that would function normally
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    AncientBoi @ AncientBoi: 🫂 +1