Page 2 of 4

Re: Arduino Memory Card reader

Posted: August 28th, 2015, 1:53 am
by Bodzio_2
In attachment you have my screen. My friend bought a similiar Arduino Nano Clone and had the same results. However he managed to copy saves from one of his five memory cards but they were broken. What's curious this memory card wasn't originial. Maybe this arduino board is not a proper one?

Image

Re: Arduino Memory Card reader

Posted: August 30th, 2015, 11:50 pm
by Shendo
It looks like there is no communication between the card and Arduino.
Check your wiring to make sure you connected everything properly. I recommend using a multimeter.
Since it's a clone check if 5V pin actually gives 5 volts.

Post results.

--
I do have to say that I have one 3rd pary card that won't work with MemCARDuino no matter what.
Could be related to the Atmel's SPI implementation, logic levels, timing or something entirely different.
If you have other cards try with those.

Re: Arduino Memory Card reader

Posted: August 31st, 2015, 6:09 am
by Bodzio_2
Everything seems to be ok. Last time, I attached a wrong picture. Here's the proper one. The results are the same on two of my Arduino Nano v3 boards (first FT232 and the second CH340). However, MemCardRex still can't read all my memory cards. It starts but nothing happens.

Since I checked it on three different Arduino boards, my wiring is ok, I don't know what can be wrong. Maybe I need to somehow change the settings of COM port in Windows or I need any special kind of USB cable? I have no idea what to do.

Image

Re: Arduino Memory Card reader

Posted: September 18th, 2015, 12:56 pm
by Shendo
I figured out the problem. It's related to newer editions of Arduino SDK.
For some reason functions now can't take 2 (or more?) byte arguments... It's probably a bug.
Solution for now is to use an older build of Arduino SDK.

I already found a workaround so I'll update MemCARDuino to version 0.3.
I'll post here and on my blog when I release it.

Messing with this I also improved ACK detection so more cards should work now
(with slight read/write speed improvement).

Image

Edit: I updated first post with the link.

Re: Arduino Memory Card reader

Posted: December 14th, 2015, 3:38 pm
by Meta
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.

1) What control a Memomry Card with Arduino? (The project is interesting).
2) 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/ap ... tudio-2015

3) Any information about DexDrive? The important thing I see is that it uses 38400 baud. How do they know it works that amount baud?
4) 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.
5) 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 #.
6) Memory Card Reader with Arduino, is able to read all the blocks of memory?
7) Using a level converter from 5V to 3.3V named CD4050.

https://www.fairchildsemi.com/datasheet ... 049UBC.pdf

8) Any thing else I should know?

Best regards.

PD: Good job with the card reader with Arduino.

Re: Arduino Memory Card reader

Posted: December 30th, 2015, 10:44 pm
by Meta
Hi:

The file sizes compared to the "Explorer 2" MenCardRx 1.9 Beta are not the same.
Can you have errors and file .gme?

Image

Comparing the files there are many different things inside.
Image

;)

Re: Arduino Memory Card reader

Posted: December 30th, 2015, 11:41 pm
by Shendo
DexPlorer omits unused blocks while MemcardRex doesn't, that's why there is a size difference.
I figured there is no need for that as space is cheap nowadays.

As for different byte in hex editor I believe DexPlorer is in error because those byte sequence contains
status of each save block and according to specification those are:
00h-03h Block Allocation State
00000051h - In use ;first-or-only block of a file
00000052h - In use ;middle block of a file (if 3 or more blocks)
00000053h - In use ;last block of a file (if 2 or more blocks)
000000A0h - Free ;freshly formatted
000000A1h - Free ;deleted (first-or-only block of file)
000000A2h - Free ;deleted (middle block of file)
000000A3h - Free ;deleted (last block of file)
The first block contains the "MC" magic (properly formatted Memory Card) so for a healty card that status in GME header should be "M".
.GME Files (usually 20F40h bytes)
InterAct GME format, produced by the DexDrive.
000h 12 ASCII String "123-456-STD",00h
00Ch 4 Usually zerofilled (or meaningless garbage in some files)
010h 5 Always 00h,00h,01h,00h,01h
015h 16 Copy of Sector 0..15 byte[00h] ;"M", followed by allocation states
025h 16 Copy of Sector 0..15 byte[08h] ;00h, followed by next block values
035h 11 Usually zerofilled (or meaningless garbage in some files)
040h F00h Fifteen Description Strings (each one 100h bytes, padded with 00h)
F40h 128K Memory Card Image (128K) (unused sectors 00h or FFh filled)
More about that here.

Re: Arduino Memory Card reader

