Follow updates on Twitter using #ctrUSB


[Update Sep 26th, 2018]

I was able to write some bits to the SPI flash on Lego Starwars cartrdige, and the data got corrupted and the game did format the flash and resaved the data again. Which is very good news, I’m still not able to read from the Flash yet, but I’m almost there.


The USB cartridge is a project I’ve been planning for a long time, it’s basically a custom cartridge that has a micro USB port at the end of it and it will enable us to do data transfers to and from the 3DS, of course for those who are fortunate enough to have homebrew installed.

The planning for this project took more time than I thought it would, it’s very complicated to achieve, as there’s no built-in USB port or controller in the 3DS, but looking at the structure of the cartridge slot we can see multiple data pins, I’m using this amazing reference from 3dbrew.org those data pins specifically the ones related to the savegame chip 13 through 16 can even do SPI which a very good news.

The first approach

My first approach to the project was a very n00b like approach, I thought it would be very easy to directly tap into those pins using the APIs from DevkitPro, but I think I was wrong, as the APIs for the gamecard slot are very specific and won’t give us direct access to the physical pins, I was planning on sending data through the slot, and having a breakout cartridge with a USB port on the other end of it and do standard SPI and use the USB port to redirect the data to a serial terminal and view the data there. Which I think isn’t possible.

That one that might work

Looking at libctru filesystem services APIs I can find few methods that directly relate to the gamecard, all of them are gamesave related.

The API is all based on SPI connection between the device and the SPI Flash (NOR Flash) chip on the card, which might be the answer to all this, I think there’re two ways to use those APIs and the NOR Flash chip for the project.

I was able to use the CARDNOR APIs to write and read from the cartridge NOR Flash on LEGO Starwars 3 cartridge, and by looking on the internet I found multiple SPI Flash chips identical to the one 3DS cartridges use, so if I put one on a breakout cartridge board, and get a homebrew application to write data to it successfully this could be the answer to all this fuss that I got.

See from what I understood from those APIs, the savegame and SPI Flash are using specific FS structure (I may be wrong about this), so what will happen if I use the SPI Flash as a buffer, write all kinds of data to it temporarily and use another controller chip to forward that data to the USB port in a protocol that we can use with computers and then empty that SPI Flash just like a buffer, which may allow us to transfer files or even do screen video capturing,

All of the above is still theoretical, and I’m trying my hard to take as much time as possible from my evenings after work to debug this and get results, I did also order some flash chips and designed a debugging cartridge to use in this project.

You can find the debugging cartridge eagle files in here https://github.com/AhmedTheGeek/3DS-Gamecard

I’m by no means an expert in electronics nor 3DS development, I’m just a curious guy who loves to experiment, so if you have a better idea on how to do this, please let me know.

I’ll keep posting updates on this project as I make progress, so it would be nice to have a short name for it, so if you got an idea for a cool short name please write it in the comments.

a problem that I faced when I migrated my website from HTTP to HTTPs, is losing all my old likes on my posts, which left the website looking a bit dull and with no interactions at all. a lot of people contacted me about this issue, and I’ve always had no fix for it, you just have to wait to get new likes.

 

But today I found a solution for this issue, not the best of solutions, but it does solve the issue, and I published an update to my plugin “PressGraph Facebook Like” with a new feature named “HTTPs  Migration Mode”.

After installing the latest version of the plugin, head to “Dashboard -> PressGraph -> Enable HTTPs Migration Mode” and check the box, save the settings, and all your old likes should be back just like that!

 

There’s a con to such a solution, it will still place the likes on the “old non-https URL” for some people that won’t be a problem, but you should know what’s happening in the background.

 

Enjoy your old likes!

I’ve always wanted a pet, one that could add bit more interaction to my dull life. But I was never a cat person, and I have issues with owning dogs.

My mum always thought that having a turtle is the best choice, but I didn’t want a turtle, not because I don’t like ’em, but because they’ll keep hiding in places that I cannot reach and they’ll keep peeing on my floor, which was not a choice. But in my busy mind, I always thought that “fish” is the best pet to keep, and the easiest to take care of. “totally oblivious of what will come in the future”.

Continue reading “and one day, they all died”

So I’ve been using the HTC One as my daily driver for the past 6 months, and I’ve gotta say, it was great experience, and a seamless transition from iPhone/iOS.

Mine came with JB 4.3 installed and sense 5.5, and of course it was the Asian Unlocked version from Tiwan, since it’s the only one available in Egypt. I loved the sense UI the blinkfeed and everything, but i was waiting impatiently to update to KitKat, and HTC were very slow to publish the update, i waited until the end of Jan to the mid-feb, and still got not update.

Continue reading “HTC One from GPE to Sense 5.5 [Experience/Tutorial]”