Magic Lantern Forum

Developing Magic Lantern => Reverse Engineering => Topic started by: Indy on March 02, 2013, 10:05:39 AM

Title: RE contributions
Post by: Indy on March 02, 2013, 10:05:39 AM
hi,

Just to let you know, I put on the bitbucket most of my python scripts (the public ones)
https://bitbucket.org/hudson/magic-lantern/src/fa4b9a00d0ca859ea86a4a0c9b0b144ef2e9b02b/contrib/indy/readme.TXT?at=unified

"it is working at least for me" ;-)

Indy
Title: Re: RE contributions
Post by: 1% on March 02, 2013, 05:41:42 PM
The fir scripts let you get a bin from the canon updates? I need to look in 5d3 fir.... also that property dumper dumps props with values? That would be a godsend.
Title: Re: RE contributions
Post by: Indy on March 02, 2013, 09:31:54 PM
updates need to be decrypted first.
the script (dec_fir.py) is not public because it contains keys and crypto algorithms from Canon.

Indy
Title: Re: RE contributions
Post by: g3gg0 on March 02, 2013, 09:44:52 PM
http://upload.g3gg0.de/pub_files/fdc99f4a738e331e63009bdc7ac12f71/PropertyEditor.exe

it lets you dump properties into some xml format.
and maybe somewhen i will add importing, if it is needed ;)

windows:  run "PropertyEditor.exe [ROM-Filename]"
linux: run (with mono)  "mono PropertyEditor.exe [ROM-Filename]"
Title: Re: RE contributions
Post by: 1% on March 02, 2013, 09:46:47 PM
Awesome have to use all of these on the 6D bins
Title: Re: RE contributions
Post by: g3gg0 on March 02, 2013, 09:49:11 PM
did just check with 60D and 600D.
7D seems to save properties somewhere else. (well, on master it seems)
Title: Re: RE contributions
Post by: 1% on March 02, 2013, 09:52:51 PM
I get:



[I] Autodetected property offset: 00080000
[Block: 00, Length: 00001054, Flag: 00000000] [Base: 00080000]
  [E] Invalid block size
[Block: 01, Length: 00000000, Flag: 00000000] [Base: 00081000]
  [E] Invalid block size
[Block: 02, Length: 00001054, Flag: 00000000] [Base: 00082000]
  [E] Invalid block size
[Block: 03, Length: 00000000, Flag: 00000000] [Base: 00083000]
  [E] Invalid block size
[Block: 04, Length: 00001054, Flag: 00000000] [Base: 00084000]
  [E] Invalid block size
[Block: 05, Length: 00000000, Flag: 00000000] [Base: 00085000]
  [E] Invalid block size
[Block: 06, Length: 00001054, Flag: 00000000] [Base: 00086000]
  [E] Invalid block size
[Block: 07, Length: 00000000, Flag: 00000000] [Base: 00087000]
  [E] Invalid block size
[Block: 08, Length: 00001054, Flag: 00000000] [Base: 00088000]
  [E] Invalid block size
[Block: 09, Length: 00000000, Flag: 00000000] [Base: 00089000]
  [E] Invalid block size
[Block: 0A, Length: 00001054, Flag: 00000000] [Base: 0008A000]
  [E] Invalid block size
[Block: 0B, Length: 00000000, Flag: 00000000] [Base: 0008B000]
  [E] Invalid block size
[Block: 0C, Length: 00001054, Flag: 00000000] [Base: 0008C000]
  [E] Invalid block size
[Block: 0D, Length: 00000000, Flag: 00000000] [Base: 0008D000]
  [E] Invalid block size
[Block: 0E, Length: 00001054, Flag: 00000000] [Base: 0008E000]
  [E] Invalid block size
[Block: 0F, Length: 00000000, Flag: 00000000] [Base: 0008F000]
  [E] Invalid block size
[Block: 10, Length: 00001054, Flag: 00000000] [Base: 00090000]
  [E] Invalid block size
[Block: 11, Length: 00000000, Flag: 00000000] [Base: 00091000]
  [E] Invalid block size
[Block: 12, Length: 00001054, Flag: 00000000] [Base: 00092000]
  [E] Invalid block size
[Block: 13, Length: 00000000, Flag: 00000000] [Base: 00093000]
  [E] Invalid block size
[Block: 14, Length: 00001054, Flag: 00000000] [Base: 00094000]
  [E] Invalid block size
[Block: 15, Length: 00000000, Flag: 00000000] [Base: 00095000]
  [E] Invalid block size
[Block: 16, Length: 00001054, Flag: 00000000] [Base: 00096000]
  [E] Invalid block size
[Block: 17, Length: 00000000, Flag: 00000000] [Base: 00097000]
  [E] Invalid block size
[Block: 18, Length: 00001054, Flag: 00000000] [Base: 00098000]
  [E] Invalid block size
[Block: 19, Length: 00000000, Flag: 00000000] [Base: 00099000]
  [E] Invalid block size
[Block: 1A, Length: 00001054, Flag: 00000000] [Base: 0009A000]
  [E] Invalid block size
[Block: 1B, Length: 00000000, Flag: 00000000] [Base: 0009B000]
  [E] Invalid block size
[Block: 1C, Length: 00001054, Flag: 00000000] [Base: 0009C000]
  [E] Invalid block size
[Block: 1D, Length: 00000000, Flag: 00000000] [Base: 0009D000]
  [E] Invalid block size
[Block: 1E, Length: 00001054, Flag: 00000000] [Base: 0009E000]
  [E] Invalid block size
[Block: 1F, Length: 00000000, Flag: 00000000] [Base: 0009F000]
  [E] Invalid block size
Title: Re: RE contributions
Post by: g3gg0 on March 02, 2013, 09:55:25 PM
can you look for the firmware version string like e.g. "2.0.3" in the full rom dump?
then look for a find where you see a *lot* FF FF FF bytes in front of the location.

see e.g.: http://upload.g3gg0.de/pub_files/2d39eb8caed13175612063dcc89241f4/properties.PNG
Title: Re: RE contributions
Post by: g3gg0 on March 02, 2013, 10:10:18 PM
i see, 6D has changed property format.
updating...
Title: Re: RE contributions
Post by: g3gg0 on March 02, 2013, 10:21:08 PM
solved. 6D uses blocks larger than 0x1000 bytes.
now i am autodetecting the block size by the first block's size.
this will fail if the first block is empty, then you will have to specify it manually. (either 0x1000 or 0x2000)

http://upload.g3gg0.de/pub_files/cbd65f7af070379954c4ec3da697c196/PropertyEditor.exe
Title: Re: RE contributions
Post by: 1% on March 02, 2013, 10:29:53 PM
Thanks, I think it dumped everything now.

Output is slightly different though.

Ie 0x80010006

would be

    [Property: 02010006, Length: 0000000C] [Base: 000A6178]
?


Length is different... or are props numbered differently in rom?
Title: Re: RE contributions
Post by: g3gg0 on March 02, 2013, 10:41:23 PM
well, there are a few more property sections (just realized that not all is in the autodetected one)

for example 600D:

TUNE: 0xBE0000
FIX:  0xB60000
RING: 0xAE0000
RASEN: 0xB00000
LENS:  0xEC0000

all with different block sized etc. just figuring out how to autodetect that ....


