3K/UHD 5D2 Raw development and Other Digic IV Cams

Started by reddeercity, April 06, 2017, 12:22:27 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

reddeercity

Quote from: names_are_hard on February 15, 2024, 04:57:11 PM
Thanks, I understand what's going on now.  ... I assume the intent was to learn what control was possible over CF cards, then make nicer (and importantly, smaller) code to do the parts we care about.
Yes that's right , i hope to learn where the timing control regs are to manually enable UDMA 7 plus maybe bypass some canon routines to limit the overhead.
Quote from: names_are_hard on February 15, 2024, 04:57:11 PM
.... I've removed the linux specific stuff, here: https://github.com/reticulatedpines/magiclantern_simplified/tree/hdparm_hack
Thanks , i'll give it a try
Quote from: names_are_hard on February 15, 2024, 04:57:11 PM
That should build more easily.  Because it's based on my repo, you can use a more modern linux. 
I recommend Debian Testing.  It might not work on whatever old linux you're using, mainly because we converted everything to python3. 
Try it and see if you want.
Ok , I'm on Ubuntu 18.4x something , it use gcc arms 5.3 i think.
Quote from: names_are_hard on February 15, 2024, 04:57:11 PM
I haven't tested the code in any way.  Will it destroy your cam?  Maybe!
"With Great Risk Comes Great Reward"
at least that's what they say :D
I'll more then likey try it on my 50D first ! , just in case something goes south  :P
only paid $150 5 years ago , that may sacrificial lamb

names_are_hard

That's an old linux distro, I don't advise it.  My repo will build cleanly up to gcc 13.  You can just use the distro gcc, no need to build a special one.

It's worth noting also that my repo has had very little testing on Digic 4 and 5 cams.  It's been used lightly on a range of cams with no significant problems reported.  But please do use some caution, and let me know if there are any new problems.

reddeercity

Ok trying to compile , getting a error , but i don't know how to solve , Just compile the module by it self not a full build
did some warning but that's to be expected , being code from the old core.


reddeercity

Just for kicks i try to build the 50D & 5D2 with @names_are_hard  magiclantern_simplified but failed tried comment the error but make it worse  :(
here a few screen shots . Do i need to update my Linux ? to the what is being used by you ? will i have problem compile my crop_rec builds ?
Anyways here the screen shots :

5D2
 
50D

kitor

What is your distro? Old Ubuntu required for old repo?

permission denied is weird, try to run that script directly, maybe you are missing python3 or git. Or somehow it is missing executable bit.
This is literally a python3 script that runs two git commands.

kitor@kitor-p73:5D2.212$ ../../build_tools/git_summary.py
268224668 raw_draft_v2%
Too many Canon cameras.
If you have a dead R, RP, 250D mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.

names_are_hard

Quote from: reddeercity on February 19, 2024, 08:07:49 AM
Do i need to update my Linux ? to the what is being used by you ? will i have problem compile my crop_rec builds ?

You need to work out why your system can't execute the python script listed in the error.

My repo has crop_rec code included.

For future reference, please don't post pictures of text - you can just paste the text!  I can't copy stuff out of an image to explain it or quote it.

reddeercity

I figured out the problem , its the python version , i'm on python 2 , and its seem the new d678x cams are on python 3 , so ever thing i have is in python 2 so i guess i'll stay there as its what i know.
It not a big deal , i can figure out the Linux thing it need to complies as its just for investagations to over clocking CF card & possibe SD Card(why not? just need to get the MHz frequency correct & of course you need to boost the voltage also , it goes hand in hand.) 

reddeercity

Thanks to @liteo for a great find , https://www.magiclantern.fm/forum/index.php?msg=238721
i have access to all my old LOG file i capture 5+ years ago , i do have most of them but there are
across several different hard drives & computers.
specially the compressed raw routine in the TTL.LOG file very helpful
8C541>    LVC_DEV:00096678:00:00:     28)        4 (write channel 0x4)
8C569>    LVC_DEV:00096678:00:00:     29)    10005 (read channel 0xd)
8C595>    LVC_DEV:00096678:00:00:     30)    20005 (write connection 0x5)
8C5BD>    LVC_DEV:00096678:00:00:     31)    30003 (read connection 0x3)
I believe i have these addresses correctly hard coded , but i have suspicion
its changing , so its not static maybe a floating address it pick a free channel or something
Just guess at best right now , but the log with help isolate the issues/problem. :D     

names_are_hard

Quoteever thing i have is in python 2 so i guess i'll stay there as its what i know

Python 2 is dead.  It's been dead since 2020.  You'll have to update at some point.
https://www.python.org/doc/sunset-python-2/

The good news is I already updated everything in my repo to work with modern linux and modern python.

reddeercity

found some interesting CF Card info form 1 of my logs (dm-0000[raw-startup-log.2018Jan29])
84023>  CSMgrTask:ffb8bcb0:22:01: RequestConfiguration: pLStorage=0x884e40
8404F>  CSMgrTask:ffb8bcc8:22:01:                       ConfigBase=0x200, StatusReg=0x0
8407A>  CSMgrTask:ffb8bce0:22:01:                       PinRepReg=0x0, CopyReg=0x0
840A4>  CSMgrTask:ffb8bcf8:22:01:                       ConfigIndex=0x1, Present=0xf
840D3>  CSMgrTask:ffb8bd80:22:01: RequestConfiguration: Base = 200, Data = 41
840FF>  CSMgrTask:ffb8bde0:22:01: RequestConfiguration: SUCCESS
This the configuration that the 5D2 calls , I've tried to manually change the reg with the base 200(201->207)
but it either locks up or runs slower (20Mb/s) or has super fast read but lockup on write. So there's more then this regs i believe.
852E3>  CSMgrTask:ffbdbb3c:22:03: CF_GetAccessTiming : DatTim = 3, DatMod = 6
DatMod = 6 is the UDMA mode D52 is 6 on 5D3 its 7
But i haven't figured out what the DatTim=3 is yet , i must be missing that reg configurationh
I'm trying to overclock the CF card timing with the Regs alone without adding a lot of extra code.

