Author Topic: Canon 100D / SL1  (Read 658390 times)

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654

ArcziPL

  • Contributor
  • Member
  • *****
  • Posts: 190
Re: Canon 100D / SL1
« Reply #1301 on: June 05, 2018, 09:31:04 PM »
As I can't do myself atm:
can someone provide me a working build with adtg module included for 100D plz??

last one I used to compile should have been this:
https://bitbucket.org/nikfreak/magic-lantern/branch/isoresearch
Recent vanilla iso-research branch compiled for 100D with default modules (adtg_gui included). Not tested as I don't have a 100D.

https://bitbucket.org/ArcziPL/magic-lantern/downloads/magiclantern-isoresearch-Nightly.2018Jun05.100D101.zip
M50.110 [main cam] | G7X III [pocket cam] | 70D.112 [gathers dust] | M.202 [gathers dust] | waiting for M5II

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 100D / SL1
« Reply #1302 on: June 06, 2018, 10:11:05 AM »
Thanks. Tried Danne's and Works!
70D.112 & 100D.101

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654
Re: Canon 100D / SL1
« Reply #1303 on: June 06, 2018, 08:23:25 PM »
Maybe trying to override the column binning and line skipping registers in adtg_gui? I'd like to see some diffs between these two video modes.

Rough step-by-step:
- enter 1080p non-crop, without FPS override
- enable ADTG Registers and DIGIC registers
- if it locks up, try reducing FPS from adtg_gui menu
- go to PLAY mode and back (or MENU if you have mlv_play loaded)
- in adtg_gui menu, select Modified from now on
- go to PLAY mode and back
- make sure adtg_gui shows no registers; otherwise, select again Modified from now on and repeat
- enable 3x crop mode
- adtg_gui menu -> Log Registers Now (saves the difference between these two video modes to file)

Next, try turning one video mode into another. You can do that by locking a subset of registers (so they won't change as you switch video modes), or by manually tweaking registers. Line skipping is ADTG 0x800C or 0x8000. Column binning is somewhere in CMOS registers. Don't know what limits the max FPS besides resolution, but comparing these two video modes is a good way to find out.

Trying to follow these steps but problems occur on the way. Running crop_rec_4k with the adtg_gui module included and it sure looks nice with all features included in the adtg_gui but the 100D seems to have a hard time to handle this workflow.
- enter 1080p non-crop, without FPS override
- enable ADTG Registers and DIGIC registers
- if it locks up, try reducing FPS from adtg_gui menu

SO far so good, reducing fps(Force low FPS) seems to help a little but as soon as I enter play and want to go back screen turns completely black and needs battery pull and restart. Can´t seem to get pass this step. I have only mlv_lite and adtg_gui module loaded.

On a side note, probably not realted. When running mlv_play.mo it often goes into black screen when previewing recorded mlv footage. Sometimes it works, loads a photo then starts to play the mlv file but more often it will simply stop working and go into black screen.

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 100D / SL1
« Reply #1304 on: June 06, 2018, 08:32:43 PM »
Can someone please create a special version of adtg module containing a submenu "crop_rec REGS" which only contains all regs from crop_rec.c: CMOS1-7 / ADTG2[0x8xxx] / C0F060xxx / C0F068xxx / C0F07xxxx

Should be round about 50 regs maybe less maybe more. Guess also useful for other cams.
100D apparently locks up often while fiddling with the submenus. Have to take out battery often.

I managed to get 3520x1980 with some pinkish LCD preview at 3.5fps. Half of lcd was broken / dirty output. Didn't record any stuff. My personal interest is in FULLRES_LV. I remember a1ex stating 5D3 could do silent pictures with 1/8000 or faster ?! Maybe I remember wrong. Above request could help with fiddling. Danne seems to work on same....

My notebook charger is broken.Using wifes atm lefthanded and right hand is handicaped / broken + plastered (read: not finger nor arm)
70D.112 & 100D.101

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654
Re: Canon 100D / SL1
« Reply #1305 on: June 07, 2018, 11:10:37 AM »
Wow, nikfreak, good news from your adtg_gui. Hope your recovery goes well and fast. Nut sure how to build what you need but with some pointers I might be able to help.

Quote
On a side note, probably not related. When running mlv_play.mo it often goes into black screen when previewing recorded mlv footage. Sometimes it works, loads a photo then starts to play the mlv file but more often it will simply stop working and go into black screen.
I´ll answer myself here. Since the latest fix below it actually seems that mlv_play is now reliable. Probably due to half shutter press now working as it should. Just tested a bunch of MLV files and no black screen whatsoever previewing footage in camera :):
Code: [Select]
#define INPUT_ENABLE_IMAGE_PHYSICAL_SCREEN_PARAMETER 25

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 100D / SL1
« Reply #1306 on: June 07, 2018, 12:44:22 PM »
You would have to modify "Known regs" to adjust to my request starting here:
https://bitbucket.org/hudson/magic-lantern/src/f683753bc4e3f5ef05a8ac86cab32f751aa39db0/modules/adtg_gui/adtg_gui.c?at=iso-research&fileviewer=file-view-default#adtg_gui.c-31