v3 = PROPAD_CreateFROMPropertyHandle((unsigned int *)&v14, 1, (int)&unk_F8B60000, 0x10000u, 8u, 0x80000u, 0x1000000);
  if ( v3 & 1 )
    DryosDebugMsg(139, 6, "PROPAD_CreateFROMPropertyHandle : FIX (%#x)", v3);
  v14 = 0x2000000;
  v4 = PROPAD_CreateFROMPropertyHandle((unsigned int *)&v14, 1, (int)&unk_F8AE0000, 0x10000u, 2u, 0x1000u, 0x1000000);
  if ( v4 & 1 )
    DryosDebugMsg(139, 6, "PROPAD_CreateFROMPropertyHandle : RING (%#x)", v4);
  v14 = 0x4000000;
  v15 = 83886080;
  v16 = 234881024;
  v5 = PROPAD_CreateFROMPropertyHandle((unsigned int *)&v14, 3, (int)&unk_F8B00000, 0x10000u, 6u, 0x20000u, 0x1000000);
  if ( v5 & 1 )
    DryosDebugMsg(139, 6, "PROPAD_CreateFROMPropertyHandle : RASEN (%#x)", v5);
  v14 = 184549376;
  v6 = PROPAD_CreateFROMPropertyHandle((unsigned int *)&v14, 1, (int)&unk_F8EC0000, 0x10000u, 6u, 0x20000u, 0x1000000);
  if ( v6 & 1 )
    DryosDebugMsg(139, 6, "PROPAD_CreateFROMPropertyHandle : LENS (%#x)", v6);

Title: Re: RE contributions
Post by: 1% on March 02, 2013, 10:48:21 PM
6D has those sections too with separate dumps like on 600D.. I only tried getting the main props but instead got a 400mb 00.bin Looks a bit like ram dump. The other functions for tune/fix/ring/rasen look to be the same.
Title: Re: RE contributions
Post by: g3gg0 on March 03, 2013, 12:06:26 AM
update

http://magiclantern.fm/modules/modules/PropertyEditor.exe/PropertyEditor.exe

use it with arguments:
1: ROM-filename
2: FROM base address
3: blocksize
4: number of blocks

How to get the parameters:
look for a call to CreateFROMPropertyHandle and check the arguments
the number of blocks (argument 4:) is "sectorsize * sectors / blocksize"

int PROPAD_CreateFROMPropertyHandle(unsigned int *prop_types, int prop_count, unsigned int base_address, unsigned int sectorsize, unsigned int sectors, unsigned int blocksize, int a7)

if you are not sure how to calculate, you can just pass 0 as block count or completely omit it.
then the dumper will only dump until the first block marked "valid" is found.
if you supply that count, it will dump all blocks, even old and invalid ones.

for 7D:
PropertyEditor.exe ROM1.bin 0x910000 0x040000 0x1
PropertyEditor.exe ROM1.bin 0xA00000 0x2C0000 0x1

Type  Offset  Properties
FIX:  0x910000 (0x00000000)
TUNE: 0xA00000 (0x01000000)

for 600D:
PropertyEditor.exe ROM1.bin 0xAE0000 0x001000 0x20
PropertyEditor.exe ROM1.bin 0xB00000 0x020000 0x3
PropertyEditor.exe ROM1.bin 0xB60000 0x080000 0x1
PropertyEditor.exe ROM1.bin 0xBE0000 0x2C0000 0x1
PropertyEditor.exe ROM1.bin 0xEC0000 0x020000 0x3

Type  Offset  Properties
RING: 0xAE0000 (0x02000000)
RASEN 0xB00000 (0x04000000 0x05000000 0x0E000000)
FIX:  0xB60000 (0x00000000)
TUNE: 0xBE0000 (0x01000000)
LENS  0xEC0000 (0x0B000000)


for 60D:
PropertyEditor.exe ROM1.bin 0x9D0000 0x001000 0x20
PropertyEditor.exe ROM1.bin 0x9F0000 0x020000 0x3
PropertyEditor.exe ROM1.bin 0xA50000 0x080000 0x1
PropertyEditor.exe ROM1.bin 0xAD0000 0x370000 0x1
PropertyEditor.exe ROM1.bin 0x00C000 0x000800 0x4

Type  Offset  Properties
RING: 0x9D0000 (0x02000000)
RASEN 0x9F0000 (0x04000000 0x05000000 0x0E000000)
FIX:  0xA50000 (0x00000000)
TUNE: 0xAD0000 (0x01000000)
LENS: 0xEC0000 (0x0B000000)
CUST: 0x00C000 (0x03000000)


for 6D:
PropertyEditor.exe ROM1.bin 0x080000 0x002000 0x20
PropertyEditor.exe ROM0.bin 0x060000 0x020000 0x3
PropertyEditor.exe ROM0.bin 0x0C0000 0x100000 0x1
PropertyEditor.exe ROM0.bin 0x1E0000 0x020000 0x3
PropertyEditor.exe ROM0.bin 0x020000 0x001000 0x20


Type  ROM  Offset  Properties
RING: ROM1 0x080000 (0x02000000)
RASEN ROM0 0x060000  (0x04000000 0x05000000 0x0E000000)
FIX:  ROM0 0x0C0000  (0x00000000)
LENS: ROM0 0x1E0000  (0x0B000000)
CUST: ROM0 0x020000 (0x03000000)
Title: Re: RE contributions
Post by: 1% on March 03, 2013, 04:05:42 AM
Rom0 is the ram segment or...

I just get same dump from 0xff000000 for both rom0.bin and rom1.bin

The roms dissected from the firmware updates start at 0xff00 or at program area (5d3  0xf80c0000)?



Title: Re: RE contributions
Post by: g3gg0 on March 03, 2013, 11:56:37 AM
ROM0: 0xF0000000 - 0xF7FFFFFF (when camera has a ROM0, then its 8 or 16M, so its 0xF0000000-0xF0FFFFFF)
ROM1: 0xF8000000 - 0xFFFFFFFF (most cameras have 16M, so its 0xF8000000-0xF8FFFFFF)
Title: Re: RE contributions
Post by: Indy on March 03, 2013, 12:15:25 PM
I'm happy to see it is useful !
again and as usual, excellent work G3gg0!

any idea about lens00.bin content ?
it seems it contains vignetting and chromatic aberration tables for correction...
I can provide 60D and 550D data if needed.

would it be useful to create a custom update with modified properties / bitmap / strings ?
yes it is risky.

Indy
Title: Re: RE contributions
Post by: g3gg0 on March 03, 2013, 01:06:25 PM
upload it to http://upload.g3gg0.de/ - i will look what is inside.

i played with this thought a long time.
did the same for nokia phones - providing tools for extracting, modifying and repacking language packs.
that was, because nokia sold some phones only in some countries and did not put translation for e.g. europe into it.
so there was a "market" for such translation tools.

not sure if the userbase we are focusing on needs such translations.
Title: Re: RE contributions
Post by: g3gg0 on March 03, 2013, 01:16:47 PM
LENS content seems to be blocks of 0xA90 byte size.
blocks end with a sequence of: 22 22 22 22

these blocks are split into two parts, separated by 44 44 44 44. first is 0x360 bytes, second part is 0x730.
second part consists mostly of words with 0x18 byte size, some with 0x20 byte

