Hacking why must we gateway users home button quit to save?

  • Thread starter Thread starter XDM
  • Start date Start date
  • Views Views 13,773
  • Replies Replies 79
  • Likes Likes 1
So many wrong things in the thread...
Everybody tells what he think is right, without giving the full information.


First, Card1 and Card2 are different.
Card2 are saving in Real time inside the ROM. You will never lose your save.

For Card1: AlbertoSONIC is almost right.
Gateway has and is still working the same way since the first release !
Nothing has changes regarding savegames management.


When you launch a game, the SPI chipset is initialized using this algorithm:

If you launch the SAME game than the last played game, the SD card .sav file will not be copied to SPI.
If you launch a DIFFERENT game than the last played game, the SD card .sav file of the NEW game will be copied to SPI overwriting the previously played savegame.

If your battery runs out, DO NOT LAUNCH a different game.
Run the same game that you last launched and you will continue your game where you last saved. the SPI is keeping your progress as long as you launch the same game.
To create a backup of the SPI chipset to SD card, you need to exit the game (Home+X, Power+Shutdown, Home+load another title, etc.)

It doesn't prevent game crashing and losing save progress.
If the game crash while the SPI is actually accessed it could corrupt it.



Pseudo code for launching game
Code:
if(Exit game)
{
	if(SPI not empty)
		Copy SPI titleID to TitleID.sav on SD
}
else if (Launch game)
{
	if(launched TitleID != SPI titleID)
	{
		if(launched titleID .sav file exists on SD)
			copy TitleID.sav to SPI
		else
			Initialize SPI
	}
	Launch game
}

Something they could implement : saving SPI at game launch instead of game exit.
But if current SPI is corrupted it would overwrite your good save backup.
Code:
if(launched TitleID != SPI titleID)
{
	if(SPI not empty)
		copy SPI TitleID to TitleID.sav on SD
	if(launched titleID .sav file exists on SD)
		copy launched TitleID.sav to SPI
	else
		Initialize SPI
}
launch game
keeping multiple .sav would be better (for example with backup datetime in the filename instead of overwriting the existing .sav)


Gateway is probably using the SPI as a method to prevent flashcart detection by the games.
games often have chipset check routine (type, size, etc.) to determine if the card is genuine or a copy.
if they redirect saves to SD card in realtime it could create compatibility issues and also save speed issues. SPI is probably faster than SD card access.
Ahhh some cold hard facts. I feel more re assured now after seeing the code and having it explained
 
its because i lost A LOT of progress in MH4 yesterday and now im paranoid
if we had latest emunand id just play with the damn cart -__-


Then save, instead of closing it and leaving it for days without the charge cable. The simplest issue can be avoid just by doing so. Yes i do exactly what you do by closing it without saving, but I leave it that way with a charge cable or at least make effort to save to continue at a later time.
 
Yeah I learned this the hard way it's how I lost my precious inazuma chrono storm game, now I always save and quit lesson learned I guess.
 
So the general consensus is, for .3ds games atleast (and probably .cia too), always home+exit? Or will only doing "home" suffice?
 
Lost how?

No more save at all, or back to the previous saved progress and you lost your last play session?
Turning OFF 3DS should be safe (power->off) if you let it shutdown. Don't do hard power off by keeping pressed or it could power off while accessing SPI/SD Card.
losing battery power is safe too, as long as you launch the last played game.
Also, save in your game when you can, not saving progress will not write to SPI (like MH4 players not saving progress and losing saves after power off? it would happen on retail cards too).

Did you launch Smash right after entering gateway mode again, or a different game?


If you have "no more save at all", it means even your .sav file on SD is corrupted and can't be reloaded.
it's not the SPI fault, it's an issue with your SD card writing the save.
Maybe it crashed/powered off while it were saving it, corrupting the file.
But launching the SAME game right after the crash should have resulted in SPI data to be used, not the .sav file data. if you launched a different game, the SPI were replaced.


Sometime, gateway freeze when exiting a game and the .sav is not written.
if you load a different title to exit smash, be careful if it happens as it could not write the .sav correctly. it should freeze and not launch the new title, but just in case it successfully load it while the .sav is not written you will lose your progress because the SPI content is replaced with the new game data.
To be safe, I would never launch another game/title to exit. Always use home+exit to be sure it correctly exits. even if it means reloading emuNAND.
 
You have to close the software one way or another. Pressing the power button closes it instantly. Either way it's just how it writes.
 
For those who converted their roms to card2, are the saves any different from a save created from a card1 game?
How would we retrieve the save, in times when we want to share our saves on sites like 3ds-savegames and filetrip? I know there's card two save tool, but the .sav file it extracts, is this the same exact save file a regular card1 game uses?

I always avoid using cia mainly because I love to share my saves on those sites. Even though I know it's possible to convert a cia save to a .3ds save through a complex, yet simple solution.
Plus cia files take long to install, not without a class 10 SD card (NEVER buy class 4 cards, that low price will be the end of you after you buy it!)
 
Is this thread still going? My findings:

Power Button > "Power Off" on touchscreen: Saves everytime for me. I never use Home > X > A. O3DS and N3DS.