Leave CMOS 1-7 values and replace all following to the ones a1ex uses for 5D3 in crop_rec branch. It should be like this:

Code: [Select]
static struct known_reg known_regs[] = {
    {DST_CMOS,      0, 0, "Analog ISO (most cameras)"},
    {DST_CMOS,      1, 0, "Vertical offset"},
    {DST_CMOS,      2, 0, "Horizontal offset / column skipping"},
    {DST_CMOS,      3, 0, "Analog ISO on 6D"},
    {DST_CMOS,      4, 0, "ISO-related?"},
    {DST_CMOS,      5, 0, "Fine vertical offset, black area maybe"},
    {DST_CMOS,      6, 0, "ISO 50 or timing related: FFF => darker image"},
    {DST_CMOS,      7, 0, "Looks like the cmos is dieing (g3gg0)"},
    {DST_ADTG, 0x8000, 0, "Causes interlacing (g3gg0)"},
    {DST_ADTG, 0x8806, 0, "Causes interlacing artifacts"},
    {DST_ADTG, 0x800C, 0, "Line skipping factor (2 = 1080p, 4 = 720p, 0 = zoom)"},
    {DST_ADTG, 0x805E, 1, "Shutter blanking for x5/x10 zoom"},
    {DST_ADTG, 0x8060, 1, "Shutter blanking for LiveView 1x"},
    {DST_ADTG, 0x8172, 1, "Line count to sample. same as video resolution (g3gg0)"},
    {DST_ADTG, 0x8178, 1, "dwSrFstAdtg1[4], Line count + 1"},
    {DST_ADTG, 0x8179, 1, "dwSrFstAdtg1[5]"},
    {DST_ADTG, 0x8196, 1, "dwSrFstAdtg1[2], Line count + 1"},
    {DST_ADTG, 0x8197, 1, "dwSrFstAdtg1[3]"},
    {DST_ADTG, 0x82F9, 1, "dwSrFstAdtg1 and FPS related"},
    {DST_ADTG, 0x82F3, 1, "Line count that gets darker (top optical black related)"},
    {DST_ADTG, 0x82F8, 1, "Line count"},
    {DST_ADTG, 0x8830, 0, "Only slightly changes the color of the image (g3gg0)"},
    {DST_ADTG, 0x8880, 0, "Black level (reference value for the feedback loop?)"},

    {DST_ADTG, 0x8882, 0, "ISO ADTG gain (per column, mod 4 or mod 8)"},
    {DST_ADTG, 0x8884, 0, "ISO ADTG gain (per column, mod 4 or mod 8)"},
    {DST_ADTG, 0x8886, 0, "ISO ADTG gain (per column, mod 4 or mod 8)"},
    {DST_ADTG, 0x8888, 0, "ISO ADTG gain (per column, mod 4 or mod 8)"},
    {0xC0F0,   0x6000, 0, "FPS register for confirming changes"},
    {0xC0F0,   0x6004, 0, "FPS related, SetHeadForReadout"},
    {0xC0F0,   0x6008, 0, "FPS register A"},
    {0xC0F0,   0x600C, 0, "FPS related"},
    {0xC0F0,   0x6010, 0, "FPS related"},
    {0xC0F0,   0x6014, 0, "FPS register B"},
    {0xC0F0,   0x6018, 0, "FPS related"},
    {0xC0F0,   0x601C, 0, "FPS related"},
    {0xC0F0,   0x6020, 0, "FPS related"},
    {0xC0F0,   0x6084, 0, "RAW first line|column. Column is / 2. 600D: 0x0001007E."},
    {0xC0F0,   0x6088, 0, "RAW last line|column. 600D: FHD 1182|1070, 3x 1048|1102, HD 720|1070"},

    {0xC0F0,   0x6800, 0, "RAW first line|column. Column is / 8 on 5D3 (parallel readout?)"},
    {0xC0F0,   0x6804, 0, "RAW last line|column. 5D3: f6e|2fe, first 1|18 => 5936x3950"},
    {0xC0F0,   0x6824, 0, " "},
    {0xC0F0,   0x6828, 0, " "},
    {0xC0F0,   0x682C, 0, " "},
    {0xC0F0,   0x6830, 0, " "},
   
    {0xc0f0,   0x7134, 0, "HEAD3 timer (start?)"},
    {0xc0f0,   0x7138, 0, "HEAD3 timer"},
    {0xc0f0,   0x713C, 0, "HEAD3 timer (ticks?)"},

    {0xc0f0,   0x7148, 0, "HEAD4 timer (start?)"},
    {0xc0f0,   0x714c, 0, "HEAD4 timer"},
    {0xc0f0,   0x7150, 0, "HEAD4 timer (ticks?)"},
};


Hope didn't forget one. You can check from crop_rec branch crop_rec.c and search through "0xC0f06", "0x8" for ADTG, "0xC0f07". Check also user mk1174 posts where he posts screenshots for 700D. I remember him stating ADTG2 82B6 is needed too. add that too and post the updated adtg module. I hope with the reduced list it will become easier for us to test and the "lockups" will be less.
70D.112 & 100D.101

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Canon 100D / SL1
« Reply #1307 on: June 07, 2018, 02:07:39 PM »
Can someone please create a special version of adtg module [...] ?

Added a Jenkins account, so you should now be able to create custom ML builds directly from your browser, using any bitbucket repository. I almost never get adtg_gui changes to work from the first try, so you may want to fiddle with the code a bit.

My personal interest is in FULLRES_LV. I remember a1ex stating 5D3 could do silent pictures with 1/8000 or faster ?

Almost there:

this can reach shutter speeds as fast as 1/15000, with a rolling shutter of 128ms on 5D3

I've also got a half-working PoC for combining LiveView frames in real-time (based on the Eeko code, so DIGIC 5 only). That could be interesting for long exposures in daylight (effectively a software ND filter), and maybe also for advanced bracketing sequences with minimal delays between frames (maybe even zero delay in some cases). Planning to try it on a 700D later this summer, but unable to promise anything.

I hope with the reduced list it will become easier for us to test and the "lockups" will be less.

Lock-ups are very likely caused by DIGIC (ENGIO) registers - there are a lot of these and the overhead of adtg_gui is noticeable. Removing things from the known list may help a bit, but I'd rather try to disable uninteresting registers as early as possible (before they get into the AVL tree). The menu selection doesn't do that - it currently filters only what gets displayed, but all the registers are processed in background.

