Tuesday, June 25, 2013

MemCARDuino

For a while now I wanted to make Arduino based Memory card reader.
There are already number of ways to read a Memory Card (LPT playsaver, DexDrive, PS2 with uLaunchELF, PS3 with Memory Card adapter, etc...) but getting another alternative can't hurt, right?

Anyway, to build this reader you will need Arduino (or compatible board),
connector for Memory Card, wires and a soldering iron.

Please visit official MemCARDuino github page for information on how to build your own adapter.


67 comments:

  1. hi, i saw your program and wanted to build it too.
    but it seems your program is not compatible with Arduino mega, which is the only Arduino i own :(
    would you be able to get it also to work on an arduino mega?
    I actually tried it myself, it seems only the used pins are different, but it does not work.
    i hope you can get it to work so i can play around with my pocketstation with it :)
    thanks

    ReplyDelete
    Replies
    1. Hi.

      Yes, it seems like Arduino mega has way more pins then nano board I worked with.
      But it shouldn't be too hard to change the source and make it compatible.

      I'm using SPI communication pins which are:
      10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK) on nano but
      53 (SS), 51 (MOSI), 50 (MISO), 52 (SCK) on mega.

      You will need to edit "Define pins" in the source and then connect Memory Card to those pins.
      #define DataPin 50 //Data
      #define CmdPin 51 //Command
      #define AttPin 53 //Attention (Select)
      #define ClockPin 52 //Clock
      #define AckPin 2 //Acknowledge

      Acknowledge pin is not that important and it should work without it just the same.

      You will also need to edit "PORTB &= 0xFB;" to "PORTB &= 0xFE;" and "PORTB |= 4;" to "PORTB |= 1;".

      Please let me know if that works for you.

      Shendo.

      Delete
    2. I changed the file according to your suggestion and reconnected everything like it should be, but it does not work :(
      it seems llike the code is somehow correct, but if i try to read out the memory card, it does not work (memcard rex shows that it reads the cardbut stays at 0%).
      Could it be that i do something wrong?
      if you need further information, just tell me and i will supply it to you

      Delete
    3. Can you post a picture of the setup (board itself and wire job to card)?

      Delete
    4. Shendo--
      help me how to do it in the PS2 I have a ps2 can help to Memory card reader, connect it to a computer know that you know the solution for this help me wanna Memory card reader of ps2 connect to a computer and the memory card I install FMCB .. that I need Memory card reader that Alem wire of USB 2.0, so you ride with a computer or somehow otherwise just help me ...

      Delete
  2. [URL=http://www.pic-upload.de/view-22596522/IMAG0338.jpg.html][IMG]http://www7.pic-upload.de/thumb/18.03.14/zivkmfieqej4.jpg[/IMG][/URL]
    here you go, the connection is:
    green: #50
    red: #51
    orange: #53
    yellow: #52
    brown: #02
    the memory connector (from down to up):
    1)DATA
    2)CMND
    6)ATT
    7)CLK
    8)ACK
    Black one is 3,6V, Blue one is 7,6V.
    I dont think there is anything wrongfully connected.

    ReplyDelete
    Replies
    1. Your wiring seems to be alright as far as i can tell.
      Try to change "while((PORTD & 4) > 0)" to while (1)" in source and see if it works then.

      Also, in my tests I had to connect 3.6 V to 5 V line otherwise cards wouldn't work properly.

      Delete

    2. help me how to do it in the PS2 I have a ps2 can help to Memory card reader, connect it to a computer know that you know the solution for this help me wanna Memory card reader of ps2 connect to a computer and the memory card I install FMCB .. that I need Memory card reader that Alem wire of USB 2.0, so you ride with a computer or somehow otherwise just help me ...

      Delete
  3. Awesome, this did the trick :o
    Now it works just fine on my mega :D
    http://www.pic-upload.de/view-22601130/20140319_142021-1.jpg.html

    thank you very much :)

    ReplyDelete
  4. Hi! I'm alex.d93 from psio forum.
    First of all: Awesome project! it's very useful, I backed up something like 4 PS1 MCs using my arduino uno. :P Thank you!
    But..It's possible to replace a PS1 memory card with an SD card? Like this: SD card -> Arduino -> PS1 memory card port.
    It would be a nice project, because:
    1) You can store up to 4000 PS1 memory cards in a 512MB SD card;
    2) You can easily read/write it with an SD card reader;
    3) You can choose which memory card you want to use, just using a push button ,and displaying wich one is selected on an LCD display or using LEDs (optional).

    Have you ever tried to do that? I'm just curious. :P

    Thanks in advance, Alessio.

    ReplyDelete
    Replies
    1. Yeah, I have been toying with the idea.
      If anything comes up, you folks at PSIO forums will certainly know :)

      Delete
  5. This is very cool but unfortunately I can't get it to work. I've triple-checked my wiring, tested all contacts with a multimeter but it just won't work. If I try writing something to the memory card, MemCARDduino is stuck at "Writing frame 1 of 1024" while the RX and TX LEDs on the Arduino Uno blink furiously. Same thing if I try reading. The SPI interface seems to be active but if I use Serial Monitor Deluxe and send GETID or GETVER to the Arduino all I get is \224\\224\\224\\224\\224 as a response. Have you got any suggestions on what might be going wrong or how to troubleshoot it?
    Thank you in advance!

    ReplyDelete
  6. What MemoryCard are you trying this on? Is it first or 3rd party?
    Arduino Uno uses same processor as the Nano board I have so the pinout should be correct.
    224 is 0xE0 which means "error". You need to send 0xA0 and 0xA1 to get correct responses.

    ReplyDelete
    Replies

    1. help me how to do it in the PS2 I have a ps2 can help to Memory card reader, connect it to a computer know that you know the solution for this help me wanna Memory card reader of ps2 connect to a computer and the memory card I install FMCB .. that I need Memory card reader that Alem wire of USB 2.0, so you ride with a computer or somehow otherwise just help me ...

      Delete
    2. If you have FMCB installed then use uLaunchELF to manage your saves.
      If you want to transfer them to PC then copy all the saves from the Memory Card to Mass (USB stick) and use the import feature (raw saves) of MemcardRex to create a .mcr Memory Card.

      Delete
  7. This comment has been removed by a blog administrator.

    ReplyDelete
  8. Hello! I hope you still help with this peace of software..!

    I can't open it in Windows Somehow.. After running a program that can tell me what is wrong it says it is missing alot of DLL files..
    Any Idea why?

    ReplyDelete
    Replies
    1. You need .Net Framework 2.0 to use the software.
      I also recommend using MemcardRex with MemCARDuino.

      Delete
  9. Great project !
    I am walking the guided process, but stuck at "reading frame 5" from card... I am using Arduino nano and Pocket Station. (I also have some 3rd party PS1 memory card but they all stop at "reading frame 1", that's for some other reasons I guess.)

    Pocket Station has a LED on its head, so I can see it lighted when you read from it, it seems just like being reading again and again but without luck.

    In fact I have being trying to read the card using Raspberry pi's SPI controller and struggled a few days, but I can only lit the led on the card, without getting any data ( all zero). I noticed that the memory card does not use standard SPI protocol , it has a ACK line which is ignored by some other peoples' approach , but is handled in this project.

    I'm now trying to use pi as a wave scope (piscope), and tweak this project's code, to get a better wave form and see if it works.

    ReplyDelete
    Replies
    1. Hi.
      I'm sorry to hear that it's not working for you.

      The problem with 3rd party cards may be in the insufficient power supply.
      Try feeding 7.6 V on the pin 3 of the memory card (leave the rest as is).
      Connect grounds together of course.

      As for PocketStation it might be a timing issue.
      MemCARDuino uses ACK but it's very wonky (to the point I think it's actually useless) that's why every command has a timeout value.

      Try increasing the value in the reading loop (default is 150) and see if there is any changes.

      Delete
    2. Thanks for the hint !
      I did not manage to get the data, but I really enjoyed the process. I recorded the process at https://xenotheme.wordpress.com/2015/07/17/reading-ps1-memory-card-using-raspberry-pi-and-arduino-nano/ and tweaked your code at https://github.com/theme/rcard/blob/master/arduino/rcard/rcard.ino

      I tested the irq-handled ACK , they all appears exactly as spec at http://problemkaputt.de/psx-spx.htm.

      I guess the problem is that I can not lower the speed under 250KHz, this is beyond the Arduino Nano's capability.

      Delete
    3. I updated the code. Try it now.

      Delete
    4. I first tried your code but no luck, then I switched to arduino due. Pocket Station still can not be read, but one of my 3rd party card worked. ( debugging with my friend's oscilloscope) I managed to get it's contents, tried several memory card image editor tools and found MemcardRex, ~ You are my hero ~ Hello world, 18 years' old memory :D
      I undeleted several blocks and they worked. But Valkyrie Profile 's save data freezed the game, looking into this issue.

      Delete
  10. Hi, I'd like to create my own MemCARDuino. I'm not good at this stuff so I need your help. I bought Arduino Nano and cables and I'd like to solder it to PS1 pad port. After watching your film from YT I'm confused. Should I solder it to 1 or 2 on my photo http://i.imgur.com/NHDfpf3.jpg because on your film I noticed that you solder it to "2" but there are nine pins, and on you diagram there are 8. Could you mark me clearly on my photo using 1-8 where should I solder cables. An second question by FDTI driver you mean this one? http://www.ftdichip.com/Drivers/VCP.htm Thanks for help in advance!

    ReplyDelete
    Replies
    1. Hi.
      You can connect to the 1st points. I used 2nd because I need all the
      lines for testing other stuff.

      Yes, those are the drivers.

      Delete
    2. As for pinout, #1 is the leftmost one on your picture.

      Delete
    3. This comment has been removed by the author.

      Delete
    4. Ok, I think I did everything according to your hints but it doesn't work. Did I forget about something?

      1. I downloaded and installed this driver http://www.ftdichip.com/Drivers/VCP.htm

      2. I bought clon of Arduino Nano http://allegro.pl/arduino-nano-v3-0-atmega328p-au-16mhz-jak-uno-nowe-i5573341763.html

      3. I soldered it to the PS1 memory card port http://i.imgur.com/QwDskbM.jpg

      4. I used a special adapter to connect cables to Arduino http://i.imgur.com/lAVGKkU.jpg

      5. I installed Arduino and set up like this http://i.imgur.com/fF35Kj7.jpg Then, I chose Verify/Compile and then upload.

      6. The Arduino looks like this http://i.imgur.com/WKkGySh.jpg

      7. I ran MemCard 1.8 - Options/Preferences and set like this http://i.imgur.com/cpBlJfa.jpg

      8. Finally I chose Hardware, read, Memcarduino but I have only this http://i.imgur.com/IyiD3yl.jpg

      I have Windows 8.1 nad used original PS1 memory card. Shoud I do anything else?

      Delete
    5. I attached a debug version of MemCARDuino on PSXDEV forum in the thread you posted.
      You can try it out and post results so I can check what's wrong.

      Delete
    6. Did this get resolved? I tried looking for the forum post but couldn't find it. I think I'm having the same problem (status bar doesn't move at all, as the pic mentioned in step 8.) I also tried sending 0xA0 and 0xA1 over Arduino serial monitor, but all I get back is ⸮⸮⸮⸮⸮ and ⸮⸮⸮⸮⸮

      Delete
    7. Got it working, seems my voltage going into memory card pin 5 was too low (should be 3.6v, my voltage divider circuit was giving around 3.4v without load, which dropped with a card attached). Switched to just having a 270ohm resistor from the 5v rail into memory card pin 5 and it works just fine! Hope this helps anyone with a similar problem. Still get weird garbage over the serial monitor, but it works with memcardrex.

      Delete
  11. This comment has been removed by the author.

    ReplyDelete
  12. Hey there:

    DexDrive have the time to buy in the PSX, yet I keep it for years and it works. I've always wanted to own interface to read and save data Memmory Card with Visual Studio .NET.
    Some questions.

    [b]1)[/b] What control a Memomry Card with Arduino? (The project is interesting).
    [b]2)[/b] Taking Dexdrive. Is there information needed to make an interface?
    Visual Studio serial port control, I'm doing tutorials with Arduino, PIC's have done long ago, are a full PDF but Spanish, so many do not understand. These tutorials are with PIC, now doing more mdernos esoty slowly with Arduino, here an example in PDF on and off an LED.

    http://www.slideshare.net/Metaconta2/apagar-y-encender-led-con-arduino-y-visual-studio-2015

    [b]3)[/b] Any information about DexDrive? The important thing I see is that it uses 38400 baud. How do they know it works that amount baud?
    [b]4)[/b] He disarmed the DexDrive, used the 4-wire serial port and one mass. To control DexDrive is required 4 wires? Dexplorer 2 automatically detects when you connect a memory card.
    [b]5)[/b] have made reading Since the memory card with Arduino, you can make an interface and writing data to a .txt file. I can spend them examples I've done with Visual C #.
    [b]6)[/b] Memory Card Reader with Arduino, is able to read all the blocks of memory?
    [b]7)[/b] Using a level converter from 5V to 3.3V named CD4050.

    https://www.fairchildsemi.com/datasheets/CD/CD4049UBC.pdf

    [b]8)[/b] Any thing else I should know?

    Best regards.

    PD: [i]Good job with the card reader with Arduino.[/i]

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete
  14. Hi Shendo I Ask Someting MemCARDuino Work Arduino Nano Clone ?
    This Link For Hardware
    http://www.robotistan.com/arduino-nano-klon-usb-kablo-hediyeli-usb-chip-ch340

    ReplyDelete
    Replies
    1. I believe I already answered that question on ngemu but for the sake of others I'll do it again here.

      As long as Arduino SDK supports the clone and all the usual software works fine with it then it should also work with MemCARDuino.

      Delete
  15. Hi:

    Can you make from scratch using only the part of the DexDriver in Visual C #?

    With your comments. If possible, all message and progress bar in the same window or form.

    Greetings.

    ReplyDelete
  16. Hi! First of all thanks for this great memory card reader!
    I downloaded MemcardRex. Using the included MemCARDuino.ino I can't read my memory cards. Using the version from your GitHub I can, and I can format them, but if I try to write them it is extremely slow and then it hangs.
    What could the problem be?
    Thanks!

    ReplyDelete
    Replies
    1. UPDATE: still no luck writing with ver. 0.3.
      Following Shendo's suggestions on PSXDEV forum I tried using ver. 0.2 (the one bundled with MemcardRex 1.8) with an older version of Arduino SDK (1.0.5-r2). It works!
      I can read, format and write memory cards, official ones and even some generic brand ones. It also succeded in reading and writing a PocketStation.
      Hope this info can help those with similar problems.
      Regarding ver. 0.3: has anyone succeded writing with it? What Arduino version are you using?

      Delete
    2. Another user was having problems with 0.3 so I updated the code which will fallback to method used in 0.2 if the card is not communicating. Check out the GitHub page for the 0.4 version.

      You can also use the newest version of Arduino IDE, I fixed the error which prevented it working on new versions.

      Delete
  17. hello, does it work with ps2 memory cards?

    ReplyDelete
    Replies
    1. No. It's for PlayStation 1 Memory Cards only.

      Delete
  18. Hello:

    You can try the Memory Card of the PS2 someday.

    Thanks.

    ReplyDelete
    Replies
    1. Yeah, it would be a logical thing to do I suppose.
      I'm fixed on PS1 cards because of nostalgia more that anything else honestly.

      Delete
    2. Is there any chance that you will experiment with the PS2 Memory Card in the future?

      Delete
  19. I love the nostalgia of PSx Memory Card.
    Not for that I will forget the PS2. ;)

    ReplyDelete
  20. arduino UNO R3 it´s the same conection

    ReplyDelete
  21. how to ps2 memory card connect direct pc.. without ps3 memory adaptor and pci cable.. pls help somebody.. how to instal mc on ps2 memory with out cd bcz my ps2 driver not working.. any onr solve my problem

    ReplyDelete
    Replies
    1. You will either have to acquire MC adapter or install FMCB on an already modded PS2.

      Delete
  22. This comment has been removed by the author.

    ReplyDelete
  23. Hello Eazy Net:

    First have the chip on the PS2. Then search for Google San read PS2 Memory Card to PC.

    ReplyDelete
  24. hi how to connect ps2 memorycard on pc

    ReplyDelete
  25. Pozdrav! Nikako da nađem put kako da vas kontaktiram privatno. Naime imam jednu zamolbu ako je ikako moguće da mi prebacite original PSX save u .mcd formatu u .vmp format? Radi se o samo jednom fileu i bio bih vam jako zahvalan. Ja stvarno nisam u mogućnosti nikako izvesti to jer sam beznandno pokušavao tjedan dana. Ako treba platiti ili nešto samo recite kako i koliko. Ako ste voljni mi pomoći molim vas da me kontaktirate na mail: daniel.bjelan@hotmail.com pa da vam pošaljem file. Unaprijed Hvala. Daniel

    ReplyDelete
    Replies
    1. Bok. Prodao sam PSP pa više ne mogu konvertirti fajlove, ali sam proces nije uopće težak.
      treba instalirati CFW na PSP i CWCheat plugin za POPS.
      Kad se to sredi samo se ubaci .mcr file i učita tokom igre.

      Evo guide od jednog korisnika: http://www.jaskagaming.com/2016/08/25/ffvii-savegames/#2.2

      Delete
  26. FINALLY! got it working with my pc last night and am ecstatic. I plan to try it on my raspberry pi when I get my replacement arduino

    @shendo a few things

    1st Thank you for such and amazing project.

    2nd I am able to get both aftermarket memory cards to work just fine but the Sony memory card doesn't communicate with the ardruino. Any thoughts? All work with my ps1.

    3rd I may have had an older version of memcardrex 1.8 but the MemCARDuino distributed with MCR 1.8 is the version that doesn't work with the newer ardruino SDK. Could you update the zip file. Took me an hour to figure out I had an older version lol.

    ReplyDelete
  27. I've got a Spyro The Dragon 2 game emulated on my laptop and have downloaded MemoryCardRex 1.8 and put all the none readme files into the "cards" folder. I'm now trying to figure out why I have to start the game every time I want to play it. I do have the game though on my console version which is much easier to control than the emulator but I am learning on the emulator, as long as I set things up right but can you help?

    ReplyDelete
  28. Bloody great idea and well done. I’m gonna play with it soon😊

    ReplyDelete
  29. Can this be used to erase what's on the memory card? And transfer a game save to the memory card? thanks

    ReplyDelete
    Replies
    1. Yes. You can use MemcardRex in conjunction with MemCARDuino to copy, delete and insert saves to Memory Card.

      Delete
  30. when can I buy a fully built unit? honestly this would be a lifesaver for retro gamers but a lot of retro gamers would rather just buy this than a diy kit (like me) and it shouldn't be too hard to get a diy friend to 3d print the memory card slot plastic and use some off-the-shelf card-edge connector pins for the contacts

    ReplyDelete
  31. Hi Shendo! I was wondering if it could work on a PS2 memory card. I followed your wiring diagram but I couldn't get it to work. Every time I send the command "GETID" it just replies "?w?w?" and when I use memCARDrex the loading bar remains at 0%. Pls. help :-:.

    ReplyDelete
  32. for anyone interested i bought one of these and mapped out the traces:
    https://i.imgur.com/OXUyvaN.jpg

    here you go:
    https://i.imgur.com/GGhPbjr.jpg

    ReplyDelete
    Replies
    1. Do not forget that it only accepts a Memory Card. Maybe you need a microcontroller, more like Arduino to detect two PS1 Memory Cards. In a flex pin you can read or change the Memory Card you want.

      Delete
  33. Hello! What could be happening to my reader? Sometimes it reads all data and sometimes no. The last try was, read all data with memcarduino.py and works fine so, I tried the same using MemCardRex 1.9 and in the reading process, in the 60% stops completely.

    Then, I tried again with memcarduino.py to read again and then says that it's impossible to read, It tells me to check the connections...The behaviour is quite rare.

    Any idea?

    Thanks

    ReplyDelete