MemCARDuino - Arduino Memory Card reader

Start a log and update it occasionally with your projects progress
Bodzio_2
Interested PSXDEV User
Interested PSXDEV User
Posts: 6
Joined: August 6th, 2015, 7:36 am

Re: Arduino Memory Card reader

Post by Bodzio_2 » August 28th, 2015, 1:53 am

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
You do not have the required permissions to view the files attached to this post.

User avatar
Shendo
C Programming Expert
C Programming Expert
Posts: 238
Joined: March 21st, 2012, 4:34 am
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-9002
Location: Croatia, EU

Re: Arduino Memory Card reader

Post by Shendo » August 30th, 2015, 11:50 pm

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.
My PS1 consoles: 2 x SCPH-1002, SCPH-5552, SCPH-7002, 4x SCPH-9002, 2 x SCPH-102.
Dev console: SCPH-9002, MM3 - 7 wire modchip, PAL color mod, CH340 serial cable addon.

Bodzio_2
Interested PSXDEV User
Interested PSXDEV User
Posts: 6
Joined: August 6th, 2015, 7:36 am

Re: Arduino Memory Card reader

Post by Bodzio_2 » August 31st, 2015, 6:09 am

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
You do not have the required permissions to view the files attached to this post.

User avatar
Shendo
C Programming Expert
C Programming Expert
Posts: 238
Joined: March 21st, 2012, 4:34 am
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-9002
Location: Croatia, EU

Re: Arduino Memory Card reader

Post by Shendo » September 18th, 2015, 12:56 pm

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.
You do not have the required permissions to view the files attached to this post.
My PS1 consoles: 2 x SCPH-1002, SCPH-5552, SCPH-7002, 4x SCPH-9002, 2 x SCPH-102.
Dev console: SCPH-9002, MM3 - 7 wire modchip, PAL color mod, CH340 serial cable addon.

Meta
Active PSXDEV User
Active PSXDEV User
Posts: 36
Joined: December 14th, 2015, 3:05 pm

Re: Arduino Memory Card reader

Post by Meta » December 14th, 2015, 3:38 pm

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.

Meta
Active PSXDEV User
Active PSXDEV User
Posts: 36
Joined: December 14th, 2015, 3:05 pm

Re: Arduino Memory Card reader

Post by Meta » December 30th, 2015, 10:44 pm

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

;)

User avatar
Shendo
C Programming Expert
C Programming Expert
Posts: 238
Joined: March 21st, 2012, 4:34 am
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-9002
Location: Croatia, EU

Re: Arduino Memory Card reader

Post by Shendo » December 30th, 2015, 11:41 pm

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.
My PS1 consoles: 2 x SCPH-1002, SCPH-5552, SCPH-7002, 4x SCPH-9002, 2 x SCPH-102.
Dev console: SCPH-9002, MM3 - 7 wire modchip, PAL color mod, CH340 serial cable addon.

Dark Frost
Curious PSXDEV User
Curious PSXDEV User
Posts: 22
Joined: May 31st, 2016, 12:23 am
PlayStation Model: 4 x 9002

Re: Arduino Memory Card reader

Post by Dark Frost » June 12th, 2016, 5:15 pm

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 ?
I'm Newbie For Psx Developer :)
Test And Develop Console: 4 x SCPH-9002 + 1x SCPH-1002 + 2 x SCPH-102 + Psx Orginal Pal LCD Screen + 3x SCPH-1020 Memory Card + 2x SCPH-102 Memory Card + 1x Cheap Memory Card :)

likeabaus
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 135
Joined: July 27th, 2016, 2:26 am

Re: Arduino Memory Card reader

Post by likeabaus » August 9th, 2016, 10:52 pm

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!
Buy and sell Bitcoins:
https://localbitcoins.com/?ch=rkv4

Meta
Active PSXDEV User
Active PSXDEV User
Posts: 36
Joined: December 14th, 2015, 3:05 pm

Re: Arduino Memory Card reader

Post by Meta » December 5th, 2016, 2:23 pm

Hello

