d0k3 / Decrypt9WIP

Multipurpose content dumper and decryptor for the Nintendo 3DS
GNU General Public License v2.0
405 stars 59 forks source link

Add nds cart dumping #65

Closed droped closed 8 years ago

droped commented 8 years ago

Some work has already been done in this repo but it seems like it has stalled.

d0k3 commented 8 years ago

NDS cart dumping is not trivial stuff. Once it is figured out, it will be added to D9. I'm leaving this open because this is, in fact, a planned feature. Don't expect anything to happen soon, though.

ghost commented 8 years ago

IIRC uncart had some sort of dump code :p

d0k3 commented 8 years ago

D9 has exactly the same dumping code as uncart... and no, DS cart dumping does not work yet

ghost commented 8 years ago

support nds cart dumping. Please merge the source code https://github.com/osilloscorpion/Decrypt9WIP/tree/dump_nds_cart

ihaveamac commented 8 years ago

so far it was able to dump my Animal Crossing: Wild World game card, as well as Warioware: DIY. it doesn't dump Pokémon Black (DSi-enhanced) though.

Selected: [Dump Cart (full)]
Cartridge ID: C001FFC2
Product name: POKEMON B
Product ID: IRBO01
Cartridge data size: 256MB
Cartridge used size: 195MB
Cartridge dump size: 256MB
Invalid SecureCartID. (D0EE2866 != C001FFC2)
Error reading secure data
Dump Cart (full): failed!

Press B to return, START to reboot.
ghost commented 8 years ago

DSi(Hybrid or enhanced) is not supported, because the protocol is different.

ghost commented 8 years ago

It dumped Biggest Loser US just fine. It dumped a DS mode copy of course and it ran fine on desmume. On DSi mode from no$gba, it crashed as expected.

capture

btw - any reason why it's so slow compared to DSi version?

ihaveamac commented 8 years ago

I was told Pokémon HeartGold failed as well, with a similar issue to Black. both of these games have extra hardware in the game card (infrared), so could that be it?

ghost commented 8 years ago

System Flaw also dumped. Looks like just the crypto is wrong (on second look, all the header past 200h is missing). It will boot the ingame "wrong system" error screen at least.

capture

ghost commented 8 years ago

Add error : DSi(Hybrid or enhanced) is not supported https://github.com/osilloscorpion/Decrypt9WIP/tree/dump_nds_cart

ghost commented 8 years ago

Add error : DSi(Hybrid or enhanced) is not supported https://github.com/osilloscorpion/Decrypt9WIP/tree/dump_nds_cart

I think a warning would be more appropriate since this appears to still dump usable hybrid carts in DS mode. Check up a few posts with Biggest Loser.

ihaveamac commented 8 years ago

it also apparently failed with Pokémon Platinum, which as far as I know has no special hardware or anything.

Selected: [Dump Cart (full)]
Cartridge ID: 80007FC2
Product name: POKEMON PL
Product ID: CPUE01
Cartridge data size: 128MB
Cartridge used size: 99MB
Cartridge dump size: 128MB
Invalid SecureCartID. (D0EE2866 != 80007FC2)
Error reading secure data
Dump Cart (full): failed!

Press B to return, START to reboot.
d0k3 commented 8 years ago

Okay, first of all, thanks for those modifications. This is a big step forward! As there is still some testing going on and there are still commits coming, I'll wait for a bit, right?

Once I take it over, I may also do some squashing and I may change a thing or two (f.e. we need to prevent users trying to make CIAs from NDS carts, and I am atm unsure if trimming works when dumping DS carts.

ihaveamac commented 8 years ago

small note @d0k3 trimming did work properly for me (.nds was trimmed when I picked "trim")

ghost commented 8 years ago

Please (long?)wait because it is still necessary to test.

d0k3 commented 8 years ago

Alright, I'll wait.

ghost commented 8 years ago

When contains 80000000 in cartID, it has special operation. try to adjust the readTimeout(Delay) of NTR_CmdSecure

ghost commented 8 years ago

For example, securentr.c: 210 u16 readTimeout = ((u16_)&header[0x6E]); readTimeout + = 3000;

ghost commented 8 years ago

hi, ihaveamac please test Pokémon Platinum SecureCartID Ok? https://github.com/osilloscorpion/uncart-ds/tree/implement-ntr-twl-dumping

ihaveamac commented 8 years ago

@osilloscorpion can't seem to run that through a9lh.... using v2 and luma chainloader

ghost commented 8 years ago

I'm using in A9LH and Luma. It worked properly.

ghost commented 8 years ago

I think you have to use make a9lh for it to work. Anyway, here's a d9wip that dumps platinum just fine for me. decrypt9WIP.zip

ghost commented 8 years ago

Platinum is a very regular game; that's quite odd x3

LiquidFenrir commented 8 years ago

I tried dumping Spectrobes (NTR-ASUP-EUR) and Final Fantasy IV (NTR-YF4P-EUR), spectrobes worked but FF didn't. It showed the same SecureCartID that @ihaveamac had with Pokémon Platinum. It did dump correctly by using the build @idgrepthat posted

PPLToast commented 8 years ago

A9LH is required for NDS dumping? Might explain why it's all crashing for me...

ghost commented 8 years ago

A9LH is required for NDS dumping? Might explain why it's all crashing for me...

Here's a full release build Decrypt9WIP-20160807-171527.zip

ghost commented 8 years ago

@LiquidFenrir when you use the uncart-ds, SecureCartID is displayed correctly? https://github.com/osilloscorpion/uncart-ds/tree/implement-ntr-twl-dumping

d0k3 commented 8 years ago

@osilloscorpion once this is ready for take over into my branch, just let me know. You can also do a pull request if you want.

LiquidFenrir commented 8 years ago

@osilloscorpion I'm not sure what you mean by "displayed correctly", using that thing showed "Secure chip ID: D0EE2866", and "Chip ID is 80007FC2" for FFIV

PPLToast commented 8 years ago

@idgrepthat This worked for me with 3dsx, dumped a few games along with Platinum and all worked fine (except TWL of course) good stuff :)

(oh and platinum did result in a "bad" dump for whatever reason, CRC32 2ADABB54 rather than 71ACA63A, idk why E: Underdumped header seems, not sure if it can be fixed somehow)

ghost commented 8 years ago

Please merge the source code https://github.com/osilloscorpion/Decrypt9WIP/tree/dump_nds_cart

droped commented 8 years ago

@osilloscorpion Make a pull request.

ghost commented 8 years ago

Wow he committed account suicide XD That's not the type of commit we want.

ghost commented 8 years ago

Well here's my local changes since he's gone. Do with it what you will. Decrypt9WIP.zip

d0k3 commented 8 years ago

@idgrepthat can you do a pull request with that? @osilloscorpion's account seems to be gone, so we can't credit him anymore (which I would want)

ghost commented 8 years ago

Yah, just give me a bit.

ghost commented 8 years ago

Pokemon W works fine with dumping, and the warning shows up perfectly clear so yay :D

d0k3 commented 8 years ago

Added with https://github.com/d0k3/Decrypt9WIP/commit/34e96d0e9dca28b746d2ac577f27d112fe19c4e3

Thanks osilloscorpion, @idgrepthat, all testers and everyone involved!