Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nds cart dumping #65

Closed
droped opened this issue Jul 24, 2016 · 38 comments
Closed

Add nds cart dumping #65

droped opened this issue Jul 24, 2016 · 38 comments

Comments

@droped
Copy link

droped commented Jul 24, 2016

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

@d0k3
Copy link
Owner

d0k3 commented Jul 25, 2016

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
Copy link

ghost commented Jul 26, 2016

IIRC uncart had some sort of dump code :p

@d0k3
Copy link
Owner

d0k3 commented Jul 26, 2016

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

@ghost
Copy link

ghost commented Aug 6, 2016

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

@ihaveamac
Copy link

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
Copy link

ghost commented Aug 6, 2016

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

@ghost
Copy link

ghost commented Aug 6, 2016

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
Copy link

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
Copy link

ghost commented Aug 6, 2016

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
Copy link

ghost commented Aug 6, 2016

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

@ghost
Copy link

ghost commented Aug 6, 2016

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
Copy link

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
Copy link
Owner

d0k3 commented Aug 6, 2016

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
Copy link

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

@ghost
Copy link

ghost commented Aug 6, 2016

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

@d0k3
Copy link
Owner

d0k3 commented Aug 6, 2016

Alright, I'll wait.

@ghost
Copy link

ghost commented Aug 6, 2016

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

@ghost
Copy link

ghost commented Aug 6, 2016

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

@ghost
Copy link

ghost commented Aug 7, 2016

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

@ihaveamac
Copy link

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

@ghost
Copy link

ghost commented Aug 7, 2016

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

@ghost
Copy link

ghost commented Aug 7, 2016

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
Copy link

ghost commented Aug 7, 2016

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

@LiquidFenrir
Copy link

LiquidFenrir commented Aug 7, 2016

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
Copy link

PPLToast commented Aug 7, 2016

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

@ghost
Copy link

ghost commented Aug 7, 2016

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
Copy link

ghost commented Aug 7, 2016

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

@d0k3
Copy link
Owner

d0k3 commented Aug 7, 2016

@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
Copy link

@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
Copy link

PPLToast commented Aug 8, 2016

@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
Copy link

ghost commented Aug 8, 2016

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

@droped
Copy link
Author

droped commented Aug 8, 2016

@osilloscorpion Make a pull request.

@ghost
Copy link

ghost commented Aug 8, 2016

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

@ghost
Copy link

ghost commented Aug 8, 2016

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

  • increased compatibility with increased read delay (that he suggested above)
  • fixed file write buffering for about a 20x speedup.

@d0k3
Copy link
Owner

d0k3 commented Aug 8, 2016

@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
Copy link

ghost commented Aug 8, 2016

Yah, just give me a bit.

@ghost
Copy link

ghost commented Aug 8, 2016

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

@d0k3
Copy link
Owner

d0k3 commented Aug 8, 2016

Added with 34e96d0

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

@d0k3 d0k3 closed this as completed Aug 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants