Release: 005Tools by McHaggis

Discussion in '3DS - Flashcards & Custom Firmwares' started by McHaggis, Sep 18, 2012.

Sep 18, 2012
  1. McHaggis
    OP

    Member McHaggis Fackin' Troller

    Joined:
    Oct 24, 2008
    Messages:
    1,656
    Country:
    United Kingdom
    My weekend hobby for the last 3 weeks has been learning C++, and one of the things that was really bugging me building up to this was having to boot into Windows to back up my game saves before lending the games to friends, and having do it again restore them when I got them back. So I decided to have a go at recreating the functionality in a command line application that could be compiled for Linux, Windows or Mac. I've covered the Linux and Windows part, but I don't have a Mac (though the HID library I'm using says it's Mac compatible).

    Anyway, I got started looking at elisherer's R4iSaveMore application, which defines most of the commands correctly. After that, it was a matter of figuring out which commands weren't accurate by sniffing the USB traffic to the dongle and reversing the R4iSaveDongle v1.5.exe code. Unfortunately, it's not just a case of mimicking the HID reports as the application performs a lot of its own logic. The whole thing's been a major pain in the arse, and I've hit the last brick wall I can take with this stupid device. So, to cut my rambling short, I'm releasing what I have so far and taking a short break from banging my head against the aforementioned brick wall.

    Features

    • Dump information about the card header.
    • Reads from game cards' save data and output to a file.
    • Writes saves to and erases save data on game cards.
    • The main code is flexible, so other devices could be supported very easily.



    Known Issues

    • Some other DS games (like Pokemon Diamond et al.) set a flag in the SD app that tells them to be written to differently, currently not implemented.
    • Save detection for some DS cards is not yet implemented. You can specify the save size using -s=BYTES, e.g. ./005tools download NSMB.sav -s=8192. If you're not sure what the save size is, http://www.gamespy.com lists the size for a lot of games.

    Credits to elisherer for his R4iSaveMore application that got me started.

    Download v0.1bSource
    License is GPLv3
     
    2 people like this.


  2. narutopet112

    Member narutopet112 GBAtemp Regular

    Joined:
    Jul 25, 2010
    Messages:
    209
    Country:
    Netherlands
  3. McHaggis
    OP

    Member McHaggis Fackin' Troller

    Joined:
    Oct 24, 2008
    Messages:
    1,656
    Country:
    United Kingdom
    Thanks :-) I made it mostly for myself, but I hope someone else will find it useful.

    There's an interesting anecdote to go with this application. I had an old R4 card that says R4 SDHC on the sticker. Someone gave me it a while ago because they couldn't get it working, and I tried every single R4 knock-off firmware I could find. During the course of writing this application, I plugged it in just to see what would happen and got the following output:

    Code:
    $ ./005tools info -h=header.bin
    
    005Tools v0.1a by McHaggis
    R4i Save Dongle v1.3 found.
    Detected game: TTDS TOP TF/SD DS (0Mb)
    Save game size: (unknown)
    
    Had a look around and found the DSTT site, downloaded the TT menu and it works perfectly. Now my boy has a card for his DS, how's that for a happy ending? :-p
     
  4. elisherer

    Member elisherer I ♥ 3DS

    Joined:
    Dec 16, 2009
    Messages:
    778
    Location:
    3dbrew.org
    Country:
    Israel
    Nice job,

    highly recommend not publishing on filetrip...it became a spyware madness..
     
  5. Ericthegreat

    Member Ericthegreat Not New Member

    Joined:
    Nov 8, 2008
    Messages:
    1,764
    Location:
    Vana'diel
    Country:
    United States
    huh?
     
  6. RodrigoDavy

    Member RodrigoDavy GBAtemp Maniac

    Joined:
    Feb 9, 2011
    Messages:
    1,453
    Country:
    Brazil
    You, sir, just made my day! I hate to boot to Windows no matter the reason. Tested it on Ubuntu 12.04 and worked, for my 3DS cards it doesn't show the software title, it just say "Detected unknown CTR-005 game (encrypted 3DS card)". As for the acekard (beta firmware) and the Supercard DS one it will just show random characters xD. Downloading save seems to work well, but I'm gonna wait for the next versions to test the save upload feature (too afraid to corrupt my saves atm xD)
     
  7. elisherer

    Member elisherer I ♥ 3DS

    Joined:
    Dec 16, 2009
    Messages:
    778
    Location:
    3dbrew.org
    Country:
    Israel
    the download is an exe file that trys to install a searchbar and some other software... an then unpacks the zip file to the desktop (or is it just on my filetrip?)
     
  8. Ericthegreat

    Member Ericthegreat Not New Member

    Joined:
    Nov 8, 2008
    Messages:
    1,764
    Location:
    Vana'diel
    Country:
    United States
    Only this file? Cause other stuff on filetrip is fine. Also NEVER run .exe you arent certain are safe.... there is no reason these days for self extracting exe's.
     
  9. McHaggis
    OP

    Member McHaggis Fackin' Troller

    Joined:
    Oct 24, 2008
    Messages:
    1,656
    Country:
    United Kingdom
    Hmm... are you sure you didn't click one of the advertisers by mistake? Sometimes they have buttons that say "Download" or "Download ready in 5... 4... 3... 2... 1... Download now!". It's really annoying, this is the button you need to click:

    [​IMG]

    If Filetrip.net's advertisers are tricking users into download spyware then, you're right, I should find somewhere else to host the file.
     
  10. narutopet112

    Member narutopet112 GBAtemp Regular

    Joined:
    Jul 25, 2010
    Messages:
    209
    Country:
    Netherlands
    Spyware?
     
  11. SifJar

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
    Yes, spyware. It's the annoying ads on filetrip which try to trick people into downloading it. Which is a very good reason not to use filetrip.
     
  12. overlord00

    Member overlord00 A motherfucking birdplane

    Joined:
    Sep 12, 2009
    Messages:
    664
    Country:
    Australia
    wait, you did all of this with 3 weeks knowledge? I feel like a phony.
     
  13. Pong20302000

    Member Pong20302000 making notes on everything

    Joined:
    Sep 8, 2009
    Messages:
    8,076
    Location:
    One's inner self
    Country:
    Japan
    shame we cant make the dongle dump games
     
    SignZ likes this.
  14. elisherer

    Member elisherer I ♥ 3DS

    Joined:
    Dec 16, 2009
    Messages:
    778
    Location:
    3dbrew.org
    Country:
    Israel
    Yes, clicking this button directs to:
    Code:
    http://downloadcdn.betterinstaller.com/installers/1/8/005Tools01a_downloader_by_FileTrip.exe
    
    obviously not the file you've uploaded.
    Code:
    005tools-v0.1a.zip
    
     
  15. slmpika

    Newcomer slmpika Member

    Joined:
    Dec 3, 2011
    Messages:
    17
    Country:
    United States
    I don't know what you're clicking on, but that button leads to
    http://filetrip.net/nds-downloads/applications/start-005tools-01a-f30775.html
    where you click on "Click here" and the link is
    http://filetrip.net/d30775-005Tools-0-1a.html

    IMO filetrip is a good place to host files like these to make it easy to always find the latest version.
     
  16. SifJar

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
    Clicking the regular download button also spits out the .exe for me. It wasn't as I had previously thought (elisherer accidentally clicking an ad), it happened when I clicked the regular download button (I have all ads blocked, it was definitely the correct button).
     
  17. McHaggis
    OP

    Member McHaggis Fackin' Troller

    Joined:
    Oct 24, 2008
    Messages:
    1,656
    Country:
    United Kingdom
    Sounds like a cross site scripting attack to me. That would explain the change in link to redirect off of FileTrip. Ads usually involve placing a script in the page, it could be that one of the advertisers has gone rogue and is using their script to alter the link or something. Someone should at least notify the FileTrip administrators.

    If it's not fixed by the time I get writing to 3DS cards working, I'll upload it somewhere else and see if they mind it being published on 3DBrew.
     
  18. SifJar

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
  19. McHaggis
    OP

    Member McHaggis Fackin' Troller

    Joined:
    Oct 24, 2008
    Messages:
    1,656
    Country:
    United Kingdom
    Well, I have background in programming, and I had elisherer's code to help me get started. But I pretty much learned what I know about C++ in 3 weeks, yeah. :)

    *sigh* and my file got removed because it was reported as spam. Typical. Well, I'm going to work on it a little more before uploading it again, and I'll publish it on 3DBrew this time and perhaps use Google SVN or Github for the source.


    I guess that explains why I had no idea what you guys were talking about.
     
  20. elisherer

    Member elisherer I ♥ 3DS

    Joined:
    Dec 16, 2009
    Messages:
    778
    Location:
    3dbrew.org
    Country:
    Israel
    @[member='McHaggis'], I can give you admin on R4iSaveMore on google code and you could publish it there if you'de like...i'm not going to touch it anymore anyway...
     

Share This Page