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

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1195
Re: Canon 100D / SL1
« Reply #1375 on: June 13, 2018, 12:32:07 PM »
Best way is in crop_rec module. "Is_basic" refers to 100D / 700D / EOSM. You could add a new option or here "case" and name it like you which:

https://bitbucket.org/hudson/magic-lantern/src/d2da32f62e6cd7758171cd964ac80d3a28fd2af7/modules/crop_rec/crop_rec.c?at=crop_rec_4k&fileviewer=file-view-default#crop_rec.c-110

Important places:
https://bitbucket.org/hudson/magic-lantern/src/d2da32f62e6cd7758171cd964ac80d3a28fd2af7/modules/crop_rec/crop_rec.c?at=crop_rec_4k&fileviewer=file-view-default#crop_rec.c-522
https://bitbucket.org/hudson/magic-lantern/src/d2da32f62e6cd7758171cd964ac80d3a28fd2af7/modules/crop_rec/crop_rec.c?at=crop_rec_4k&fileviewer=file-view-default#crop_rec.c-843

Ofc you have to fiddle a lil bit but generally you just can return the values needed like this:
https://bitbucket.org/hudson/magic-lantern/src/d2da32f62e6cd7758171cd964ac80d3a28fd2af7/modules/crop_rec/crop_rec.c?at=crop_rec_4k&fileviewer=file-view-default#crop_rec.c-894

Hope you get what I mean. The code cheks for video modes etc. Maybe hard to understand at first but should be doable.. a1ex uses delta values and some hardcoded ones maybe that could be a way to unify it for apsc cams for e.g. find safe working deltas by comparing original to overriden values on all cameras.
70D.112 & 100D.101

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1376 on: June 13, 2018, 12:44:30 PM »
Thanks Nikfreak, I see what I can understand and not.
Clear preview with this. Breaks when increasing height. You probably know why. I have no idea  8):
Quote
Following gives 14bit-lossless 24 fps with good preview capabilities, 16:9, a good preset):
2520x1248
Code: [Select]
            case 0x6804:                /* C0F06804 - raw resolution */
                return 0x50802a1;

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1377 on: June 13, 2018, 04:38:20 PM »
Even with pointers creating the preset seems complicated enough to have me occupied for a long while. ANother question on the topis this change:
2520x1080
Code: [Select]
            case 0x6804:                /* C0F06804 - raw resolution */
                return 0x45902a1;

A slight change gets valid 1080p instead of 1072p and seems working with all bits. I can´t see where this register change should be replaced when it comes to x5 zoom code? It's only one little number doing this 0x45802a1 to this 0x45902a1.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1378 on: June 14, 2018, 03:40:52 AM »
Posted two new versions for the 100D:
2.5k(with good preview)
https://bitbucket.org/Dannephoto/magic-lantern/downloads/magiclantern-Nightly.2018Jun12.100D101_adtg_gui_ver_06_2.5K.zip
3k(broken preview)
https://bitbucket.org/Dannephoto/magic-lantern/downloads/magiclantern-Nightly.2018Jun12.100D101_adtg_gui_ver_06_3K.zip

Could be run with the lua script SD overclock-adtg_gui helper.
Set global draw to off before running the script...

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Canon 100D / SL1
« Reply #1379 on: June 14, 2018, 06:39:21 AM »
You absolutely need global draw set to off before running the script. Some bug.

As explained before, battery pull with sd_uhs == data lost. The SD patch happens while ML is saving its settings (since you have clicked a menu entry, ML believes some settings might have been changed). At least increase the delay ;)

With global draw off, saving the settings ends right before the SD patching begins (by some milliseconds or so); that's why it seems to work. With global draw on, saving takes a bit longer, as the CPU usage is higher. I wouldn't rely on the repeatability of this process.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1380 on: June 14, 2018, 07:29:26 AM »
 I hear you A1ex. I will take your advice with an extra paus.