What is the communication protocol of a DexDrive?

Are there any webs that talk about it?

Greetings.

User avatar
Shendo
C Programming Expert
C Programming Expert
Posts: 238
Joined: March 21st, 2012, 4:34 am
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-9002
Location: Croatia, EU

Re: Arduino Memory Card reader

Post by Shendo » December 6th, 2016, 12:45 am

@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
My PS1 consoles: 2 x SCPH-1002, SCPH-5552, SCPH-7002, 4x SCPH-9002, 2 x SCPH-102.
Dev console: SCPH-9002, MM3 - 7 wire modchip, PAL color mod, CH340 serial cable addon.

Meta
Active PSXDEV User
Active PSXDEV User
Posts: 36
Joined: December 14th, 2015, 3:05 pm

Re: Arduino Memory Card reader

Post by Meta » December 16th, 2016, 1:04 pm

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.

User avatar
Shendo
C Programming Expert
C Programming Expert
Posts: 238
Joined: March 21st, 2012, 4:34 am
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-9002
Location: Croatia, EU

Re: Arduino Memory Card reader

Post by Shendo » December 19th, 2016, 6:23 am

Meta wrote:Hi:
Args: 0 to turn off, 1 to turn on
Instead of "new byte[] { 1 }" put "new byte[] { 0 }".
My PS1 consoles: 2 x SCPH-1002, SCPH-5552, SCPH-7002, 4x SCPH-9002, 2 x SCPH-102.
Dev console: SCPH-9002, MM3 - 7 wire modchip, PAL color mod, CH340 serial cable addon.

User avatar
temper999
Interested PSXDEV User
Interested PSXDEV User
Posts: 8
Joined: September 4th, 2016, 7:29 pm

Re: Arduino Memory Card reader

Post by temper999 » January 23rd, 2017, 6:48 pm

A little bit of overkill but I wanted a nicer hardware solution:

Image
Image

Meta
Active PSXDEV User
Active PSXDEV User
Posts: 36
Joined: December 14th, 2015, 3:05 pm

Re: Arduino Memory Card reader

Post by Meta » January 23rd, 2017, 10:19 pm

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.

User avatar
temper999
Interested PSXDEV User
Interested PSXDEV User
Posts: 8
Joined: September 4th, 2016, 7:29 pm

Re: Arduino Memory Card reader

Post by temper999 » January 24th, 2017, 12:46 am

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.

Meta
Active PSXDEV User
Active PSXDEV User
Posts: 36
Joined: December 14th, 2015, 3:05 pm

Re: Arduino Memory Card reader

Post by Meta » January 24th, 2017, 12:53 am

I love seeing these things on the memory card and Arduino.
Good job.

User avatar
Shendo
C Programming Expert
C Programming Expert
Posts: 238
Joined: March 21st, 2012, 4:34 am
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-9002
Location: Croatia, EU

Re: Arduino Memory Card reader

Post by Shendo » January 25th, 2017, 9:47 pm

@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.
My PS1 consoles: 2 x SCPH-1002, SCPH-5552, SCPH-7002, 4x SCPH-9002, 2 x SCPH-102.
Dev console: SCPH-9002, MM3 - 7 wire modchip, PAL color mod, CH340 serial cable addon.

User avatar
temper999
Interested PSXDEV User
Interested PSXDEV User
Posts: 8
Joined: September 4th, 2016, 7:29 pm

Re: Arduino Memory Card reader

Post by temper999 » January 28th, 2017, 12:24 am

No problem!

User avatar
Shendo
C Programming Expert
C Programming Expert
Posts: 238
Joined: March 21st, 2012, 4:34 am
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-9002
Location: Croatia, EU

Re: MemCARDuino - Arduino Memory Card reader

Post by Shendo » January 31st, 2017, 6:58 am

Thanks.
My PS1 consoles: 2 x SCPH-1002, SCPH-5552, SCPH-7002, 4x SCPH-9002, 2 x SCPH-102.
Dev console: SCPH-9002, MM3 - 7 wire modchip, PAL color mod, CH340 serial cable addon.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest