CF-to-SATA hardware interface for RAW recording (fork)

Started by Grunf, May 17, 2013, 03:10:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

g3gg0

no. canon firmware is initializing the CF controller and reading/setting stuff.
i reverse engineered the camera firmware to find out how the firmware works.

this is not part of ML, so there is no source code.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

rudi

just to think of:
CF-Standard below 5.0 can only adress max 256GB, and and there are no bigger CF-cards on the market than 128GB, so make shure your attached drive is not bigger than that and does not use  48-bit addressing...

but probably you all are aware of this.

just 2 cents

rudi

g3gg0

canon firmware supports 48 bit addressing. at least they seem to handle it as it is intended to.
still not sure if all filesystem drivers support that.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

hini

Hint for the developers.
In the early days CF cards had built-in harddrives inside.

They were called microdrives.

http://en.wikipedia.org/wiki/Microdrive

If you open these devices maybe it helps to understand how things work.
What uses having a great depth of field, if there is not an adequate depth of feeling? - W. Eugene Smith

g3gg0

microdrives are not supported by canon firmware ;)
electrically it is easier to read the specs and public adapter schematics, at least for me
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Grey_Sally

Microdrives are supported by (at least up to) 5D ii -- say the official Canon specs, I don't actually have a MD to test it out with. 5D iii doesn't, but then surely this is more likely to be simply because it doesn't support Type II CF (presumably to allow more space for the SD slot) rather than deliberate crippling or moving to a different communication protocol (?)...

...yes, I'm aware that I used the word 'likely' :-D but even so, may be worth testing this on the 5D ii ?

albert-e

Quote from: g3gg0 on June 12, 2013, 03:21:59 PM
microdrives are not supported by canon firmware ;)
electrically it is easier to read the specs and public adapter schematics, at least for me

On another subject, software interface on CF:
1. On your software patch, is pin 9 (ASEL), is an input, in ATA mode and when enabled to TRUE IDE mode, is it always held LOW at this mode.? It will help with people who are debugging their setup to pinout(scope out) this pin and check.
2. What do we expect (in debug, READ CF or identify device)? Are their return bytes we expect for fail or good? Or just a helpful message?

It would help testers to look for return bytes so we can analyze the errors. Thanks.

yoclay

Quote from: g3gg0 on June 12, 2013, 03:21:59 PM
microdrives are not supported by canon firmware ;)
electrically it is easier to read the specs and public adapter schematics, at least for me

Microdrives cannot be used on the 5D Mark III.  The card slot is not wide enough.
Whether this actually means that the protocol is also not valid is another quesiton.

Grunf

Quote from: kopfsalatmedien on June 11, 2013, 10:09:55 PM
Filesystem is working again - I tried a MBR Partition instead of a GUID Partition Table but with no access. After configuring the parallel record option in canon firmware and restart the camera - there was no card1 error occured., When i hit record the cam was short peeping and something was on display i couldnt read (maybe a failure message in blue writing) because it was very fast upnaway..., Nothing get recorded...

Hi,

Do you hava PC? I would recommend following: Format a working CF card in camera, connect to computer and use a partitioning software (Partition Magic or similar) to copy complete partition from CF  to your HDD as-is.
Also,  avoid trying to record RAW to begin with (in case your HDD cannot swallow 90MB/sec).

Regards,

albert-e

Quote from: Grunf on June 12, 2013, 06:21:07 PM
Hi,

Do you hava PC? I would recommend following: Format a working CF card in camera, connect to computer and use a partitioning software (Partition Magic or similar) to copy complete partition from CF  to your HDD as-is.
Also,  avoid trying to record RAW to begin with (in case your HDD cannot swallow 90MB/sec).

Regards,

Good advice.

deleted.acct.20132206

Quote from: Grunf on June 12, 2013, 06:21:07 PM
Hi,

Do you hava PC? I would recommend following: Format a working CF card in camera, connect to computer and use a partitioning software (Partition Magic or similar) to copy complete partition from CF  to your HDD as-is.
Also,  avoid trying to record RAW to begin with (in case your HDD cannot swallow 90MB/sec).

Regards,

Good idea Grunf- i will try tomorrow. MY OWC PATA SSD should be faster than 90MB/sec!
Good is good, but better carries it!

g3gg0

Quote from: Grey_Sally on June 12, 2013, 03:38:14 PM
Microdrives are supported by (at least up to) 5D ii -- say the official Canon specs, I don't actually have a MD to test it out with. 5D iii doesn't, but then surely this is more likely to be simply because it doesn't support Type II CF (presumably to allow more space for the SD slot) rather than deliberate crippling or moving to a different communication protocol (?)...

...yes, I'm aware that I used the word 'likely' :-D but even so, may be worth testing this on the 5D ii ?

on 5D3 not:
  v15 = (char *)&"Microdrive is Not Supported";
  v16 = 5;
LABEL_17:
  DryosDebugMsg(0x22, v16, v15);
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

g3gg0

Quote from: albert-e on June 12, 2013, 03:41:55 PM
On another subject, software interface on CF:
1. On your software patch, is pin 9 (ASEL), is an input, in ATA mode and when enabled to TRUE IDE mode, is it always held LOW at this mode.? It will help with people who are debugging their setup to pinout(scope out) this pin and check.
2. What do we expect (in debug, READ CF or identify device)? Are their return bytes we expect for fail or good? Or just a helpful message?

It would help testers to look for return bytes so we can analyze the errors. Thanks.

1) my patch only changes the commands sent to card during startup.
the CIS is no longer required, also every device connected is accepted as storage device, even if it is no such.
also the command that changes to mapped mode is skipped.
ATA_SEL is not changed. i didnt measure anything, as i dont have any extender or adapter.

