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 SDHC Dual-Core 2017 (r4isdhc.com) #137

Open YellowLemon571 opened 3 years ago

YellowLemon571 commented 3 years ago

Latest R4i SDHC Dual-Core firmware

Images (Click to Expand)

![](https://i.imgur.com/RVnj3S9.jpg) ![](https://i.imgur.com/4x0vSN4.jpg) ![](https://i.imgur.com/FLEUPHE.jpg)

GM9 Untrimmed Dump: [BOMBERMANLND_ABXK01_00.zip](https://github.com/ntrteam/flashcart_core/files/5744134/BOMBERMANLND_ABXK01_00.zip) This is the only log I get when attempting to use ntrboot_flasher: [INFO]: r4isdhc.hk: Init [DEBUG]: resp1: 0x03a000ff, resp2: 0x03a000ff [INFO]: r4isdhc.hk: Current Software Revision: 6b396bda I'm having issues using ntrboot_flasher with my cart. Their page told me to come here for cart-specific issues so here I am. I've successfully used ntrboot_flasher a couple of years back but now it simply refuses to work with my cart. Every time now it will freeze for at least 30 seconds then tell me my flashcart is not supported. I've tried each option in the menu, including the one that's obviously for mine. I can confirm that the flashcart still functions with official firmware. I've even used it for ntrboot a good few times in the past. I assume using ds_ntrboot_flasher would work, except I need ntrboot_flasher to restore the cart's original flash so I've held off on trying. Is there anything I could do to resolve this? I'm really hoping I don't need to get a new cart.
YellowLemon571 commented 3 years ago

Forgot to clarify something: When using the R4i SDHC Dual-Core option in ntrboot_flasher, it will freeze indefinitely. Every other option will freeze for 10 to 30 seconds then tell me my cart is not supported.

kitlith commented 3 years ago

well, the reason it's not listing as detected is because that's a weird value for software revision, and doean't even look similar to the versions we're familiar with and have written code for. (https://github.com/ntrteam/flashcart_core/blob/master/devices/r4isdhchk.cpp#L64-L78 and etc.)

the swrev looks maybe ascii-ish, but isn't actually ascii (k9kÚ), perhaps it's just a random part of flash for some reason.

what's weird though is that you're not getting the unsupported software revision string in the log, though I think i understand at least why it's taking so long: https://github.com/ntrteam/flashcart_core/blob/master/devices/r4isdhchk.cpp#L206-L209 defines an unbounded loop while it waits for the value of a command to settle. apparently it's taking a long time to settle for you?

we could try hacking up a build to read/write a backup to the cart anyway but it seems like it's already behaving strangely and i wouldn't be able to make any guarantees of it working or not.

EleventhSign commented 3 years ago

It is indeed weird you are not getting an unsupported error message there. Anyway, yours is r4isdhc.com so it won't work with the "R4 SDHC Dual-Core" option because it's a totally different cart and PCB. This option is only for r4isdhc.hk carts so this sadly straight up won't work.

kitlith commented 3 years ago

oh right, this is an r4isdhc.com, and the other stuff i was looking at won't apply at all. okay.

I think we've encountered similar carts before? But I don't remember what issue they were covered by. All I've been able to find so far is an issue where I claimed we "added support for a bunch of r4isdhc.com carts", but i don't know/remember if that included the dual-core variants.

EDIT: Yeah we list support for these carts in the README, I just don't remember what option they fall under.

YellowLemon571 commented 3 years ago

The only option that includes r4isdhc.com is R4i SDHC Family, although it doesn't include the Dual-Core in the description... I'll probably just consider getting a different cart whenever I get the money for it.

kitlith commented 3 years ago

My only remaining comment is that it may be prudent to try older versions of ntrboot_flasher, in case there was a regression in functionality between versions. I also have a bit of a hard time believing there are absolutely no logs being generated in the other cases, are you checking the log file on the sd card?

YellowLemon571 commented 3 years ago

I have some interesting news. After a couple more attempts and re-insertions, I managed to get a successful dump of my cart's flash. The only problem now is that even though the R4iSDHC Family option seems to work now, attempting to restore the flash fails.

This is the log for the dump: ntrboot_dump.zip

But this is the only log I get when attempting to restore: [ERROR]: r4isdhc: found type 1 cart

What does this mean? Is it just a matter of perhaps cleaning the cartridge or the slot a little then trying again?

kitlith commented 3 years ago

So... i think that message is supposed to be an INFO rather than an ERROR, because that's from the end of the initialization routine, right before returning successfully. That's unrelated to any issues from restoring, which you should also be getting log messages for when it fails. What is your process for determining that something is the "only" logs output for a certain run?

i haven't been able to look at your logs yet because apparently what I have on my phone does not like 20MB text files. maybe later.

YellowLemon571 commented 3 years ago

I've just attempted restoring three times using INFO, DEBUG, then ERROR logging. The only log I could get out of the attempts is the same previously-mentioned line. In case it helps, it also says "Checking 001F0000" when it fails.