Edited: Does any one has a 5D3 with a startup Log ?
 I'm looking for the Timing information like what i have post above in the code box , to see if and how it differs , thanks.
Oh yea a 7D mark1 (D4 cam) would maybe help too .


Walter Schulz

Unable to help. Archive.org hasn't archived the zip and I don't have backups.

reddeercity


reddeercity

Found some interesting CF card related info in the Rom's(5D2,5D3,6D,7D)
They have the same or similar Function Calls for storage device e.g.CF/SD cards

RequestConfiguration
5D2
*"RequestConfiguration: pLStorage=%#x"
*"RequestConfiguration: Base = %x, Data = %x"
*"RequestConfiguration: SUCCESS"
*"CF_RequestConfiguration ERROR(%#x)"
*"CF_RequestConfiguration: err=%#x"

5D3
*"RequestConfiguration: pLStorage=%#x"
*"RequestConfiguration: Base = %x, Data = %x"
*"RequestConfiguration: SUCCESS"
*"CF_RequestConfiguration ERROR(%#x)"
*"CF_RequestConfiguration: err=%#x"
6D
*"RequestConfiguration: pLStorage=%#x"
*"RequestConfiguration: Base = %x, Data = %x"
*"RequestConfiguration: SUCCESS"
*"CF_RequestConfiguration ERROR(%#x)"
*"CF_RequestConfiguration: err=%#x"

7D
*"RequestConfiguration: pLStorage=%#x"
*"RequestConfiguration: Base = %x, Data = %x"
*"RequestConfiguration: SUCCESS"
*"CF_RequestConfiguration ERROR(%#x)"
*"CF_RequestConfiguration: err=%#x"

CF_GetAccessTiming
5D2
"CF_GetAccessTiming : DatTim = %d, DatMod = %d":
"CF_GetAccessTiming : DatTim = %d, DatMod = %d"
5D3
"CF_GetAccessTiming : DatTim = %d, DatMod = %d":
"[CF] CF_GetAccessTiming : DatTim = 3, DatMod = 7"
6D
"CF_GetAccessTiming : DatTim = %d, DatMod = %d":
7D
"CF_GetAccessTiming : DatTim = %d, DatMod = %d":

5D3 is the only one that has the Data timing & Data Mode preset in the ROM,
interesting , so this maybe able to be set by Regs only in 5D2 , 7D & 50D cams
 
cfIdentifyDrive
5D2
*"cfIdentifyDrive: TakeSem(%#x)"
*"cfIdentifyDrive: Cache Support"
*"cfIdentifyDrive: Idle Command(500mSec)"
*"cfIdentifyDrive: Emergency Stop"
*"cfIdentifyDrive: Set UDMA( Mode=%d )"
*"cfIdentifyDrive: Emergency Stop"
5D3
*"cfIdentifyDrive: TakeSem(%#x)"
*"cfIdentifyDrive: Cache Support"
*"cfIdentifyDrive: Idle Command(500mSec)"
*"cfIdentifyDrive: Emergency Stop"
*"cfIdentifyDrive: Set UDMA( Mode=%d )"
"[CF] cfIdentifyDrive: Set UDMA( Mode=7 )"
*"cfIdentifyDrive: Emergency Stop"
6D
*"cfIdentifyDrive: TakeSem(%#x)"
*"cfIdentifyDrive: Cache Support"
*"cfIdentifyDrive: Idle Command(500mSec)"
*"cfIdentifyDrive: Emergency Stop"
*"cfIdentifyDrive: Set UDMA( Mode=%d )"
*"cfIdentifyDrive: Emergency Stop"
7D
*"cfIdentifyDrive: TakeSem(%#x)"
*"cfIdentifyDrive: Cache Support"
*"cfIdentifyDrive: Idle Command(500mSec)"
*"cfIdentifyDrive: Emergency Stop"
*"cfIdentifyDrive: Set UDMA( Mode=%d )"
*"cfIdentifyDrive: Emergency Stop"

Here again we see the mode preset in the 5D3 rom under the cf Identify Drive function
cfIdentifyDrive: Set UDMA( Mode=7)

So i need to find a 5D3 setup log or any logs with CF card on the 5D3 to know the reg set
but in the mean time i'll search some more on the forum , i'm sure i saw some , just cant remember where.   :)

reddeercity

I also found my address for lossless compressed raw in one of my Logs
this is good! I had the compression routine code wrong or should i say miss some parts
its different then the 5d3/D5 cams but not by much , it very similar in structure with more parts that all.
Now i'm not saying I've got it working,  i see the problem in the code so hopefully i can correct it. ;D

Walter Schulz

Quote from: reddeercity on April 17, 2024, 05:48:40 AMFound some interesting CF card related info in the Rom's(5D2,5D3,6D,7D)

You are aware 6D doesn't actually host CF but SD? ;-)

reddeercity

Yup , of course i'm was comparing 4 different rom at the same time with the same search keyword.
I use visual studio in Windows7 , I do 80% of my work in there , its great at reading the decompiled Rom files. :)