gc-memcard-adapter
gc-memcard-adapter copied to clipboard
Using a memory card socket instead of soldering?
Could this be used by soldering to a memory card socket salvaged from a GameCube instead? This way, it could presumably be used across multiple memory cards without needing to solder each.
Yes, soldering the wires directly to the pads like in the blog post mainly helped with sniffing the SPI traffic when the card was plugged into the GameCube. I bought a spare GameCube board to remove a memory card slot recently to work on issue #2, but I haven't gotten around to setting it up yet.
I’m guessing the answer is yes, but have you used the GameCube SDK to troubleshoot? I know there are libraries and a memory card utility, which somebody that’s smarter than me could probably find useful 😄
Could this be used by soldering to a memory card socket salvaged from a GameCube instead? This way, it could presumably be used across multiple memory cards without needing to solder each.
It's definitely doable and got it working yesterday. The port is pretty hard to get desoldered though since the shield pads are on such a large ground plane, and even with a mix of solder sucking, chip quik, and elbow grease I broke one of the two ports.
I'm working on a kicad library for it though, probably will be done in the next week or so, with the boards prototyped within the month.
That’s very promising. I’d love to hear updates on that PCB. I’m not sure if it’s the case with all 3rd party memory cards, but in my experience they have a generic serial number (or whatever the ID is) whereas official ones have unique IDs. So for example if you name a RAW backup in GCMM, it stores that identifier and only allows you to restore that RAW dump to that’s specific memory card. I don’t know if that’s been brought up or documented here yet, or if it’s even relevant, just thought I’d bring it up since you have a few 3rd party memory cards there.
It's something that I've been working with, and truth be told the two 3rd Party memory cards no longer work, however that is after reading with a fork of this repo. I'm not sure if it's because I hooked up something wrong, or if I just soft bricked them, but I haven't had the time to investigate yet and I ended up breaking one of the pins on the port I extracted so I have to wait for the replacement broken boards to come in to extract more ports.
Realistically I'm not super concerned with the mismatch on memory cards. At the end of the day, a savefile is just a gci file, so a header and blocks, and the data is the same no matter the memory card, just with potentially different addresses. So long as those blocks can be copied over, with the header, then a save can be programmatically copied over, which I believe they can be. I've already written out a parser to deal with the headerfile and blocks, to extract gci from gcp, and so right now my workflow is to pull down the gcp from the memory card, rip out the gci, and then the part I'm writing now is to write the gci back to a new memory card. Part of that has to deal with taking the raw file from Card A, pulling the gci out, then taking the raw from Card B, and rewriting the sections of Card B to include that gci before writing back out to Card B.
I'll reach out with updates on my kicad module when it's done. I plan on having it be open source for anyone to use, and if you want to wait for me to order it off of Oshpark for the breakout board, I'm more than happy to order extra if you want one.
@jamchamb I'm not sure if you have any interest in this project still, since you started it so long ago, but lmk if you have any interest here. If you wanted to pick the project back up, I could probably see about sending you a port along with a breakout board. One of the roadblocks I need to resolve has to do with understanding third party card support. I can always buy more cards, and I will, but just bricking them at $20 a pop isn't a good idea long term 😂
@DeadlySurgeon I’m def interested in one of those boards. Have you checked out JLC PCB before? I ordered a handful of boards from there and with a promo for first time purchases, it was almost free!
I have a bunch of OEM 59 block memory cards. The shells are in cosmetically poor condition, but the boards work flawlessly. I’d be happy to send you a few if you cover shipping.
I have ordered JLC PCB before, but I'm more a fan of oshpark since I know some of the staff there. I'm not super concerned with the state of the shells since I can just 3D print new shells. With the orange memory cards I have, I actually ripped one out and made a shell that has pin headers sticking out, but I am interested in getting some more OEM cards.
Sent an email
truth be told the two 3rd Party memory cards no longer work, however that is after reading with a fork of this repo
Ouch... Sorry about that. This means this code probably killed already 3 cards so far, as my non-official card also died in suspicious circumstances. I assumed I did a mistake with the wiring and electrically fried it, but now that you reproduced it (I can only guess the same happened)... That looks very bad for my code. I am afraid to think at what may be going on in these unoffical cards for them to be possible to logically brick: could they contain a writeable firmware and some overflow bug which would let that be overwritten ?
truth be told the two 3rd Party memory cards no longer work, however that is after reading with a fork of this repo
Ouch... Sorry about that. This means this code probably killed already 3 cards so far, as my non-official card also died in suspicious circumstances. I assumed I did a mistake with the wiring and electrically fried it, but now that you reproduced it (I can only guess the same happened)... That looks very bad for my code. I am afraid to think at what may be going on in these unoffical cards for them to be possible to logically brick: could they contain a writeable firmware and some overflow bug which would let that be overwritten ?
You're good haha. Truth be told I knew I was going to mess up a few things with this project, it's just the cost of it all. I highly recommend that you get another third party card and try your fork again, and then maybe see with an oscilloscope what's going on.
I'm thinking that it was a soft lock, since the LED indicator still turned on and all of the power is coming on as expected. I have yet run it through my own oscilloscope, mainly since I've not had enough time and my focus has been split. I already have a replacement on the way, and if it happens again I'll just try to see what state the main chip is in. I have a sinking suspicion that if the cards get locked if they weren't locked to begin with, it could cause problems, however this is just my gut and from looking at any code, since I haven't had time and Python isn't my specialty. Also as for the 5v line, weirdly enough I've yet see a card that accepts 5v.
Also, the KiCad footprint is mostly completed. I did the most roundabout way of measuring though where I took an overhead picture and converted pixel layout to mm, which somehow worked? I'll be sending a breakout board to the fab in the morning, and will respond back here with the results. If it turns out well I'll publish the module. Still early and not cleaned up so ignore the fact that pins 13-16 are not just listed as mechanical connections/shield.
Sent off to the fab. Grabbed enough of them to mail out one or two. Will post updates. Feel free to double check my pins, however I triple checked them and I'm pretty sure it's right.
You're good haha. Truth be told I knew I was going to mess up a few things with this project, it's just the cost of it all.
Thank you for your understanding.
I have some news: I pulled my card out of the pile of broken stuff where it lived for more than a year, plopped it in my gamecube, booted into the firmware, and I could format both banks, and kind of copy some files in both. "Kind of", because the files on the second bank disappeared after I unplugged the card. Then I booted into swiss-gc, which uses AFAIK the libogc2 library to access memory cards. It could see the content of the first bank, then could see the second one empty. Then I tried to copy the same files to the second bank, and it failed. After a few tries, I unplugged and replugged the card, and the button would not swap banks any more. I removed the card, rebooted the console to the firmware, plugged it in and it was visible again and I could switch banks.
So, there may be hopes that those bricks are somehow reversible: the card stays dead for some cases of power cycling, but resurrect after others.
FWIW, the flash chip on my card is an ST NAND256W3A2BNE, a 256Mb TSOP NAND flash with an 8bits bus width. It was definitely sanded (but not well enough), and re-marked with huge "91106" and "SCX" (possibly before the sanding). /WP is tied high.
I looked a bit around for hints of what the MCU could be, as I cannot read anything on it (this one has either been never marked or thoroughly sanded). It is a (T ?)QFP48, with XTAL on pins 11 and 12. The crystal oscilator is marked with "50", which should be in MHz but I do not find yet an MCU which accepts 50. 48 MHz, I do find some.
The 5 pads on the edge of the PCB (not the memory card connector) are connected to the MCU:
- GND
- 19
- 41
- 28
- 33
MCU power pins are:
- VCC: 6, 22, 27
- GND: 7, 21, 32
MCU - memory card interface are:
- CLK: 25
- CS: 6
- DO: 24
- DI: 23
- INT: 3
And, without surprise:
- 3V3: VCC
- 5V: n/c
- GND: GND
Some Flash - MCU connections (because this is way too fiddly to probe everything for continuity) are:
- IO0 - 44
- IO1 - 45
- IO2 - 47
- /E - 37
Hopefully it can help narrow down what MCU this may be, and maybe allow probing deeper - and maybe extracting the firmware ?
Overall:
- I could reproduce the issue on the console itself, using homebrew which should be using the code I ported to python
- ...but the firmware and/or time somehow cures the issue.
Got back the boards from the fab. The kicad footprint I uploaded fits well if anyone cares to use it. Desoldering a memory card port is still a bit tricky, however it is doable and now there is a footprint to make custom boards. My plan is to combine the footprint with a rp2040, and try to deal with the SPI code through that IC to be able to interact with the memory cards.