If game freezes and i can't use the home button to suspend. Hard power off = saves lost. O3DS and N3DS
 
Card two save tool extracts or injects the save data.
the data is the same "format", but if it's a real CARD2 (not a converted CARD1 to CARD2) then the save file will be bigger than 512kB.

CARD2 uses the remaining space after a ROM to store saves bigger than the two possible SPI sizes. (256 and 512).

CARD2 have the same requirement than CARD1 regarding the header and filename.
if you use a .3ds, you can share your save.
if you use a .3dz, you need to share your header key too.

If game freezes and i can't use the home button to suspend. Hard power off = saves lost. O3DS and N3DS
It froze often when I played bravely default and I was forced to hard power off, and I could always continue my progress by reloading the game. (note: I played with GW v2.0b1 which had the save freezing bug, and I never lost progress)
the SPI is still there, only the backup to SD fail.

edit:Maybe you are right, because in fact my issue was a little different. I never played if I knew it will freeze.

as I knew it could "not backup correctly", I always loaded the game and immediately exited it.
If it froze, I rebooted and launched again. The game never lost its save when doing it, but I also never played it to see if I would lost progress.
If it didn't froze it meant that it will never freeze, the gateway firmware correctly patched the backup function.


Boot in gateway mode -> launch CARD1 game -> exit right away. If it doesn't freeze it will never freeze.
if it freeze, reboot.
if you play without knowing if it will freeze or not, you might risk losing your game.
 
i lost my progress on MH4U few weeks or months ago when the system hanged and had to power off the 3ds by holding on to the power button for more than 10 sec.
Booted back up and i lost about 10 hours worth of gameplay =/ Problem is with MH4U and SSB, it's very troublesome to keep quitting to save the game.
Does anyone have any app that will transfer or backup saves from the SD card itself over to the laptop through wifi? It will be so much easier as well to keep backups!
The problem with such a solution is that in the case you're describing, the save never makes it to the SD card in the first place. If the game locks up, the save is still on the Gateway's internal SPI.

I have had one game freeze while writing the save file (Sticker Star, froze during the "Closing software" message), and when I tried loading it, the save file had been corrupted and reset. And I have had a game freeze during gameplay (1001 Spikes, usually when bringing up the map screen between levels) which did result in a loss of data. I believe when the system's battery ran out, the save progress was kept, but if I did a hard power-off (holding power button for 10-15 sec until the system shuts off), everything since the last time I had closed the software was lost.
 
I was playing with Persona Q, I close the 3DS lid, and it was inactive for hours.
After that I tried to continue it, and the following message was displayed: "game card removed", I had to exit, and re-start the game.

After loading Persona Q again (so I loaded the SAME game, not anything else), I noticed that my save data is lost, so I lost ~1.5 hours of data, and only my previous save data was being loaded.
Based on the findings on this thread, if I load the same game, my latest save should have been loaded?
 
I was playing with Persona Q, I close the 3DS lid, and it was inactive for hours.
After that I tried to continue it, and the following message was displayed: "game card removed", I had to exit, and re-start the game.

After loading Persona Q again (so I loaded the SAME game, not anything else), I noticed that my save data is lost, so I lost ~1.5 hours of data, and only my previous save data was being loaded.
Based on the findings on this thread, if I load the same game, my latest save should have been loaded?

All the games I play with my Gateway cart I always convert the ROM to card 2 type (saves within its own image) and it's instant. So you don't have to gamble with your progress. My 3DS has a bad habit of freezing while exiting a game.
 
Is the compatibility good for card 2 type games?
Which application can I use to convert the ROMs?
 
Is the compatibility good for card 2 type games?
Which application can I use to convert the ROMs?

It's notoriously hard to find, but it's a DOS application called "card 1 to 2"

There is a python app that does the same thing too, but I've never used it/nor do I know how.

Compatibility is fine, but card 2 type ROMs can strictly NOT be trimmed.
 
true, and i would too but i wont want to make the 32gb i brought for the gateway seem useless.

What 3DS do you have? Old or new? since that 32 gb is microsd, just buy a microsd to sd converter and replace your 3ds sd card. Then you can download all the games you want easier that looking up online for .3ds files.

I used to be a gateway user but now it is collecting dust thanks to cfw
 
What 3DS do you have? Old or new? since that 32 gb is microsd, just buy a microsd to sd converter and replace your 3ds sd card. Then you can download all the games you want easier that looking up online for .3ds files.

I used to be a gateway user but now it is collecting dust thanks to cfw

Dat cheat engine tho. It's the sole reason my Gateway cart is still inserted in the slot after 3 years
 
Dat cheat engine tho. It's the sole reason my Gateway cart is still inserted in the slot after 3 years
what games are worth cheating for? Unless you are cheating online.
I cheat on Pokemon S&M but I just export the save and edit the save file from my PC
 
what games are worth cheating for? Unless you are cheating online.
I cheat on Pokemon S&M but I just export the save and edit the save file from my PC

Cheat is just the blanket term for modifying RAM values for a game, in my opinion.

It's mainly used for making the game more convenient such increasing walking speed etc.
 

Site & Scene News

Popular threads in this forum