ntrteam / flashcart_core

A hopefully reusable component for dealing with flashcart specific behavior.
GNU General Public License v3.0
126 stars 32 forks source link

R4i Upgrade v 1.4 (www.r4-v.com) #115

Open ghost opened 6 years ago

ghost commented 6 years ago

I've used the new rewritten NDS Ntrboot flasher on my DS Lite. The card gets recognized as part of the R4iSDHC family, but when I try to flash the FIRM (I use the Boot9strap_ntr.firm) it returns a "Failed to inject FIRM!" error.

Here's the debug.log from the flashcart's microSD card, here's the dump I got from the "Dump flash" option, here's the kernel for this flashcart, here's the dump I got via twopassdump and here's the dump I got from GodMode9

Images (Click to Expand)

![Label](https://s19.postimg.org/daqypjbcz/P_20171209_162346.jpg) ![PCB Front](https://s19.postimg.org/xi4ehuo9v/P_20171209_162414.jpg) ![PCB Back](https://s19.postimg.org/q254w2g03/P_20171209_162420.jpg) ![NDS](https://s19.postimg.org/qrnx8f8tv/P_20171209_162854.jpg) !!NOTE!!: The flashcart can't actually be used in a 3DS since it's blocked. I put it in my 3DS only because my DS Lite sometimes takes a lot of tries to read a card.

BellezaEmporium commented 6 years ago

For me, seems like a pure clone of R4i-SDHC cards yep, but something in this cart looks weird to me...

The chip (back) is like R4i-SDHC cards no doubt. But the front part does not look like at all like a R4i-SDHC card...

For this, might be some instruction change. Try DSTT and see if the result is good.

ghost commented 6 years ago

@ShadixAced if it's a clone, then why can't the ntr flasher inject the FIRM?

BellezaEmporium commented 6 years ago

Maybe because the chip does not recognise them, or might have been changed by the R4-V team, which looks weird to me.

BellezaEmporium commented 6 years ago

Or maybe it's a NOR problem ? You haven't done a GM9 / D9 flash dump though

ghost commented 6 years ago

@ShadixAced I can't, I don't have a modded 3DS. But I did do a dump via the dump option in the new NDS ntrboot flasher

BellezaEmporium commented 6 years ago

Oh yes my bad. Did you try DSTT ?

ghost commented 6 years ago

@ShadixAced it only recognizes it as a R4 SDHC

BellezaEmporium commented 6 years ago

Okay. That's weird considering that he was recognized. Do not know if the NDS file work correctly. The flash might protect himself from flashing or might be a read issue.

ghost commented 6 years ago

@ShadixAced I posted the log file too

BellezaEmporium commented 6 years ago

Saw it, it is a NOR issue, that it does not end or start by FF.

jason0597 commented 6 years ago

@ShadixAced I did try my best to make it so that there is minimal interference from other factors like kernel, sd init, fat mount etc. However I cannot guarantee that having the kernel run and do it’s thing before running the nds flasher, won’t affect it at all

BellezaEmporium commented 6 years ago

@jason0597 At least I've saw you did a great work, but yep, might be one part of your code that might have interfered with @zacchi4k 's flashcart.

@zacchi4k Try to dump your cart, and @jason0597 if you know a lot about flashcart updater or how the NOR works, well will be a good source.

jason0597 commented 6 years ago

unfortunately i'm not that experienced with how the r4isdhc works, or in general arm and arm assembly

pixel-stuck commented 6 years ago

This looks very much like a DSTT clone. Run the DSTT option and send us the log please

On Sun, Dec 10, 2017, 10:59 AM jason0597 notifications@github.com wrote:

unfortunately i'm not that experienced with how the r4isdhc works

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ntrteam/flashcart_core/issues/115#issuecomment-350558093, or mute the thread https://github.com/notifications/unsubscribe-auth/ADd1uGE4CiuNXzEjhVpXwEhBW-uP8nx_ks5s-__igaJpZM4Q8Ilm .

pixel-stuck commented 6 years ago

Also, can you get us the numbers on the chip? It appears they burned some of them off, but something might end up being useful

ghost commented 6 years ago

@ShadixAced I did already dump my flashcart with the dump option in the flasher, but now I did a dump with dsflashcartdump @dark-samus here's the log.

Here are the labels on the chips: Back labeled Front labeled

I put a black rectangle where they put something on the chip, although it LOOKS like there wasn't actually anything written below

!NOTE! I did use a DSi for this, since my DS Lite doesn't want to read this flashcart anymore for some reason

pixel-stuck commented 6 years ago

Indeed, this seems to be a DSTT clone. It gets what appears to be a valid flash chip ID, but likely we just don't support that flashchip currently

ghost commented 6 years ago

@dark-samus I followed this guide to install YSMenu, and indeed, this cart needs to use the "DSTTi-Clone" folder, so yeah... How hard would it be to add support?

pixel-stuck commented 6 years ago

Well, first things first, we needed to know what flashchip it is. The text you provided from the big chip gave me that. Punching some of the text into Google got me a datasheet, which in turn gives me the flash commands. From there it's figuring a few things out. Block size, chip ID (which you provided with the log), among some other things. After that it's just doing the work of integrating it into the DSTT code

pixel-stuck commented 6 years ago

Also; lol, the dump from dsflashcart dump is literally all zeros...

ghost commented 6 years ago

@dark-samus is there some way I could help you with the other things needed to know?

pixel-stuck commented 6 years ago

@zacchi4k just try this build for me. This one will only read the flash, it won't restore or inject ntrboot ntrboot_flasher.zip

jason0597 commented 6 years ago

@dark-samus i don't think they have a hacked 3ds

ghost commented 6 years ago

@dark-samus I don't have a modded 3DS, so I can only use .nds flashers. Sorry :/

pixel-stuck commented 6 years ago

ah, well, I can compile a DS version :)