By the way. To be added here it seems 100D has a bug when running global draw on trying to turn it off. Even without sd_uhs included the lua script will simply not start from time to time. Think it's related to adtg_gui module. Eosm seems to run fine with or without global draw on. Needs more testing.
On a sidenote I must say lua is a fantastic tool here saving so many steps getting right into business.

Edit: slight change in the lua script, uploaded new versions.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1381 on: June 16, 2018, 10:21:42 AM »
@Nikfreak
Seems Bilal* is having some nice progress with the adtg registers. Black border is gone on the eosm here:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg202786#msg202786

Question. How can one do case changes to the CMOS7 register in the preset hack of yours? I can´t really understand how you got ig going? Here are the registers from Bilal in the eosm build:
Code: [Select]
    else if (is_camera("EOSM", "2.0.2"))
    {

       if (regs[reg].dst == 0xC0F0)
       {

           switch (regs[reg].reg)
           {
                case 0x6804:                /* C0F06804 - raw resolution */
                    return 0x5840298;       /* Valid liveview 2520x1248 24fps 14-bit lossless */
                 /* return 0x5040328;       /* crushed liveview 3096x1256 24fps 14-bit lossless */
                case 0x6014:
                   return 0x747;
                case 0x7150:
                  return 0x428;
                case 0x713c:
                   return 0x535;
     
            }

        }
        else if (regs[reg].dst == 2)        /* ADTG 2 */
        {
            switch (regs[reg].reg)
            {
                 case 0x8172:
                    return 0xfa8;
                 case 0x8178:
                    return 0xfa8;
                 case 0x82b6:
                    return 0x8f4;

            }

        }

    }

I still need to change
CMOS[7] 0xa49 to 0xaa9 manually...

theBilalFakhouri

  • Developer
  • Hero Member
  • *****
  • Posts: 744
Re: Canon 100D / SL1
« Reply #1382 on: June 16, 2018, 11:59:50 AM »
@Danne

This is I used for 2520x1384 @ 23.976 :
Code: [Select]
static int crop_mode_reg(int reg)
{
    if (regs[reg].dst == DST_CMOS)
    {
        switch (regs[reg].reg)
        {
            case 7: return 0xaa9;       /* CMOS[7]: ISO related? */
        }
    }
    else if (regs[reg].dst == 2)        /* ADTG 2 */
    {
        switch (regs[reg].reg)
        {
            case 0x82b6: return 0x8f4;      /* it's 5 in zoom mode and 6 in 1080p; this also overrides ADTG4 */
            case 0x8172: return 0x87c; /* without this, you get some weird artifacts; this should only go to ADTG2, not 4 */
case 0x8178: return 0x87c;
        }
    }

    return 0;
}

static int res3k_reg(int reg)
{
    if (regs[reg].dst == 0xC0F0)
    {
        switch (regs[reg].reg)
        {
            case 0x6804:                /* C0F06804 - raw resolution */
                return 0x5840298;       /* from 0x528011B -> 3072px in raw_rec */

case 0x6014: return 0x747;
case 0x713c: return 0x535;

        }
    }

The code is the same in adtg_gui.c but I am only changed/added the new registers and the values without changing the main code.
You are missing:
Code: [Select]
  if (regs[reg].dst == DST_CMOS)
    {
        switch (regs[reg].reg)
        {
            case 7: return 0xaa9;       /* CMOS[7]: ISO related? */
        }

Hint:
ADTG2[8172] N (N means NRZI value)
ADTG2[8178] N

The actual ADTG2[8172/8] N values is 6fd or 67c and you have to set it 8fd (I don't know why it's looks different from the outside)

This is what it's look like in the menu:


Sett" border="0


This settings was for Full-res --> But when selecting one of the these registers to override it the value will be different (Which we use the *different* one in adtg_gui.c) and this is explaining the black border in the EOS M (wrong values) .

From your above code:
Code: [Select]
             switch (regs[reg].reg)
            {
                 case 0x8172:
                    return 0xfa8; (***This value from outside --> the correct one is 0x87c )
                 case 0x8178:
                    return 0xfa8; (***This value from outside --> the correct one is 0x87c )
                 case 0x82b6:
                    return 0x8f4;

            }


More info

Hope this is helps!
700D 1.1.5 | no more ISOless LV err 8 / SDR104 @ 240 MHz - Constant! | Fixed Scrambled LiveView in Higher resolution | Real-Time correct framing in the Way

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1383 on: June 16, 2018, 01:05:38 PM »
ah, great Bilal. THis work for me:
Code: [Select]
    else if (is_camera("EOSM", "2.0.2"))
    {

       if (regs[reg].dst == DST_CMOS)
       {
           switch (regs[reg].reg)
           {
                 case 7: return 0xaa9;       /* CMOS[7]: ISO related? */
           }
       }

       if (regs[reg].dst == 0xC0F0 && DST_CMOS)
       {

           switch (regs[reg].reg)
           {
                case 7: return 0xaa9;       /* CMOS[7]: ISO related? */
                case 0x6804:                /* C0F06804 - raw resolution */
                    return 0x5840298;       /* Valid liveview 2520x1248 24fps 14-bit lossless */
                 /* return 0x5040328;       /* crushed liveview 3096x1256 24fps 14-bit lossless */
                case 0x6014:
                   return 0x747;
                case 0x7150:
                  return 0x428;
                case 0x713c:
                   return 0x535;
     
            }

        }
        else if (regs[reg].dst == 2)        /* ADTG 2 */
        {
            switch (regs[reg].reg)
            {
                 case 0x8172:
                    return 0xfa8;
                 case 0x8178:
                    return 0xfa8;
                 case 0x82b6:
                    return 0x8f4;

            }

        }

    }

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1384 on: June 16, 2018, 02:32:27 PM »
2520x1304 24.006fps(increasing vertical resolution from here yields corruption)
Code: [Select]
    if (is_camera("100D", "1.0.1"))
    {

       if (regs[reg].dst == DST_CMOS)
       {
           switch (regs[reg].reg)
           {
                 case 7:
    return 0xaa9;       /* CMOS[7]: ISO related? */
           }
       }

       if (regs[reg].dst == 0xC0F0)
       {

           switch (regs[reg].reg)
           {
                case 0x6804:                /* C0F06804 - raw resolution */
                    return 0x53902a1;       /* 2520x1304 24.006fps 14-bit lossless */
                 /* return 0x50802a1;          2520x1248 24.006fps 14-bit lossless */
                case 0x6014:
                    return 0x71c;
    case 0x713c:
    return 0x535;
            }

        }
        else if (regs[reg].dst == 2)        /* ADTG 2 */
        {
            switch (regs[reg].reg)
            {
            case 0x82b6:
       return 0x8f4;      /* it's 5 in zoom mode and 6 in 1080p; this also overrides ADTG4 */
            case 0x8172:
       return 0x87c; /* without this, you get some weird artifacts; this should only go to ADTG2, not 4 */
    case 0x8178:
       return 0x87c;

            }

        }

    }

3096x1320 20fps (seems max, increasing gives black side)
Code: [Select]
     if (is_camera("100D", "1.0.1"))
    {

       if (regs[reg].dst == DST_CMOS)
       {
           switch (regs[reg].reg)
           {
case 5:
      return 0x280;       /* CMOS[5]: ISO related? */
                 case 7:
    return 0xa89;       /* CMOS[7]: ISO related? */
           }
       }

       if (regs[reg].dst == 0xC0F0)
       {

           switch (regs[reg].reg)
           {
                case 0x6804:                /* C0F06804 - raw resolution */
                    return 0x5490331;       /* 2904x1320 20fps 14-bit lossless */
    case 0x6824:
    return 0x3ca;
    case 0x6828:
    return 0x3ca;
    case 0x682c:
    return 0x3ca;
    case 0x6830:
    return 0x3ca;
    case 0x6008:
    return 0x37b037b;
    case 0x600c:
    return 0x37b037b;
    case 0x6010:
    return 0x37b;
    case 0x6014:
    return 0x6d7;
    case 0x713c:
    return 0x555;
            }

        }
        else if (regs[reg].dst == 2)        /* ADTG 2 */
        {
            switch (regs[reg].reg)
            {
            case 0x82b6:
       return 0x7f4;      /* it's 5 in zoom mode and 6 in 1080p; this also overrides ADTG4 */
            case 0x8172:
       return 0x77c; /* without this, you get some weird artifacts; this should only go to ADTG2, not 4 */
    case 0x8178:
       return 0x77c;

            }

        }

    }

4056x2552 9fps:
Code: [Select]
   if (is_camera("100D", "1.0.1"))
    {

       if (regs[reg].dst == DST_CMOS)
       {
           switch (regs[reg].reg)
           {
case 5:
      return 0x200;       /* CMOS[5]: ISO related? */
                 case 7:
    return 0xf20;       /* CMOS[7]: ISO related? */
           }
       }

       if (regs[reg].dst == 0xC0F0)
       {

           switch (regs[reg].reg)
           {
                case 0x6804:               
                    return 0xa1b0421;       /* 4056x2552 9fps 14-bit lossless */
    case 0x6824:
    return 0x4ca;
    case 0x6828:
    return 0x4ca;
    case 0x682c:
    return 0x4ca;
    case 0x6830:
    return 0x4ca;
    case 0x6008:
    return 0x45b045b;
    case 0x600c:
    return 0x45b045b;
    case 0x6010:
    return 0x45b;
    case 0x6014:
    return 0xbd4;
    case 0x713c:
    return 0xa55;
            }

        }
        else if (regs[reg].dst == 2)        /* ADTG 2 */
        {
            switch (regs[reg].reg)
            {
            case 0x82b6:
       return 0xbf4;      /* it's 5 in zoom mode and 6 in 1080p; this also overrides ADTG4 */
            case 0x8172:
       return 0x8fd;
          case 0x8178:
       return 0x8fd;

            }

        }

    }

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1385 on: June 16, 2018, 10:20:39 PM »
New version(thanks to bilal)
2.5k (2520x1304 24fps)
https://bitbucket.org/Dannephoto/magic-lantern/downloads/magiclantern-Nightly.2018Jun16.100D101_2.5k.zip

Automation if wanted via lua script. Reworked/renamed to adtg_gui helper

OlRivrRat

  • Hero Member
  • *****
  • Posts: 538
Re: Canon 100D / SL1
« Reply #1386 on: June 17, 2018, 07:41:58 AM »
                     @Danne

Running Your Latest > magiclantern-Nightly.2018Jun16.100D101_2.5k

Only 3 Scripts showing >

enable SD overclocking
Reboot
Show console

also unable to capture ScreenShot

What am I doing wrong this time?
ORR~DeanB  ~~  80D-ML  &  SL1+ML  &  5D2+ML  &  5DC+ML  &  70D+ML(AliveAgain)

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1387 on: June 17, 2018, 08:23:27 AM »
That is strange. If the scripts are in the scripts folder could you try renaming them by removing spaces and see if that helps?
Are more users having this issue?

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1388 on: June 17, 2018, 08:43:32 AM »
@OlRivrRat
Could you try downloading it again?
https://bitbucket.org/Dannephoto/magic-lantern/downloads/magiclantern-Nightly.2018Jun16.100D101_2.5k.zip

I renamed all scripts by removing . and _. Maybe those aren´t working at your end? Readability will take a hit but it should look ok in camera.

OlRivrRat

  • Hero Member
  • *****
  • Posts: 538
Re: Canon 100D / SL1
« Reply #1389 on: June 17, 2018, 05:35:15 PM »
@Danne

DownLoaded Your ReName build > No Change. Will try some Shorter Names in a few & report back.
ORR~DeanB  ~~  80D-ML  &  SL1+ML  &  5D2+ML  &  5DC+ML  &  70D+ML(AliveAgain)

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8168
Re: Canon 100D / SL1
« Reply #1390 on: June 17, 2018, 05:48:47 PM »
File name length problem. Mine throws screen messages clearly saying they could not be loaded.
-> Only 3 scripts visible in ML menu.

OlRivrRat

  • Hero Member
  • *****
  • Posts: 538
Re: Canon 100D / SL1
« Reply #1391 on: June 17, 2018, 05:49:03 PM »
@Danne

If I get a Name down to 11 Characters it Shows Up .
ORR~DeanB  ~~  80D-ML  &  SL1+ML  &  5D2+ML  &  5DC+ML  &  70D+ML(AliveAgain)

OlRivrRat

  • Hero Member
  • *****
  • Posts: 538
Re: Canon 100D / SL1
« Reply #1392 on: June 17, 2018, 05:51:36 PM »
& it does Show with Your Orig' Naming ~
ORR~DeanB  ~~  80D-ML  &  SL1+ML  &  5D2+ML  &  5DC+ML  &  70D+ML(AliveAgain)

OlRivrRat

  • Hero Member
  • *****
  • Posts: 538
Re: Canon 100D / SL1
« Reply #1393 on: June 17, 2018, 05:58:31 PM »
Naming I am using tha works >

5x25k10bi1m.lua
5x25k10bi8m.lua
1080p12bi1m.lua
1080p12bi8m.lua
adtgguihlpr.lua
drkframcrtr.lua
lib
reboot.lua
SDoverclock.lua
ORR~DeanB  ~~  80D-ML  &  SL1+ML  &  5D2+ML  &  5DC+ML  &  70D+ML(AliveAgain)

OlRivrRat

  • Hero Member
  • *****
  • Posts: 538
Re: Canon 100D / SL1
« Reply #1394 on: June 17, 2018, 06:00:40 PM »
Probably due to SL1 being So Small ~ {:~))
ORR~DeanB  ~~  80D-ML  &  SL1+ML  &  5D2+ML  &  5DC+ML  &  70D+ML(AliveAgain)

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7204
Re: Canon 100D / SL1
« Reply #1395 on: June 17, 2018, 06:06:20 PM »
Ok, thanks both for reporting. Totally slipped my radar since my 100D plays all scripts nicely. How can it be? Menu language? Anyway. Will shorten names asap.

OlRivrRat

  • Hero Member
  • *****
  • Posts: 538
Re: Canon 100D / SL1
« Reply #1396 on: June 17, 2018, 06:12:25 PM »
I am correct in assuming that Yours is a European Version & the Firmware is Diff'?
ORR~DeanB  ~~  80D-ML  &  SL1+ML  &  5D2+ML  &  5DC+ML  &  70D+ML(AliveAgain)

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8168
Re: Canon 100D / SL1
« Reply #1397 on: June 17, 2018, 06:37:53 PM »
Nope, it's not language but file system. I just tried with 8 GB card (FAT32) and long file names are not a problem here. Used ExFAT and "Houston, we have a problem".

Debugging. What it looks like:

Source: Imgur

OlRivrRat

  • Hero Member
  • *****
  • Posts: 538
Re: Canon 100D / SL1
« Reply #1398 on: June 17, 2018, 06:54:58 PM »
My card is 64GB ExFAT. I format all My Cards ExFAT.

I am also not getting the Same Scripts Display that Dannes Vid shows.

The "SD overclock-adtg_gui helper" choice is not Displayed.
ORR~DeanB  ~~  80D-ML  &  SL1+ML  &  5D2+ML  &  5DC+ML  &  70D+ML(AliveAgain)

OlRivrRat

  • Hero Member
  • *****
  • Posts: 538
Re: Canon 100D / SL1
« Reply #1399 on: June 17, 2018, 07:00:53 PM »
Finally got ScreenShot of Scripts Page >

ORR~DeanB  ~~  80D-ML  &  SL1+ML  &  5D2+ML  &  5DC+ML  &  70D+ML(AliveAgain)