Posted: June 12th, 2016, 5:15 pm
by Dark Frost
Hi Shendo I create Your Project in my home and Works Great
Thanks For This Project
But I have some question
Why memory card slot 1 not work good
first time ı soldered my jumper cables (left 1st slot) But Not working Good ı tested my orginal scph-1020 memcard,but sometime signal is stuck and red rx led flip after memcardrex is not read or write or formatt the card after ı soldered my jumpers middle motherbord connetions and ı try now 1st and 2 nd slot 1st is again not work good But Second slot İs Works Great what is the problem this left memcard slot ?

Re: Arduino Memory Card reader

Posted: August 9th, 2016, 10:52 pm
by likeabaus
My apologies for necrobumping this old thread, but this is actually pretty freakin' awesome! I might just set this up so I can use it with MClaunch!

Re: Arduino Memory Card reader

Posted: December 5th, 2016, 2:23 pm
by Meta
Hello

What is the communication protocol of a DexDrive?

Are there any webs that talk about it?

Greetings.

Re: Arduino Memory Card reader

Posted: December 6th, 2016, 12:45 am
by Shendo
@Dark Frost: It's probably wear and tear on the first slot. Over time pins bend and form a bad contact with the card.
Second Memory Card slot is used way less so it usually works better.

@likeabaus: Yup. Glad you like it.

@Meta: These are the documentation sources I used when working with DexDrive:
https://github.com/fbriere/linux-dexdri ... otocol.txt
https://web.archive.org/web/20100123200 ... drive.html

Re: Arduino Memory Card reader

Posted: December 16th, 2016, 1:04 pm
by Meta
Hi:

I'm making puzzles with two buttons in Windows Form C #.
Looking at this link.
Https://github.com/fbriere/linux-dexdri ... otocol.txt

In the part that says:
0x07 LIGHT

Args: 0 to turn off, 1 to turn on
Reply: last reply [PSX] / none [N64]

Turns the light on / off.

Note that the light is automatically turned on for the N64 model when
Sending a READ or WRITE command. (It is not turned off afterwards, though.)

This command can never fail, and does not have anything interesting to
Report, so the DexDrive developers do not appear to have paid any attention
To what reply should be sent back

The PSX model will re-issue the last reply has been issued for any
Command, but without any arguments. The N64 model will simply not reply.

Providing any other value than 0 or 1 will trigger an ERROR on the PSX
Model, and turn the light off on the N64 model.
I made this code to turn on the Led:

Code: Select all

        private void button_Led_ON_Click(object sender, EventArgs e)
        {
            // Led ON.
            Envia_dato_al_puerto((byte)Dex_Comandos.LIGHT, new byte[] { 1 }, 50);
        }
On the other button I want to turn off led and I do not know what command it is.
How do I turn off the Led?

Code: Select all

        private void button_Led_OFF_Click(object sender, EventArgs e)
        {
            // Led OFF.
           // ?????????????????????????
        }
Greetings.

Re: Arduino Memory Card reader

Posted: December 19th, 2016, 6:23 am
by Shendo
Meta wrote:Hi:
Args: 0 to turn off, 1 to turn on
Instead of "new byte[] { 1 }" put "new byte[] { 0 }".

Re: Arduino Memory Card reader

Posted: January 23rd, 2017, 6:48 pm
by temper999
A little bit of overkill but I wanted a nicer hardware solution:

Image
Image

Re: Arduino Memory Card reader

Posted: January 23rd, 2017, 10:19 pm
by Meta
Hi temper999:

Does it work by radio frequency or something similar?

You can give more technical data of that hardware. I look impressive.

As for Shendo.

Why do not you use the serialPort1 component in future versions of your C # program?

You already have all the properties and you save a lot of code.

Greetings to all and good work.

Re: Arduino Memory Card reader

Posted: January 24th, 2017, 12:46 am
by temper999
No it is just the normal (arduino) usb thing.
But I was bored to look at this:
Image

And now I have the 7.6V on Pin 3 and 3.6V at Pin 5.

Re: Arduino Memory Card reader

Posted: January 24th, 2017, 12:53 am
by Meta
I love seeing these things on the memory card and Arduino.
Good job.

Re: Arduino Memory Card reader

Posted: January 25th, 2017, 9:47 pm
by Shendo
@Temper999: That looks awesome. Great job. Mind if I use those images in the first post of this thread?
I'll give proper credit of course.

@Meta: Those communication classes are GUI-less so that's the only way of using serial component.
However, even if I were to use a ready-made component it's code is still defined in designer.cs, so actually it's the same amount of code.

Re: Arduino Memory Card reader

Posted: January 28th, 2017, 12:24 am
by temper999
No problem!

Re: MemCARDuino - Arduino Memory Card reader

Posted: January 31st, 2017, 6:58 am
by Shendo
Thanks.