2) when you run the menu entry, you should see what disk it is and a lot drive details
see: http://www.magiclantern.fm/forum/index.php?topic=5471.msg36588#msg36588

if you have an adapter and live in germany, you can send it to me.
then i will dig deeper into it and maybe attach my scope at work.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

hirethestache

Just a hit from my developer to others working on this project: Dont develop a CF adapter that works with Canon cameras. Develop a CF adapter that works with ANY device. So far he has tested his interface in a USB CF reader/writer, a Korg audio interface, a Roland SDPS synth pad, and a few other periphs. Im sending him a busted 5D3 from China to test it out in-camera. Updates to follow.
@HireTheStache
www.HireTheStache.com
C100, 5D3, 5D2, 6D

pascalc

@g3gg0
As I'm in France I can send you mine if it can help - (this one : http://store.calexium.com/fr/316-prolongateur-compact-flash-29-cm.html)
I give up trying I'm not enough skilled.

albert-e

Quote from: g3gg0 on June 12, 2013, 07:50:23 PM
1) my patch only changes the commands sent to card during startup.
the CIS is no longer required, also every device connected is accepted as storage device, even if it is no such.
also the command that changes to mapped mode is skipped.
ATA_SEL is not changed. i didnt measure anything, as i dont have any extender or adapter.

2) when you run the menu entry, you should see what disk it is and a lot drive details
see: http://www.magiclantern.fm/forum/index.php?topic=5471.msg36588#msg36588

if you have an adapter and live in germany, you can send it to me.
then i will dig deeper into it and maybe attach my scope at work.

It okay g3gg0, I checked the CF spec.(Software Interface) and ASEL changes during a read/write operation.
My burning questions though are "(1) my patch only changes the commands sent to card during startup."  AS I understand, during a startup you send 0xEC (IDENTIFY DEVICE) command after enabling TRUE IDE mode.? What is the command to enable the TRUE IDE mode? I was searching at the CF spec v3.0.  and it seems that I can't find it?

Thanks.

NB: IDENTIFY DEVICE return bytes
Word 0: General Configuration
This field indicates that the device is a CompactFlashTM Storage Card. Note to host implementers: If Word 0 of the Identify drive information is 848Ah then the device complies with the CFA specification, not with the ATA-x specification.

....

albert-e

Just a followup on this thread, are there any hints, suggestions or continuing with any testing on these ideas? Is the flame still burning?

Just a thought...

g3gg0

Quote from: albert-e on June 13, 2013, 04:09:00 AMAS I understand, during a startup you send 0xEC (IDENTIFY DEVICE) command after enabling TRUE IDE mode.? What is the command to enable the TRUE IDE mode? I was searching at the CF spec v3.0.  and it seems that I can't find it?

no, i expected that there is an IDE drive being attached, no CF device.
so selecting any ATA mode or anything is pointless, as it is ATA by default.

only CF cards would need the ATA pin being asserted to run in true IDE mode.
Canon isnt using this feature as far i can tell from the source code, but they use the remap comand as described above.
this way sending ATA commands is done using an address in the card address space.

i didnt understand the thing you wrote about IDENTIFY DRIVE.. was this a question?
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

albert-e

Quote from: g3gg0 on June 17, 2013, 04:50:38 PM
no, i expected that there is an IDE drive being attached, no CF device.
so selecting any ATA mode or anything is pointless, as it is ATA by default.

only CF cards would need the ATA pin being asserted to run in true IDE mode.
Canon isnt using this feature as far i can tell from the source code, but they use the remap comand as described above.
this way sending ATA commands is done using an address in the card address space.

i didnt understand the thing you wrote about IDENTIFY DRIVE.. was this a question?

We're clear on that: "no, i expected that there is an IDE drive being attached, no CF device."

That is a read status command, IDENTIFY DEVICE (0xE0). We just want to know the return bytes:
"If Word 0 of the Identify drive information is 848Ah then the device complies with the CFA specification, NOT with the ATA-x specification."

That means, if we read 848Ah, our test interface is not recognized as ATA drive.

I have my used Canon 50D(received it today,yi...pee!) and all I'm still waiting for my CF card extender (plugs into the camera CF slot). So, I'm just curious if the idea is still hot or cold. It's been quiet for a while. :-)

Do you have the software patch for Canon 50D that you had for 5D3, for testing our interface on Canon 50D?

Thanks.

ease

Are we going somewhere with that ? No more flame burning there ? Any news ? Thanks !

Michael Zöller

Quote from: ease on June 18, 2013, 04:10:32 PM
Are we going somewhere with that ? No more flame burning there ? Any news ? Thanks !
Uhm, the last post was less than 24h ago :) can you contribute anything?
neoluxx.de
EOS 5D Mark II | EOS 600D | EF 24-70mm f/2.8 | Tascam DR-40

ease

sorry don't want to sound harshhh, just very enthusiastic.
Would love to help...but not an engineer.

albert-e

Coming anytime now, June 18th Eastern Time, this: http://www.sycard.com/cflash.html, a CF passive extender card for testing purposes.

Tests plan would be:
1. Defeat CF camera slot door switch. Insert CF extender card into CF camera slot ( a Canon 50D ).
2.Verify camera with Canon/ML firmware boots up successfully.
3.Perform camera functions:
  (a) Take pictures, video
  (b) And more...
4. If step 3 succeeds, continue to next "tock", connect a IDE-CF adapter with a 2.5" 60gB drive formatted with the Canon/ML firmware v2.3 for Canon 50D
5. If successful, I'll update the forum hopefully within the next 24hrs.

Any test suggestions are welcome. Wish me luck.:-)

NB:
I'll take videos as I go through the step process with the elementary iPhone.:-)

Danne

Awesome! Good luck. How much was the passive extender?

albert-e