ntrteam / flashcart_core

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

DSTT/TTDS Issue Tracking #56

Open handsomematt opened 7 years ago

handsomematt commented 7 years ago

Instead of making new issues for each DSTT flashchip, post in here if you have an unsupported flash chip or one of the support flashchips doesn't work for you.

You can find a list of supported/unsupported flashchips at the top of this file: https://github.com/kitling/flashcart_core/blob/master/devices/dstt.cpp

When posting about an unsupported flashchip, please provide the flashchip ID (from /ntrboot/ntrboot.log when using the latest release) as well as a picture of the flashchip on the PCB.

Chips that 100% work and are tested:

rashevskyv commented 7 years ago

DSTWO

Hi there! This one is seems to be clone of DSTT too. Photos in attach Link to fw on mega - https://goo.gl/EGPncX

Images (Click to Expand)

![img_5739](https://user-images.githubusercontent.com/18294541/30122287-9c1cd7d0-9336-11e7-874c-74995d09838c.jpg) ![img_5740](https://user-images.githubusercontent.com/18294541/30122285-9c19f88a-9336-11e7-8aac-08e3166ab583.jpg) ![img_5741](https://user-images.githubusercontent.com/18294541/30122286-9c1c5530-9336-11e7-8672-6e4b98418b41.jpg) ![img_5742](https://user-images.githubusercontent.com/18294541/30122288-9c216962-9336-11e7-98cf-b12ebfeecc21.jpg)

kingmercian commented 7 years ago

DSTT 0x9560

Chip: Intel 28F160B3T ID: 0x9560 Datasheet: http://pdf.datasheetcatalog.com/datasheets2/31/311549_1.pdf

Images (Click to Expand)

![img_20170906_195618 jpg 2017-09-06 8 pm-01-05](https://user-images.githubusercontent.com/680177/30129558-356c8956-933e-11e7-91c9-71c405cd7666.png) ![img_20170906_195546](https://user-images.githubusercontent.com/680177/30129557-356776fa-933e-11e7-9605-8b0cf5f44895.jpg)

kan-kan-mikan commented 7 years ago

I've got one with an M28W160-A chip. I couldn't find pretty much any information about the chip and I only saw 2 places that even sold them. I swear the datasheets for this one just don't exist anywhere.

Images (Click to Expand)

![20170906_201951_noexif](https://user-images.githubusercontent.com/16636846/30140677-46d4c7b6-9344-11e7-9db3-912563a5e4da.jpg) ![20170906_202237_noexif](https://user-images.githubusercontent.com/16636846/30140678-470dd876-9344-11e7-93f2-17c1ada95a6a.jpg)

It seems like this chip is just a complete unicorn and there isn't really any information about it.

EDIT: I actually went and checked DSTT's official program to check for fake carts or not despite knowing this was a genuine cart. It outputted that the chip is an M28W160(B)B instead of an M28W160-A strangely.

WhoIsCo commented 7 years ago

ATMEL AT49BV1614T http://www.alldatasheet.com/datasheet-pdf/pdf/56174/ATMEL/AT49BV1614T.html

DSTT Flash Checker 0.01

unknown device : 0000C21F
Good!! (^^)v

https://s26.postimg.org/5kdhcufx5/WP_20170831_22_41_06_Pro_2.jpg

LukeZGD commented 7 years ago

DSTTi

A DSTTi that I have.. Also here's a datasheet that I found for the TE28F320: http://html.alldatasheet.net/html-pdf/112565/INTEL/TE28F320/3134/20/TE28F320.html

Images (Click to Expand)

![img_0404](https://user-images.githubusercontent.com/26163116/30204316-97a922d0-94b7-11e7-9449-febb20b51d68.JPG) ![img_0405](https://user-images.githubusercontent.com/26163116/30204320-9da87244-94b7-11e7-8328-dea589e0447a.JPG) ![img_0406](https://user-images.githubusercontent.com/26163116/30204323-a28bf9f2-94b7-11e7-8d9d-75ff2df58ef1.JPG)

EinyWf commented 6 years ago

Another one: SPANSION S29JL032H70TFI03

Images (Click to Expand)

![chip](https://user-images.githubusercontent.com/31015886/30337478-b0066b4c-97e8-11e7-8272-3f08698d3474.jpg)

I can't find the datasheet

pixelmasher commented 6 years ago

I thought my card was supported, but it's not. It's missing a "T" compared to supported card. ATMEL AT49BV802A-70TI

It says dump is fine, but it gets stuck on injecting NTRBootHax or restoring. It says reading 99% and stays that way. It didn't produce any log files using 0.3.0 of ntrboot_flasher.

https://i.imgur.com/7gT0jPs.jpg https://i.imgur.com/jt0Cfzx.jpg

http://www.alldatasheet.com/datasheet-pdf/pdf/98413/ATMEL/AT49BV802A-70TI.html

gunsamurai commented 6 years ago

Intel 28F160B3T reporting in. Basically the same situation as above - ntrboot_flasher is stuck on 99% reading, log file in /ntrboot is empty. Flashcard working normaly afterwards (I presume untouched)

kitlith commented 6 years ago

Anybody having the issue where it's getting stuck at 99%, please try this debug build: <didn't work, see below>

It should produce a large log file. (only reason the current release doesn't is probably because I wasn't fflushing every line because that seems like it'd be slow but if it's needed then... fflush did nothing) Please don't try to embed it directly in a github comment, please either use https://hastebin.com or a file upload service like https://up1.secretalgorithm.com/.

pixelmasher commented 6 years ago

@kitling tried injecting with the debug version, got stuck at 99%. Left it for 30 minutes to an hour, came back, turned it off, and booted into GM9. There was a 0 byte log file. When I copied the debug version, it was the same size as 0.3.0. Not sure it's supposed to be the same size or not.

kitlith commented 6 years ago

Yeah, that seems to be the size it's supposed to be. (there's some alignment padding in there, I think)

Um. ugh. I'm starting to think that maybe I need to fopen and fclose for every single line. I don't like this.

kitlith commented 6 years ago

@pixelmasher Try this build. It opens and closes the file every single time. https://up1.secretalgorithm.com/#3Ai8X-28PPWGVysaMqmDUg

gunsamurai commented 6 years ago

@kitling Tried last build, here is the log - https://hastebin.com/hinesecego.md

kitlith commented 6 years ago

10 lines? that's it? Something's not right.

EDIT: it does tell us one thing: it's reading just fine for you, but getting stuck on erase. why aren't we seeing the individual read/erase commands though...

EDIT 2: because I didn't add logs for every one. the logs that are there are exactly what's supposed to be there.

EDIT 3: I think it's probably getting stuck here: https://github.com/kitling/flashcart_core/blob/master/devices/dstt.cpp#L213

Valkry commented 6 years ago

As kiting suggest me, i post my issue here. I have a dstt with a chip 0x9389: INTEL 28F800B3B. I never can be flashed before, but with the new 0.3 ver build works but stuck at 99% when i try to inject ntrboot. So i ran the debug tool posted by kitling and i will post the log here. I hope that this help to improve this amazing tool and thanks in advance again ntrboot.log

m1n6m1 commented 6 years ago

I have a M28W160-A like @DrEvilBrain , the card is now compatible but remains stuck reading 99% when injecting ntrboot.

Images ![img_20171004_160814](https://user-images.githubusercontent.com/26028733/31180427-dffe5f7a-a91e-11e7-81ca-6188e21736cd.jpg) _For some reason the sticker in upside down?_ ![img_20170918_213349](https://user-images.githubusercontent.com/26028733/31179627-bc06561a-a91c-11e7-9fec-899945bf8b04.jpg)

Last build logs: https://hastebin.com/aqepuyiqag.md

handsomematt commented 6 years ago

So the issue is pretty much here like @kitling said: https://github.com/kitling/flashcart_core/blob/master/devices/dstt.cpp#L212

I never finished the error checking code in the erase blocks function, but sometimes erasing simply wouldn't set the bytes to 0xFF and something different.

Proper error checking and debugging needs to be added there.

kitlith commented 6 years ago

At the very least, we need time-outs so that we don't infloop and get stuck forever. (probably an error return if the timeout has to trigger.)

TobiX commented 6 years ago

I uploaded a test build with @HandsomeMatt's recent fix (#73) included, if anyone wants to try: https://up1.secretalgorithm.com/#XyfwMMe60Cx6bZdx9zjFQg (works for me)

Valkry commented 6 years ago

I tried the new compiled version and now stuck at 0% the chip is a 0x9389: INTEL 28F800B3B

Images ![error](https://user-images.githubusercontent.com/32499708/31318947-03fca6a6-ac31-11e7-9982-58ec77d15828.jpg) ![ttds](https://user-images.githubusercontent.com/32499708/31319013-ecec4c22-ac31-11e7-8a74-d90943090d1b.jpg)

no log created by the way but i can create a backup of the card without a hassle

I found the datasheet for my chip, so i upload here 311549_1.pdf

TobiX commented 6 years ago

@Valkry I suspect at 0% erasing? Try this build to (hopefully) get a log file: https://up1.secretalgorithm.com/#jc6eivAFCn83kXGKBUDBVA - You should be able to enable debug logging from the main menu (press Y, runs much slower, since that creates a lot of log output)

gunsamurai commented 6 years ago

Tried this build (Intel 28F160B3T, stuck at 0%) - here is the logfile - https://up1.secretalgorithm.com/#j9kenS_p7TW-thuxilIsRg

Valkry commented 6 years ago

@TobiX yeah, it stuck at 0% erasing I was able to create a logfile, but is very big... Anyway here is my log, I hope that this help... ntrboot.log

pixelmasher commented 6 years ago

@kitling I finally got to try the build you posted. It produced tiny log files. I tried injecting and restoring. Left them stuck at 99% for about 10 minutes+.

ntrboot-restore.log ntrboot-inject.log

handsomematt commented 6 years ago

I don't think that build is up to date, the log file should be saying:

logMessage(LOG_DEBUG, "DSTT: erase_block(0x%08x)", offset); instead it's just saying erase(0x%08x)

Download Build - tested with my device this build works fine and is the latest on git.

MiiJack commented 6 years ago

I have this R4 which is a DSTT clone, it only works after using TTDS Stage2 Launcher made by Apache Thunder. It cannot be updated, and I don't know where to look the datasheet. GM9 Dump.zip ntrboot.log The R4

handsomematt commented 6 years ago

@MiiJack DSTT: Flashchip ID = 0x20504f54 - basically the interface to the flash chip doesn't exist like it does on the DSTT chips, so whilst it may be a clone in the sense that it runs the same software, the FPGA is different and doesn't support flashing the flashchip.

Valkry commented 6 years ago

@HandsomeMatt I tried your build and this is the log created ntrboot.log

herrfridolin commented 6 years ago

Is the Micron 0x922c which requires a different flash method going to be supported (soonish)? Is there more information you need like a dump,log file or something like that?

pixelmasher commented 6 years ago

@HandsomeMatt I tried your build from couple days ago. It gets past the 99%, but gets stuck at 0%. Still gives tiny log files. ntrboot-inject.log ntrboot-restore.log

spwnrpe commented 6 years ago

Hi, I realize that I'm (perhaps) a bit late to the party, but I'd like to post pictures and a backup.bin of my (stock) r4i-shdc.com R4 3DS WiFi RTS (B6-v2.7) if that can help you out. I hope that's okay?

I post in this issue as I've understood my cart to be a DSTT clone as per the comment made by a contributor in #14

Images (Click to Expand)

![r4i-sdhc com_-_r4_3ds_wifi_rts_ b6-v2 7 _1](https://user-images.githubusercontent.com/32732738/31488783-2539d4ae-af3f-11e7-87fa-05094e0e15d8.jpg) ![r4i-sdhc com_-_r4_3ds_wifi_rts_ b6-v2 7 _2](https://user-images.githubusercontent.com/32732738/31488784-25553be0-af3f-11e7-87e5-1bed8eec4eaa.jpg) ![r4i-sdhc com_-_r4_3ds_wifi_rts_ b6-v2 7 _3](https://user-images.githubusercontent.com/32732738/31488786-256fac1e-af3f-11e7-9460-419f9c7dbc2d.jpg) [r4i-sdhc.com_-_R4_3DS_WiFi_RTS_(B6-v2.7).zip](https://github.com/kitling/flashcart_core/files/1378769/r4i-sdhc.com_-_R4_3DS_WiFi_RTS_.B6-v2.7.zip)

Just delete if not valid.

spwnrpe commented 6 years ago

Perhaps should have mentioned that the ntrboot.log is in the zip as well. As for flashchip id I guess this is what you mean? [DEBUG]: Read chipid = FFFFFFFF

handsomematt commented 6 years ago

@spwnrpe that's not a DSTT clone - where did you get the backup.bin? what tool did you use to dump it.

spwnrpe commented 6 years ago

@HandsomeMatt I used the ntrboot_flasher build posted @ gbatemp, here: https://gbatemp.net/threads/r4i-b9s-flashcart-tested-and-impression.484620/page-18#post-7630718 (chose R4i SDHC RTS Lite)

I also compiled ntrboot_flasher by myself a couple of days earlier to see if I could get a log out of it... by trying as a DSTT clone. But that didn't work ^^

Interesting... I went by the comment made by a contributor in issue #14 (Contributor Edit: If your cart has "RTS" on it, it is not this cart, it is a DSTT clone and should be discussed in #56)

So the R4 3DS WiFi RTS (r4i-sdhc.com) isn't a DSTT clone? Where does that leave it? The B9S-mess (from the gbatemp thread) only deals with the B9S cart or are they "the same" on the inside?

spwnrpe commented 6 years ago

Also, should I make a separate thread for my cart? Or just re-post the images/zip in some other already existing thread, like #14 ?

kitlith commented 6 years ago

hm. I had gotten the impression that it was a DSTT, guess it wasn't and I'll remove that note.

go ahead and create a new thread, just make sure that there isn't any thread already talking about the WiFi RTS.

wait you got a sucessful backup from the build I put on gbatemp, you should put whatever it is in the corrosponding thread here. (not taking the time to find it right now, sorry.)

spwnrpe commented 6 years ago

I haven't seen/found any issue concerning the R4i 3DS WiFi RTS (just the non-rts and a bunch of revolution/update carts), is the non-rts and the rts the same? If not, then a new thread is the way to go?

In any case, since I have an Acekard 2i and a O3DS with B9S I'm not exactly afraid to experiment with this cart ^^ I've started a second dump using the ntrboot_flasher from the gbatemp thread in my O3DS (in debug log mode) to compare to my first backup.bin, one question on that by the way: Is the counter in the lower screen (reading nor) supposed to stop at 99%? The upper screen states that the dump is completed.

And a final question, most issues in this project states their carts hardware revision and flashchip id, can be obtained from the ntrboot_flasher's ntrboot.log? or? I only seem to be able to read out "[DEBUG]: Read chipid = FFFFFFFF"? Where does one find the hardware rev.?

If pointed towards backup dumps from B9S carts you'd like me to test/flash to my R4i 3DS WiFi RTS I'd try it.

spwnrpe commented 6 years ago

For example, is this dump something I should try? https://gbatemp.net/threads/r4i-b9s-flashcart-tested-and-impression.484620/page-21#post-7632969

pandavova commented 6 years ago

Well, you could try it. But first get a backup with https://gbatemp.net/attachments/ntrboot_flasher-zip.102456/ of your card. Just use it only if you really have the same card as in here: https://github.com/kitling/flashcart_core/issues/14#issuecomment-324944317

spwnrpe commented 6 years ago

I've got backups of my cart (diffed, identical), but not the same card (I think) as #14 as it is a R4i 3DS WiFi and not a R4i 3DS WiFi RTS as I have... unless they are in fact one and the same?

pandavova commented 6 years ago

Do you have a pic of your card? Or can you just make some pics? (The chips are the important part)

spwnrpe commented 6 years ago

Scroll up a bit?

Edit: https://github.com/kitling/flashcart_core/issues/56#issuecomment-336071138

pandavova commented 6 years ago

Oh sorry. These are the same chips, so it SHOULD work. EDIT: It is basicly the same card.

spwnrpe commented 6 years ago

No worries @pandavova, there are lot of comments ^^

So if I'd flash your B9S backup to my R4i 3DS WiFi RTS I'd have a B9S (ntrboot)? I'd rather use the tools developed by @kitling directly then indirectly through the r4i-shdc team... but ntrboot_flasher cant inject ntrboot on the R4i 3DS WiFi RTS yet?

Let me know what you think!

pandavova commented 6 years ago

You can wait or try it. From the point of view it should work. I would try it. If you can wait/ want to wait, then you should wait. And yeah, ntrboot_flasher cant inject ntrboot right now.

Valkry commented 6 years ago

hi i tried the new version of ntrboot_flasher and keep stucking at 0% when try to erase the flash here is the log of the fail injection ntrboot.log

zestyoranges commented 6 years ago

Same exact problem as Valkry above

Butchkin commented 6 years ago

I have also the 0x9389: INTEL 28F800B3B and i am trying to flash via my dslite and ak2i_ntrcardhax_flasher.nds ver.3.3 stuck at 0%erasing blocks when i eject the flashcard, it jumps to 50% and immediately to writing 0% then i put the flashcard with the sd inside into the ds and he starts writing until 100% very slowly at the end he said finished and when i press (a) he sends me back into the menu with (a) inject and (x) restore

dafuq happened? PS: where do i create/find those log files? i am a Greenhorn to all this stuff here

TobiX commented 6 years ago

@Butchkin ak2i_ntrcardhax_flasher cannot write logs. Ejecting the flash cart while the process is running may result in random errors, in the best case nothing happens, in the worst case you brick your cart...

borkenstyler commented 6 years ago

Has there been any news about this issue ? Facing this problem myself with a TTDS Flashcard.

TTDSFlashCheck reported: "ST M28W160(B)B" which has been reported here before. Already tried the current version of flashcart_core in a self compiled ntrboot_flasher but it still gets stuck at "Injecting ... 0%".