pixel-stuck commented 6 years ago

@jason0597 trying to compile your version I'm getting an error, which makes perfect sense, I'm just not sure how it made it to git or if I'm missing something here...

ntrboot_flasher_nds/source/menu.cpp:122:4: error: 'breakCondition' was not declared in this scope breakCondition = true;

EDIT: looks like this commit just forgot to remove it: https://github.com/jason0597/ntrboot_flasher_nds/commit/7c5a8bf967f1851d2d99d6542a637db95c2b8ad3 probably just a return, huh?

pixel-stuck commented 6 years ago

@zacchi4k whenever you're ready... Do NOT attempt to restore the flash or inject ntrboot yet, this should just read flash.

ntrboot_flasher_nds.zip

jason0597 commented 6 years ago

@dark-samus ah yes that was a bad commit, i'll fix it now silly mistake

pixel-stuck commented 6 years ago

@jason0597 I usually run all my commits through a "make" before pushing to git, catches a lot of silly mistakes ;)

jason0597 commented 6 years ago

@dark-samus how did you get your binary to be so small? it's 50kb smaller than the one i make

pixel-stuck commented 6 years ago

@jason0597 possibly using an outdated version of dkP

ghost commented 6 years ago

@dark-samus It still says flashcart setup failed, Here's the log Could it be that the chip ID changes every time you boot the card??

pixel-stuck commented 6 years ago

@zacchi4k yeah, it probably is a DSTTi rather than just a DSTT... Might need different code to support it tbh.

ghost commented 6 years ago

So support shouldn't be excepted anytime soon? What about a separate flasher designed for this cart (or all DSTTi and clones?) which ignores the chip ID?

pixel-stuck commented 6 years ago

Well, likely the chip ID will still be important, it might just be that we need secure init or something.

On Thu, Dec 14, 2017, 4:39 PM zacchi4k notifications@github.com wrote:

So support shouldn't be excepted anytime soon? What about a separate flasher designed for this cart (or all DSTTi and clones?) which ignores the chip ID?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/ntrteam/flashcart_core/issues/115#issuecomment-351843797, or mute the thread https://github.com/notifications/unsubscribe-auth/ADd1uAdSXIzmgXDxvf1WgXkjH1cEmwKLks5tAZV4gaJpZM4Q8Ilm .

ghost commented 6 years ago

I managed to mod my 3DS with another flashcart, and I was able to dump the cart with both twopassdump and GM9

Here's the twopassdump dump (the dumper shows raw_chipid: FC2 even when dumping the cart multiple times), and here's the GM9 dump