thats what i can see from the hex file
Title: Re: RE contributions
Post by: g3gg0 on March 03, 2013, 02:12:06 PM
LENS format: (property 0x0B000000, can be modified with EOSUtiliy's abberation profile manager)

0x00-0x30 header
0x00: 0x0F3C
0x02: number of LENS_ENTRIES
0x04: 0x0030 (this header size)
0x06: 0x0080 (number of reserved LENS_ENTRIES)

0x30-0x830 LENS_ENTRIES:
0x10 bytes per entry
format:
0x00: 0x00000034 lens_id, see PROP_LENS second word. (0x0032001D = nifty fifty, 0x00000034 = 18-55 IS II)
0x04: 0x000000FF
0x08: 0x00000000
0x0C: start offset in LENS_DATA

0x830-... LENS_DATA: (offset depends on header information)
[header with 0x20 byte size]
0x000: 0x0000
0x002: 0x0001
0x004: 0x0012 (min focal length)
0x006: 0x0037 (max focal length)
0x008: 0x00FA (min focus distance in mm. 450, 250, 280, 340, 380, ....)
0x00A: 0x0000
..
0x01E: 0x0000

[section with 0x340 byte size]
0x000: 0x0012 (focal length 1)
0x002: 0x0017 (focal length 2)
0x004: 0x0021 (focal length 3)
0x006: 0x0037 (focal length 4)
0x008: 0x0FA0 (unknown 4000, 2222, ...)
0x00A: 0x0A6B (unknown 2667, 1481, ..., its above value / 1.5)
0x00C: 0x0535 (unknown 1333, 741, ..., its above value / 2)
0x00E: 0x0000
..
0x33C: 0x44444444

[section with 0xF0 byte size]
0x000: unknown
...
0x010: 0x0012 (focal length 1)
0x012: 0x0017 (focal length 2)
0x014: 0x0021 (focal length 3)
0x016: 0x0037 (focal length 4)
...
0x0EC: 0x33333333

[section with 0x640 byte size]
0x000: 0x0012 (focal length 1)
0x002: 0x0017 (focal length 2)
0x004: 0x0021 (focal length 3)
0x006: 0x0037 (focal length 4)
...
0x63C: 0x22222222
Title: Re: RE contributions
Post by: 1% on March 03, 2013, 04:15:03 PM
Quotewould it be useful to create a custom update with modified properties / bitmap / strings ?

That would be cool. Especially to add back properties missing for certain things, etc. Also fix annoying things with cannon FW.

Ditch the canon fw/interface completely if at all possible.... but that would be a mountain of work.
Title: Re: RE contributions
Post by: Indy on March 03, 2013, 10:35:44 PM
I was on the path with my parse_lens*.py scripts. I'll study your findings tomorrow.
thank you, you definitely went further !

Title: Re: RE contributions
Post by: coutts on March 04, 2013, 03:53:47 PM
Thank you for this Indy, great  8)
Title: Re: RE contributions
Post by: g3gg0 on March 05, 2013, 01:53:15 AM
here some parsed lens data how i understand it:

http://upload.g3gg0.de/pub_files/a13e3d003e3620bac8641b1e7278e253/lens_bin.lensxml

using this tool:

http://upload.g3gg0.de/pub_files/421dd6883b808b44c8dd85f4fe54dd63/LensDumper.exe
Title: Re: RE contributions
Post by: g3gg0 on March 05, 2013, 02:14:10 AM
update, added indy's structuring of lens data content
Title: vignetting and chromatic abberation tables = LENS00.BIN
Post by: Indy on March 08, 2013, 11:27:25 PM
Please,
could someone call
ROM:FF0C9098 SaveLensToFile
on 5dm3 1.1.3 ? I would like to check vignetting values on the full frame compared to 60D APS-C.

if it is easier on 6D 1.1.2:
ROM:FF0C9318 SaveLensToFile

it should be callable by name and create a 'LENS00.BIN'

Indy
Title: Re: RE contributions
Post by: 1% on March 09, 2013, 12:18:03 AM
Here you go:

http://www.qfpost.com/file/d?g=Z6gLh6Gv7 (http://www.qfpost.com/file/d?g=Z6gLh6Gv7)

tokina 11-16 was attached.
Title: Re: RE contributions
Post by: g3gg0 on March 09, 2013, 01:06:55 AM
after removing 0x20 bytes header, the file was parseable.

http://upload.g3gg0.de/pub_files/0e08b14f745a5f694dd16ccabe476311/lens00_bin.lensxml
Title: Re: RE contributions
Post by: Indy on March 09, 2013, 10:02:57 AM
thank you!
it is for 5dm3 ?
Quote from: 1% on March 09, 2013, 12:18:03 AM
Here you go:

http://www.qfpost.com/file/d?g=Z6gLh6Gv7 (http://www.qfpost.com/file/d?g=Z6gLh6Gv7)

tokina 11-16 was attached.
Title: Re: RE contributions
Post by: Indy on March 09, 2013, 03:50:40 PM
Some tests, pictures at 24mm and varying the aperture:

all @24mm on 24-105mm f/4.0, 5dm3, RAW
values from Makernote Tag#4015, at offset 26. See http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html#VignettingCorr
picture#, aperture, vignetting correction values (6 attenuation values from center to border? 8191=no attenuation?)
495, f4.0, 8191 7888 7185 5226 3771 1754
496, f4.5, 8191 7897 7225 5585 4333 2156
497, f5.0, 8191 7902 7246 5776 4633 2370
501, f5.6, 8191 7909 7277 6047 5057 2674
502, f6.3, 8191 7916 7249 6144 5355 2973
503, f7.1, 8191 7922 7230 6211 5563 3183
504, f8.0, 8191 7930 7205 6302 5841 3462
505, f9.0, 8191 7930 7203 6304 5856 3763
506, f10,  8191 7931 7202 6306 5866 3941
507, f11,  8191 7931 7201 6308 5874 4161
508, f13,  8191 7932 7200 6311 5890 4410
509, f14,  8191 7932 7199 6312 5897 4542
510, f16,  8191 7933 7198 6314 5906 4710
511, f18,  8191 7933 7198 6315 5914 4861
512, f20,  8191 7933 7197 6316 5919 4955
513, f22,  8191 7934 7197 6318 5926 5075

from lens00.bin, lens_id=237 (these data seems identical for 60mm and 6D)
we suppose there is one table for each 4 different focals, here 24(0x18), 32, 49, and 105mm (0x69)
so at 24mm, the first table should be used...

000001 0018 0069 00c20100000000000000000000000000000000000000000000
1800 2000 3100 6900 ae08c905e502 00000000 7004df08920c0c0eff0f
2800 3900 5000 e200
8191 7887 7188 5158 3640 1535, 8191 7906 7296 5948 4819 2373, 8191 7925 7223 6262 5651 3053, 8191 7933 7197 6321 5931 4249
8191 7933 7197 6321 5931 4249, 8191 7888 7186 5211 3740 1701, 8191 7909 7281 6030 5016 2601, 8191 7929 7209 6295 5806 3361
8191 7929 7209 6295 5806 3361, 8191 7934 7197 6319 5927 4944, 8191 7888 7185 5250 3820 1836, 8191 7911 7273 6074 5121 2787
8191 7911 7273 6074 5121 2787, 8191 7932 7201 6314 5896 3620, 8191 7934 7197 6317 5925 5279, 8191 7888 7182 5289 3887 1913
2800 3900 5000 e200
8191 7943 7176 5882 5112 3706, 8191 7958 7297 6498 6133 5498, 8191 7958 7298 6496 6127 5611, 8191 7959 7300 6495 6124 5604
8191 7959 7300 6495 6124 5604, 8191 7944 7168 5887 5167 3605, 8191 7957 7296 6494 6126 5341, 8191 7958 7297 6492 6121 5602
8191 7958 7297 6492 6121 5602, 8191 7959 7299 6492 6119 5595, 8191 7945 7163 5895 5204 3479, 8191 7957 7296 6492 6124 5210
8191 7957 7296 6492 6124 5210, 8191 7958 7297 6491 6119 5600, 8191 7959 7299 6491 6118 5594, 8191 7946 7158 5903 5234 3389
2800 3900 5000 e200
8191 8007 7165 5927 5363 4047, 8191 7998 7453 6794 6493 6118, 8191 7999 7453 6794 6493 6079, 8191 7999 7454 6794 6492 6076
8191 7999 7454 6794 6492 6076, 8191 8006 7160 5916 5347 3920, 8191 7998 7450 6785 6479 6010, 8191 7998 7451 6785 6480 6056
8191 7998 7451 6785 6480 6056, 8191 7999 7452 6786 6480 6056, 8191 8005 7156 5908 5337 3819, 8191 7998 7448 6779 6471 5902
8191 7998 7448 6779 6471 5902, 8191 7998 7449 6780 6472 6044, 8191 7999 7451 6781 6473 6044, 8191 8005 7153 5902 5330 3708
2800 3900 5000 e200
8191 7808 6772 5661 5190 3668, 8191 8053 7660 7178 6955 6546, 8191 8052 7658 7174 6951 6641, 8191 8052 7656 7171 6946 6634
8191 8052 7656 7171 6946 6634, 8191 7807 6745 5566 5026 3452, 8191 8052 7656 7168 6942 6366, 8191 8052 7655 7166 6939 6622
8191 8052 7655 7166 6939 6622, 8191 8052 7655 7163 6935 6616, 8191 7801 6714 5424 4719 3271, 8191 8052 7654 7162 6933 6178
8191 8052 7654 7162 6933 6178, 8191 8052 7653 7160 6930 6608, 8191 8052 7654 7159 6928 6604, 8191 7675 6544 5172 4405 3093
Title: Re: RE contributions
Post by: Indy on March 09, 2013, 04:32:55 PM
236   = Canon EF-S 60mm f/2.8 Macro USM