Another trick: if all the registers are written by engio_write, comment out EngDrvOut. Or the other way.

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 100D / SL1
« Reply #1308 on: June 07, 2018, 02:29:19 PM »
would it be sufficient to disable / commentout lines 862 / 863 as well as 875 / 876 ??
https://bitbucket.org/hudson/magic-lantern/src/f683753bc4e3f5ef05a8ac86cab32f751aa39db0/modules/adtg_gui/adtg_gui.c?at=iso-research&fileviewer=file-view-default#adtg_gui.c-862

Nevertheless Danne if you can modify the known regs above would be cool.
70D.112 & 100D.101

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Canon 100D / SL1
« Reply #1309 on: June 07, 2018, 02:41:18 PM »
Yeah, commenting these out should help. However, there are still many registers written via engio_write; if the logging delay happens in some time-critical piece of code, LiveView initialization may stop. I get such lockups on 5D3 in 50/60p; they used to be in regular LiveView (24/25/30p) as well, but optimizing the logging code (fast patch hooks + AVL tree) took care of that.

If it doesn't help, in engio_write_log, skip the call to reg_update_unique_32 for the registers that are not interesting (hardcode some conditions that are quick to evaluate). You could also skip all the calls to that function just to make sure it won't lock up, then call it only for the registers you want to study.

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 100D / SL1
« Reply #1310 on: June 07, 2018, 02:51:12 PM »
Thanks!Liveview is totally uneditable atm on 100D. Hangs relatively fast.
Danne waiting for you. Maybe we can consider removing lines 861 as well as 874 too :P forget that
Thx in advance.
70D.112 & 100D.101

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654
Re: Canon 100D / SL1
« Reply #1311 on: June 07, 2018, 03:35:03 PM »
Having some difficulties getting adtg_gui to work using this branch:
https://bitbucket.org/Dannephoto/magic-lantern/branch/crop_rec_4k_display_filter_lv_vsync_100D_fix

Can add your changes and get it to compile by commenting out:
Code: [Select]
    else if (is_camera("100D", "1.0.1"))
    {
        ADTG_WRITE_FUNC = 0x47144; //"[REG] @@@@@@@@@@@@ Start ADTG[CS:%lx]"
        CMOS_WRITE_FUNC = 0x475B8; //"[REG] ############ Start CMOS"
     // ENGIO_WRITE_FUNC = 0xFF2B2460;  // from stubs
     // ENG_DRV_OUT_FUNC = 0xFF2B2148;

But getting complaints when running mlv_lite and adtg_gui in camera:
Code: [Select]
ML ASSERT:
new_entry->name
at ../../src/menu.c:1324 (menu_add_internal), task module_task
lv:1 mode:3

module_task stack: 21ebe8 [21ee68-21ae68]
0xUNKNOWN  @ 49c084:21ec78
0x0045545C @ a7cdac:21ec70
0x00451780 @ 455488:21ec58
0x00451780 @ 451b58:21ec38
0x0044C938 @ 4519c4:21ec18
0x0044C478 @ 44c994:21ebe8

Magic Lantern version : Nightly.2018Jun07.100D101
Mercurial changeset   : 24e2631aabb6+ (crop_rec_4k_display_filter_lv_vsync_100D_fix) tip
Built on 2018-06-07 13:25:45 UTC by dan@dans-MacBook-Pro.local.
Free Memory  : 586K + 2349K

Not related to nikfreak´s changes I suppose.
A bit hectic here, gotta run...




Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654
Re: Canon 100D / SL1
« Reply #1312 on: June 08, 2018, 11:15:53 PM »
@nikfreak
Compiled your registers into iso-research branch and that adtg_gui seems to work better:
https://bitbucket.org/Dannephoto/magic-lantern/downloads/magiclantern-Nightly.2018Jun08.100D101_nikfreak.zip

Let´s see if we can start from that version and dig further.

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 100D / SL1
« Reply #1313 on: June 09, 2018, 07:38:13 PM »
battery pull-outs rubbing my nerves:
https://drive.google.com/drive/folders/1qQ0SRRHxP3-u3k6iCi4r8Akhpc70gh53?usp=sharing

Will see if I can replicate again tomorrow and try to reach limits for 24fps. Maybe we will get lucky as 100D has some fps potential
70D.112 & 100D.101

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654
Re: Canon 100D / SL1
« Reply #1314 on: June 09, 2018, 08:11:38 PM »
Nice man!
I could erase the lines you mention(engio stuff) and upload a new version if it could help here. just let me know.
Quote
would it be sufficient to disable / commentout lines 862 / 863 as well as 875 / 876 ??
These lines?

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 100D / SL1
« Reply #1315 on: June 09, 2018, 08:24:56 PM »
Yes those!  :D
70D.112 & 100D.101


nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 100D / SL1
« Reply #1317 on: June 09, 2018, 08:38:07 PM »
29xx (W) * 107x (H) in X5 zoom mode:
https://drive.google.com/file/d/14nFXHTKfLSTjWfgtPInJtPMu1pTIW3CO/view?usp=sharing

Take it with a grain of salt. Values just found by failing/ trying / hunting. I am getting too much (m)alloc errors with adtg gui enabled and only managed to record one clip earlier when I posted the screenshot. We could try to implement it for testing into crop_rec module though. Extending height is another story
70D.112 & 100D.101

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654
Re: Canon 100D / SL1
« Reply #1318 on: June 09, 2018, 08:47:21 PM »
wow, yes, Some croprec testing would be cool. Is that register what you are changing to get there? Will try some over here.

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
70D.112 & 100D.101

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654
Re: Canon 100D / SL1
« Reply #1320 on: June 09, 2018, 08:54:43 PM »
holy smack. Shall we add sd_uhs and run the adtg_gui to my beefed version? Are you running the adtg_gui I provided?

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654
Re: Canon 100D / SL1
« Reply #1321 on: June 09, 2018, 09:00:48 PM »
Added adtg_gui in my version here:
https://bitbucket.org/Dannephoto/magic-lantern/downloads/magiclantern-Nightly.2018Jun09.100D101sd_uhs_adtg_gui.zip

I enabled sd_uhs and adtg_gui and then ran the lua script enable SD overclocking and then enabled adtg_gui. Seems to work...
Think I got 1080 on the height on this one.

We sure need a slimmed down adtg_gui.mo for this tiny beast  :P

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 100D / SL1
« Reply #1322 on: June 09, 2018, 09:05:28 PM »
Yeah I am running your version atm. 100D even hangs if you follow other ppl's tuts for using adtg gui for e.g. we already hang when switching to play mode.

You do it this way:
Stills mode - turn adtg gui module on and enable "Digic Registers" as well as "Known regs". Take a photo in stills mode.
Turn off adtg gui module again or it will hang next
Switch to movie mode
Turn adtg gui module on again.
Switch to X5 zoom mode
Open ML menu and override registers as seen once done open CANON MENU.
Close CANON MENU again.
Switch to X5 zoom mode and be happy about and extended rsolution (width)
check / adjust  RAW Video resolution

Dunno if its my old branch you compiling off which causes these headaches or something else but 100D should hopefully soon become unified party member so we can compile from "offical" ML branches. Having to handle custom branches and always remerge my stuff is a pain - at least for me.
70D.112 & 100D.101

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654
Re: Canon 100D / SL1
« Reply #1323 on: June 09, 2018, 09:13:03 PM »
Definitely would benefit from being an official member, I agree:
https://bitbucket.org/Dannephoto/magic-lantern/branch/crop_rec_4k_mlv_lite_snd_sd_uhs_HDR_ext_all_bits

THis is the branch I´m in atm. Will try your steps now.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7654
Re: Canon 100D / SL1
« Reply #1324 on: June 09, 2018, 09:40:37 PM »
phew. Do you have a short cut to how to get those registers in there? If I´m correct there are eight? I turn the wheel and get half of them but some of the registers are som far off from yours so seems I won´t get them right. Do you use any preset to this?