I have an idea to translate GW (6.x) card1 save to cia/legit cart

Discussion in '3DS - Flashcards & Custom Firmwares' started by banxian, Dec 8, 2014.

  1. banxian
    OP

    banxian Member

    Newcomer
    40
    63
    Oct 30, 2014
    Switzerland
    If you have tried to use savedatafiler on Gateway's red-card, you will see card1 type ROM shown like "CTR broken data" in SDF lower screen.
    this prevents we convert our exists gamesave from gw rom to cia games.

    by looking into real game exefs (MH4G) I noticed there two call to load savedata:
    Code:
    nn::Result nn::fs::MountSaveData(const char *archiveName, bit32 uniqueId, bit8 variation)
    {
        nn::Result result= nn::fs::MountOtherUserSaveData(archiveName, MEDIA_TYPE_CTRCARD, uniqueId, variation);
        if ( (result.value & 0x80000000 & 0x80000000) != 0 )
        {
            result= nn::fs::MountOtherUserSaveData(archiveName, MEDIA_TYPE_SDMC, uniqueId, variation);
            if ( (result.value & 0x80000000 & 0x80000000) != 0 )
                result.value = 0xC8804464;
        }
        return result;
    }
    I guess Gateway is just breaked MEDIA_TYPE_CTRCARD codepath, and hooked SDMC one with non standard 6.x key, in other words, they dropped spi flash support in hardware level that savedatafiler expect.


    sadly ctrulib missed savedata support, If we can rip savedata related functions from the new rom, and built 3ds format homebrew rom with same titleID/saveID, I think savedata will mounted after our homebrew start so we can export it now.

    any suggestions?
     
    Margen67 and cearp like this.
  2. Timburpton

    Timburpton GBAtemp Advanced Fan

    Member
    591
    133
    Nov 18, 2014
    Or just use MT specifically for Save conversion?
     
  3. cearp

    cearp the ticket master

    Member
    7,550
    4,813
    May 26, 2008
    Tuvalu
    good luck :)
     
    Margen67 likes this.
  4. Duo8

    Duo8 I don't like video games

    Member
    3,444
    1,144
    Jul 16, 2013
    No one wants to buy an inferior clone just for that.
     
    Margen67, bache, Thirty3Three and 3 others like this.
  5. Timburpton

    Timburpton GBAtemp Advanced Fan

    Member
    591
    133
    Nov 18, 2014
    This argument old. MT is no clone. They just copycat. 3dslink and r4igolddeluxe is clone.

    Also, I have one 4.5 3ds and one N3ds. I will using MT for 4.5 and GW for 9.2. MT was cheap for me.
     
  6. Duo8

    Duo8 I don't like video games

    Member
    3,444
    1,144
    Jul 16, 2013
    Regarding savefl not being able to backup GW, does this have to do with the new "Real-time" save method (think they have this since 2.0).
     
  7. Timburpton

    Timburpton GBAtemp Advanced Fan

    Member
    591
    133
    Nov 18, 2014
    It's not real time save. GW loads save when game starts, saves saves when game is closed.

    I no sure but I think MT is real time save. It loads save when select rom. That's how savefl work with MT.
     
  8. Duo8

    Duo8 I don't like video games

    Member
    3,444
    1,144
    Jul 16, 2013
    ...That's the exact opposite of real-time.

    Anw IIRC GW just read the save from SD and whenever the game calls up the save it writes to SD directly. The EEPROM is ignored. That's also why savefl doesn't work.
     
  9. Arras

    Arras GBAtemp Guru

    Member
    5,879
    2,711
    Sep 14, 2010
    Netherlands
    Pretty sure you still lose your progress on a Gateway if the 3DS loses power while playing (crash, empty battery) even if you previously saved ingame. It still only writes to SD after you're done playing, but it does this no matter how you exit the game, including the power button, which means it's only a problem if the game/system isn't exited properly.
    Unless this was changed at some point, but I'm pretty sure this was how it worked a while ago.
     
    Margen67 likes this.
  10. Duo8

    Duo8 I don't like video games

    Member
    3,444
    1,144
    Jul 16, 2013
    Wait that RTS thing was for CARD2 games.
    So I guess GW screwed up save access by overhacking :P

    Side question: There's a feature to dump save from card and IIRC it works with scene ROMs. Since saves are encrypted per-card how could it work with those ROMs?
    I think it's the same for CARD2 too. You can take your own save from your dumped ROM and inject into a scene release.
     
  11. Neptune

    Neptune GBAtemp Advanced Maniac

    Member
    1,588
    533
    Dec 7, 2003
    United States
    Internet
    Not sure why this keeps cropping up. The game doesn't control the save encryption. The reason that (currently) the save encryption is using the old KeyX method is because the system uses the save encryption that the system started up with, in this case, 4.0-4.5. The only way this will be fixable is if Gateway ever decides to allow you to use a custom encryption key for saves (like the 6.x KeyY key). I don't see this happening any time soon but when the new exploit for 9.0-9.2 is released it will actually be operating on the new save encryption and since they claim it has kernel access SaveDataFiler will also allow you to decrypt your retail Card2 save, modify it, and inject it back into your cart :)
     
  12. drfsupercenter

    drfsupercenter Flash Cart Aficionado

    Member
    1,898
    234
    Mar 26, 2008
    United States
    Another method, if you have a NAND flasher installed... can't you just take your emuNAND which you've installed SaveDataFiler on, use the emuNAND Tool to extract it and then write it to your sysNAND? Then you should be able to use legit carts all you want :P
     
  13. gamesquest1

    gamesquest1 Nabnut

    Member
    GBAtemp Patron
    gamesquest1 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    14,154
    9,508
    Sep 23, 2013
    nope, you cant just use illegit installed items on a unpatched system....its patched when you go into emunand on the fly.....not only that since 8.x+ emunand it seems you cant flash an emunand backup to the console as it will just result in a black screen of death
     
  14. placebooooo

    placebooooo GBAtemp Advanced Fan

    Member
    729
    97
    Aug 9, 2013
    United States
    Philadelphia
    So there is still no current method to convert saves from gateway to cia installed games?
     
  15. drfsupercenter

    drfsupercenter Flash Cart Aficionado

    Member
    1,898
    234
    Mar 26, 2008
    United States
    So then Gateway is still doing stupid things with CIA installation then, it's not doing it the way CFW would do it. I guess I should have expected that from them. As much as I want to respect MT-Card, it seems they did the same crap, where you can only use the installed CIA files in flashcart mode, classic mode disables it
     
  16. VerseHell

    VerseHell GBAtemp Psycho!

    Member
    3,067
    1,067
    Jun 29, 2014
    France
    Do you realise that if they allowed cias in classic mode it would be almost like a free cfw with updated emunand?
     
  17. gamesquest1

    gamesquest1 Nabnut

    Member
    GBAtemp Patron
    gamesquest1 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    14,154
    9,508
    Sep 23, 2013
    yeah.....enabling it in classic mode would be completely stupid of them from a business standpoint ....its like here you go you don't need us except for once to install dev menu, other than that enjoy 9.x emunand with all roms converted to .cia files........as much as we would like such things it would be stupid of them to allow it and expect people not to just buy a MT/gateway card install dev menu and sell it off
     
  18. drfsupercenter

    drfsupercenter Flash Cart Aficionado

    Member
    1,898
    234
    Mar 26, 2008
    United States
    You'd still need the flash cart itself to boot into classic mode - or at least with Gateway.

    MT-Card has the same warning that Gateway does about how "some features might not work" but from what I can tell it all works anyway...
     
  19. gamesquest1

    gamesquest1 Nabnut

    Member
    GBAtemp Patron
    gamesquest1 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    14,154
    9,508
    Sep 23, 2013
    yeah i think gateway kinda didnt trust MT to copy them competently (and they where right)....i guess thats why they left cia install out of classic mode.....truth is assuming they fix the save sizes issue and rework how games load there saves so they are dump-able with SDF, then there really isnt any need for cia install in classic mode as you could just dump the game and save and edit from there
     
    Margen67 likes this.
  20. drfsupercenter

    drfsupercenter Flash Cart Aficionado

    Member
    1,898
    234
    Mar 26, 2008
    United States
    Well, I'm more interested in going from my eShop copies of games (that I legally own, btw) to cartridges. Can't do that with Gateway, but how else would I install SaveDataFiler? That's my dilemma, even if I did a system transfer to emuNAND, it seems that's kind-of pointless.