Lens_id= 236, offset=0x5360
60-60
000001 003c 003c 00cd0000000000000000000000000000000000000000000000
3c00 0000 0000 0000 0a13210d8606 00000000 b203ea0522089d091a0a
1c00 2800 3900 4001
8191 8125 7921 7357 6724 6507, 8191 8113 7993 7823 7684 7634, 8191 8112 7992 7820 7679 7629, 8191 8111 7990 7817 7675 7624
8191 8111 7990 7817 7675 7624, 8191 8142 7796 6994 6172 5853, 8191 8144 8089 7962 7749 7483, 8191 8144 8072 7971 7890 7861
8191 8144 8072 7971 7890 7861, 8191 8142 8071 7972 7891 7862, 8191 7725 6783 5591 4735 4417, 8191 8169 8151 7843 7279 6991
8191 8169 8151 7843 7279 6991, 8191 8154 8100 8025 7965 7999, 8191 8155 8102 8030 7974 7953, 8191 6660 5413 4168 3402 3140
0000 0000 0000 0000
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
0000 0000 0000 0000
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
0000 0000 0000 0000
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191
4444444400000000000000000000000000000000
Title: Re: RE contributions
Post by: Indy on March 09, 2013, 04:43:51 PM
found measurements:
http://www.photozone.de/canon_eos_ff/420-canon_24105_4_5d?start=1
http://www.dxomark.com/index.php/Lenses/Camera-Lens-Database/Canon/EF24-105mm-f-4L-IS-USM/%28camera%29/483/%28cameraname%29/Canon-EOS-5D-Mark-II
http://www.cameralabs.com/reviews/Canon24105mmL_with_400D_XTi/vignetting.shtml

Indy
Title: Re: RE contributions
Post by: 1% on March 09, 2013, 05:58:43 PM
Sucks no digic V. That was a 6D file. There is something about image effects in 6D firmware, maybe digic registers are different?
Title: Re: RE contributions
Post by: g3gg0 on March 09, 2013, 09:38:06 PM

well, if you open this file:
http://upload.g3gg0.de/pub_files/0e08b14f745a5f694dd16ccabe476311/lens00_bin.lensxml

look for "<LensId>237</LensId>" then there will be the tables you said.
i assumed that the values have to be interpreted as "8192 - value"

for the source code: https://bitbucket.org/hudson/magic-lantern/src/84578ea500f95db04a6db96642d1af1c3ec1113f/contrib/g3gg0-tools/LensDumper/LensDataAccessor.cs?at=unified
Title: Re: RE contributions
Post by: Indy on March 09, 2013, 09:44:10 PM
varying the focal, this time. 24-105mm (lens_id=237) on 5dm3

