Hacking Release: 005Tools by McHaggis

McHaggis

Fackin' Troller
OP
Member
Joined
Oct 24, 2008
Messages
1,749
Trophies
0
XP
1,466
Country
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
 

McHaggis

Fackin' Troller
OP
Member
Joined
Oct 24, 2008
Messages
1,749
Trophies
0
XP
1,466
Country
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
 

RodrigoDavy

Well-Known Member
Member
Joined
Feb 9, 2011
Messages
1,453
Trophies
0
XP
879
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)
 

Ericthegreat

Not New Member
Member
Joined
Nov 8, 2008
Messages
3,455
Trophies
2
Location
Vana'diel
XP
4,279
Country
United States
Nice job,

highly recommend not publishing on filetrip...it became a spyware madness..
huh?
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?)
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.
 

McHaggis

Fackin' Troller
OP
Member
Joined
Oct 24, 2008
Messages
1,749
Trophies
0
XP
1,466
Country
Nice job,

highly recommend not publishing on filetrip...it became a spyware madness..
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:

download.png


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

elisherer

I ♥ 3DS
Member
Joined
Dec 16, 2009
Messages
778
Trophies
0
Location
3dbrew.org
Website
www.sherer.co.il
XP
392
Country
Iceland
Nice job,

highly recommend not publishing on filetrip...it became a spyware madness..
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:

download.png


If Filetrip.net's advertisers are tricking users into download spyware then, you're right, I should find somewhere else to host the file.
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
 

slmpika

Member
Newcomer
Joined
Dec 3, 2011
Messages
17
Trophies
0
XP
134
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.
 

SifJar

Not a pirate
Member
Joined
Apr 4, 2009
Messages
6,022
Trophies
0
Website
Visit site
XP
1,175
Country
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).
 

McHaggis

Fackin' Troller
OP
Member
Joined
Oct 24, 2008
Messages
1,749
Trophies
0
XP
1,466
Country
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.
 

McHaggis

Fackin' Troller
OP
Member
Joined
Oct 24, 2008
Messages
1,749
Trophies
0
XP
1,466
Country
wait, you did all of this with 3 weeks knowledge? I feel like a phony.
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.

Registered users can download files without the installer, and non-Windows users won't see it no matter what.

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

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @AncientBoi, I'm sorry for your loss. Rest in piece. 🙏 +1