f/8.0
515, 24mm, 8191 7933 7197 6316 5919 4955
516, 28mm, 8191 7945 7257 6410 6000 4684
518, 32mm, 8191 7958 7297 6491 6119 5600
521, 35mm, 8191 7967 7334 6562 6207 5711
524, 40mm, 8190 7980 7384 6658 6323 5858
527, 45mm, 8191 7991 7423 6732 6414 5973
530, 47mm, 8191 7994 7436 6757 6446 6012
533, 50mm, 8191 8000 7456 6795 6492 6069
536, 55mm, 8191 8008 7490 6858 6568 6163
538, 58mm, 8191 8013 7508 6891 6608 6212
540, 60mm, 8191 8016 7519 6911 6632 6241
543, 65mm, 8191 8022 7543 6957 6686 6310
545, 67mm, 8191 8025 7551 6973 6706 6334
548, 70mm, 8191 8028 7563 6995 6733 6367
549, 73mm, 8191 8031 7574 7016 6757 6397
552, 75mm, 8191 8033 7581 7029 6773 6416
553, 80mm, 8191 8037 7597 7058 6808 6459
556, 82mm, 8191 8038 7602 7068 6821 6475
557, 84mm, 8191 8040 7608 7078 6833 6490
559, 85mm, 8191 8040 7612 7084 6840 6499
561, 88mm, 8191 8042 7619 7098 6857 6520
563, 90mm, 8191 8044 7624 7107 6868 6533
564, 92mm, 8191 8045 7628 7116 6878 6546
565, 93mm, 8191 8045 7630 7120 6883 6552
566, 95mm, 8191 8047 7635 7128 6892 6563
567, 96mm, 8191 8047 7637 7131 6897 6569
568, 97mm, 8191 8048 7639 7135 6901 6575
569, 99mm, 8191 8049 7642 7141 6909 6584
570, 105 ,  8191 8052 7653 7162 6934 6614
Title: vignetting and chromatic abberation tables = LENS00.BIN
Post by: Indy on March 10, 2013, 07:30:47 PM
on APS-C, values are very close to 24x36

24mm, 550d (APS-C), 24-105mm
239, f4.0, 8191 7888 7185 5231 3781 1770
240, f4.5, 8191 7897 7224 5598 4363 2208
241, f5.0, 8191 7902 7246 5781 4645 2391
242, f5.6, 8191 7910 7276 6057 5081 2716
243, f6.3, 8191 7917 7248 6151 5378 3022
222, f7.1, 8191 7921 7232 6205 5542 3132
223, f8.0, 8191 7929 7206 6300 5832 3436
224, f9.0, 8191 7929 7205 6301 5840 3704
225, f10,  8191 7930 7203 6305 5859 3912
226, f11,  8191 7931 7201 6308 5874 4161
227, f13,  8191 7931 7200 6310 5887 4379
228, f14,  8191 7932 7199 6312 5894 4510
229, f16,  8191 7932 7199 6313 5904 4678
230, f18,  8191 7933 7198 6315 5913 4828
231, f20,  8191 7933 7197 6316 5919 4921
232, f22,  8191 7934 7197 6318 5926 5041
Title: Re: RE contributions
Post by: a1ex on June 21, 2017, 10:10:08 AM
My attempt at parsing properties: prop_diag (https://bitbucket.org/hudson/magic-lantern/src/recovery/src/prop_diag.c) from the recovery branch. This is currently included in the portable display test (http://www.magiclantern.fm/forum/index.php?topic=14732.0), but the same file can be compiled as a standalone program:


hg up recovery -C
cd src
gcc prop_diag.c -o prop_diag

mv prop_diag /path/to/rom/dumps
cd /path/to/rom/dumps
./prop_diag ROM1.BIN
Title: Re: RE contributions
Post by: a1ex on December 28, 2017, 04:43:16 PM
If you have a bunch of startup logs around (or if you get them with these builds (http://builds.magiclantern.fm/jenkins/view/Experiments/job/startup-log/)), here's a one-liner to identify property names from the logs:


PROP=8000003D
grep -nri "CtrlSrv.*copyDataToStorage.*$PROP" startup-logs/ -A 1 | grep "CtrlSrv.*: PROP_" | grep -oE 'PROP_[^"\[ \(]*' | sort | uniq


It matches the following pattern:

CtrlSrv:ff22e698:84:02: copyDataToStorage eventID(0x80030034)Data(0)size(0)
CtrlSrv:ff2314c4:83:03: PROP_MIRROR_DOWN_IN_MOVIE_MODE [0]


Caveat: not many properties can be identified this way. This should extract all of them:


grep -nri "CtrlSrv.*copyDataToStorage" startup-logs/ -A 1 | grep "CtrlSrv.*: PROP_" -B 1 | grep -oE "eventID\([^)]*\)|PROP_[^ \[]*" | tr '\n' ' ' | tr '(' '\n' | tr ')' ' ' | cut -d ' ' -f 1-3 | sort | uniq