Canon EOS 1300D / Rebel T6

Started by the12354, October 03, 2016, 11:51:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zi7ar21

Quote from: petabyte on January 02, 2023, 03:22:59 AM
Magic Lantern 1300D 1.2.0: I've been testing this for a while to make sure there aren't any random crashes, and it's worked okay so far.
I updated every single address I could find (and checked all the ifdefs). The code is copied directly from critix's 0.1.0 repository.
Passed self test. I went ahead and deleted a few modules I wasn't confident with, but left mlvlite in. I've recorded a good bit of raw (maybe 10-20 minutes) and I haven't had any issues so far, but I should still warn you, it might break your camera. No guarantees.

https://eggnog.theres.life/f/66-ks45fna8sx9si9m3tf6jrgf3uchkkx.zip

I've made a few attempts to port the 1300D port to the names_are_hard magiclantern_simplified fork, but the camera crashes after trying to register some property handlers. I probably won't continue trying (no point in doing so), but if anybody else wants to give it a shot: https://github.com/petabyt/magiclantern_simplified/tree/1300d
I can confirm that it works on my Rebel T6 running 1.2.0, thank you so much! It was a pain downgrading just so I could run magic lantern, but now I don't have to! On 1.1.0 for some reason the colors on the display were warm, maybe Canon added calibration or something? I don't have a colorimeter so I don't know. Anyways, running with the latest firmware is always nice. :D

The Penguin

I just tried critix 0.1.0 version on my 1300D with firmware 1.1.0 and got raw video (without sound and without playback) working on my camera.

Thank you very much for the great work!

I have two questions:
- What is the maximal bitrate you get with the 1300D? Although I have quite fast SD cards, my maximal bitrate was around 20MByte/sec. This means that I only get a few (roughly 4) seconds of 1280 video when reduced to 2:1 and 24fps. Does someone get better results and if yes, what card are you using?
- Is there any advantage for Magic Lantern that I would get by upgrading my camera to firmware 1.2.0 and use Petabyte's Magic Lantern version?

petabyte

1.2.0 version has no new features.
As for RAW, I wasn't able to get anything that good, only a few seconds of decent footage at a time on my 80mbs SansDisk ultra.

Also, as an update to this thread, I've recently modified mlinstall to work with my camlib/libwpd libraries, which work on Windows natively. No more libusb nonsense soon. Works great on my end, I'll release it once I've done more testing.

laheller

Quote from: petabyte on January 02, 2023, 03:22:59 AM
Magic Lantern 1300D 1.2.0: I've been testing this for a while to make sure there aren't any random crashes, and it's worked okay so far.
I updated every single address I could find (and checked all the ifdefs). The code is copied directly from critix's 0.1.0 repository.
Passed self test. I went ahead and deleted a few modules I wasn't confident with, but left mlvlite in. I've recorded a good bit of raw (maybe 10-20 minutes) and I haven't had any issues so far, but I should still warn you, it might break your camera. No guarantees.

https://eggnog.theres.life/f/66-ks45fna8sx9si9m3tf6jrgf3uchkkx.zip

I've made a few attempts to port the 1300D port to the names_are_hard magiclantern_simplified fork, but the camera crashes after trying to register some property handlers. I probably won't continue trying (no point in doing so), but if anybody else wants to give it a shot: https://github.com/petabyt/magiclantern_simplified/tree/1300d
Hi @petabyte

I am a newbie.
Just installed ML 1300D 1.2.0. It works, but there is no ISO setting/submenu under the Expo menu:



Update:
I tried it in "M" mode.
In the Video mode, the ML menu does not even appear when I press the Delete button.

BR,

Ladislav
1300D

petabyte

Quote from: laheller on April 07, 2023, 07:13:23 PM
Just installed ML 1300D 1.2.0. It works, but there is no ISO setting/submenu under the Expo menu:

ISO feature was disabled, probably several years ago during development: https://github.com/petabyt/magiclantern_simplified/blob/a661de1242e4b892697c6abb665f88380d7c75da/platform/1300D.120/features.h#L38
I don't know if it works or why it's disabled.

laheller

Quote from: petabyte on April 08, 2023, 05:06:30 PM
ISO feature was disabled, probably several years ago during development: https://github.com/petabyt/magiclantern_simplified/blob/a661de1242e4b892697c6abb665f88380d7c75da/platform/1300D.120/features.h#L38
I don't know if it works or why it's disabled.
Any chance to enable it and create a test build? I'll take the risk and will test it.

1300D

petabyte

Quote from: laheller on April 08, 2023, 05:55:50 PM
Any chance to enable it and create a test build? I'll take the risk and will test it.

You can remove that line and compile it yourself. In the future I might look into it.

names_are_hard

Quote from: petabyte on April 09, 2023, 02:45:45 AM
You can remove that line and compile it yourself. In the future I might look into it.

This is potentially dangerous advice.

Enabling the feature will cause ML to write to registers.  If these addresses have changed it could permanently damage the camera.

Do not enable this feature unless you have verified the register values still hold for the new cam.

E.g. here in lv-img-engio.c, EngDrvOutLV() triggers writes:


  25 #define SHAD_GAIN      0xc0f08030       // controls clipping point (digital ISO)
  26 #define SHAD_PRESETUP  0xc0f08034       // controls black point? as in "dcraw -k"
  27 #define ISO_PUSH_REGISTER 0xc0f0e0f8    // like display gain, 0x100 = 1 stop, 0x700 = max of 7 stops
...
827 #ifdef FEATURE_EXPO_ISO_DIGIC
828     if (mv)
829     {
830         if (digic_iso_gain_movie_for_gradual_expo == 0) digic_iso_gain_movie_for_gradual_expo = 1024;
831         int total_movie_gain = DIGIC_ISO_GAIN_MOVIE * digic_iso_gain_movie_for_gradual_expo / 1024;
832         if (total_movie_gain != 1024)
833         {
834             autodetect_default_white_level();
835             int boost_stops = 0;
836             int new_gain = get_new_white_level(total_movie_gain, &boost_stops);
837             EngDrvOutLV(SHAD_GAIN, new_gain);
838             shad_gain_last_written = new_gain;
839             #ifndef CONFIG_DIGIC_V
840             EngDrvOutLV(ISO_PUSH_REGISTER, boost_stops << 8);
841             #endif
842         }

petabyte

Quote from: names_are_hard on April 09, 2023, 03:11:56 AM
This is potentially dangerous advice.

Enabling the feature will cause ML to write to registers.  If these addresses have changed it could permanently damage the camera.

Do not enable this feature unless you have verified the register values still hold for the new cam.

E.g. here in lv-img-engio.c, EngDrvOutLV() triggers writes:


  25 #define SHAD_GAIN      0xc0f08030       // controls clipping point (digital ISO)
  26 #define SHAD_PRESETUP  0xc0f08034       // controls black point? as in "dcraw -k"
  27 #define ISO_PUSH_REGISTER 0xc0f0e0f8    // like display gain, 0x100 = 1 stop, 0x700 = max of 7 stops
...
827 #ifdef FEATURE_EXPO_ISO_DIGIC
828     if (mv)
829     {
830         if (digic_iso_gain_movie_for_gradual_expo == 0) digic_iso_gain_movie_for_gradual_expo = 1024;
831         int total_movie_gain = DIGIC_ISO_GAIN_MOVIE * digic_iso_gain_movie_for_gradual_expo / 1024;
832         if (total_movie_gain != 1024)
833         {
834             autodetect_default_white_level();
835             int boost_stops = 0;
836             int new_gain = get_new_white_level(total_movie_gain, &boost_stops);
837             EngDrvOutLV(SHAD_GAIN, new_gain);
838             shad_gain_last_written = new_gain;
839             #ifndef CONFIG_DIGIC_V
840             EngDrvOutLV(ISO_PUSH_REGISTER, boost_stops << 8);
841             #endif
842         }

Didn't know that. Thanks for letting me know.

names_are_hard

Always check what code is surrounded by CONFIG or FEATURE ifdefs - it's often weird or potentially dangerous, that's why it's behind a flag.  We run into this a lot trying to port to Digic 6, 7, 8, X.  The old code assumes all cams will have stuff at the same addresses because D4 and 5 were quite similar.  So, sometimes it just hardcodes a constant in a source file, with no guards.

1300D is what, D4+?  Probably fairly similar, but I'd expect some changes.  Plus it's a later model and sometimes things change without a digic version change, but because Canon used some different component on the board later on, etc.

This kind of stuff is why I think the 1300D build needs a lot more testing, methodically, of every feature, with uart connected to get better logs.  It's almost certainly got some serious bugs.

petabyte

For anybody wanting to take up development for this port:
Critix's current repository for v1.1.0 is here: https://github.com/ccritix/magic-lantern
My v1.2.0 fork of his code is here: https://github.com/petabyt/magiclantern

It's been a long time since I worked on the v1.2.0 port, and I believe I lost some of my bug fixes I had worked on after wiping my old laptop. Since then I've been busy with many other things, and no longer can work on ML ports. I'll continue to maintain mlinstall and the PTP library it uses. I've been using my port for light photography and haven't had any crashes, but it still is mostly untested. The current build fails a self test because of cache issues. I think I remember fixing it, but I still have the issue on the last backup I had made.

critix

I have added a new version for 1300D which solves the error display problem if the firmware version is not the correct one. The rest of the devices displayed an error message, but this device is more atypical.
https://bitbucket.org/ccritix/magic-lantern-git/downloads/magiclantern-Nightly.2023Sep30.1300D110.zip

I think the same should be done for the 2000D and 4000D (I haven't checked, but since they are similar devices, I think it would be the same)
Canon 1300D, 500D, EOS M, EOS M2

names_are_hard

Sounds interesting - what's the code change?  I don't see any updates to the repo (makes it hard to apply to other cams :) )

critix

Canon 1300D, 500D, EOS M, EOS M2

names_are_hard

Thanks. I'm having trouble understanding these changes.  You're searching a different range, but there's no comment explaining why.  Did the bootloader move?  How should 2000D / 4000D devs know if or why these changes are required on their cams?

(Also you've mixed tabs and spaces so the formatting is kind of messed up)

critix

From fw-signature.h:
Quote#define SIG_1300D_110 0x3d8461b5 // from FE0C0000 (atypical)
For the rest of the devices, the signature is from FF010000 (ROMBASEADDR = 0xFF010000 from ex: 1100D/Makefile.platform.default)
On 1300D it is at FE0C0000 (ROMBASEADDR = 0xFE0C0000  from 1300D/Makefile.platform.default)
On 2000D: ROMBASEADDR = 0xFE0C0000, so it must be like on 1300D
Canon 1300D, 500D, EOS M, EOS M2

names_are_hard

I meant the search range change, here:


    #if defined(CONFIG_1300D)
    for (uint32_t i = 0xFE000000; i < 0xFF000000; i += 4 )
    #else
    for (uint32_t i = 0xFFFE0000; i < 0xFFFFFFF0; i += 4 )
    #endif


And here:


         #if defined(CONFIG_1300D)
                if (func_addr > 0xFE000000)
          #else
            if (func_addr > 0xFFFE0000)
           #endif


I have no way of knowing why these changes are required.

critix

Canon 1300D, 500D, EOS M, EOS M2

names_are_hard

I see.  In that case, would it make more sense to define an address for the bootloader somewhere in platform/cam dirs?  That way, you wouldn't need a special case for 1300D (which is hard to understand), and instead would have something like this:


    for (uint32_t i = BOOTLOADER_BASE_ADDR;
         i < BOOTLOADER_BASE_ADDR + 0x1fff0;
         i += 4 )

LWL-Photographie

Hi,

I am a new at this forum :). I want to install Magic lantern on my EOS1300. I want to ask, which version i should use.
Thanks to everyone who developt this!

Walter Schulz

We have some reservations right now with 1300D builds.
What do you want to do with ML?

LWL-Photographie

Hello,
I want to use it for filmmaking with my atomos.
Thanks Walter Schulz for your answer.

Walter Schulz

Quote from: LWL-Photographie on September 20, 2023, 06:47:12 PM
I want to use it for filmmaking with my atomos.

This should be quite easy and looks like little risk involved.
ML can do clean HDMI out (no overlays). And 30 minute limit can be avoided, too.
But ML can do nothing about cam's HDMI specs. Cam gives 1620x912 active area embedded in 1080i59.94 with 8 bit, 4:2:0 chroma subsampling.
If this matches your needs and expectations it really doesn't matter that much which build you want to install.

LWL-Photographie

Thanks Walter,
Do you have some advices for me how to install it? I never done this before...

Walter Schulz

Covering ccritix's build for 1300D/T6 firmware 1.1.0

Here we go for Linux and Windows:

Ingredients:
Cam running Canon firmware 1.1.0
1 PC running Windows 10/11 or Linux
USB cable to connect PC and 1300D (Mini-USB Type B)
Cardreader
SDcard
Internet connection

Camera preparation:
You need to have 1.1.0 firmware installed. If you have to upgrade visit https://eoscard.pel.hu and download v110-t6-1300d-x80-win.zip. It is just a zipped file so ignore "win" in name. Just run with install guide included in zip.
You can downgrade, too. It may take some weird looking trick to do so. I case cam denies downgrade: Rollback tutorial by Hari https://www.magiclantern.fm/forum/index.php?topic=24926.msg231788#msg231788

While not mandatory I suggest to disable wireless features and startup cam in photo mode M. With a battery loaded properly.

Card preparation:
For HDMI streming you don't need a fast card. And ML doesn't need much space. Even 256 MByte would do fine.
Full size SD or microSD with adapter: ML doesn't care.
Format card in cam.

Downloads:
https://bitbucket.org/ccritix/magic-lantern-git/downloads/magiclantern-Nightly.2023Sep04.1300D110.zip
https://github.com/petabyt/mlinstall/releases
Pick your MLinstall package according to your OS. Windows (if not ancient) should run with win64 version.

- Run MLinstall
-- Windows: Extract zip to a proper location. Startup MLinstall as Admin. Most likely a messade "Windows protected your PC" will pop up. Select "More info" then "Run anyway".
-- Linux: Lookup how to enable AppImages on Linux PCs.

Installation steps for camera:
Connect cam and PC using USB cable.
Startup cam (if not already up and running). Check battery level!

Select USB tab in MLinstall.
Press "Get Device Info". You should get status info below telling you Manufacturer, Model, DeviceVersion and a cryptic SerialNumber. If you don't get this info on first try you may change USB port and/or check if other ptgrams like EOS Utility are running and hijacked/blocked cam. Terminate/stop such programs.
Redo until you get a proper connection! This is mandatory!

If (and only if) your cam is detected in MLinstall: Press "Enable Boot Disk".
Done. You can remove USB connection.

Installation steps for card:

Connect cardreader to PC.
Insert card.
Check if card is connected/mounted properly to your PC's OS.
If so: Press "Write card boot flags".
After this step you may close MLinstall.

Copy extracted build content to card.

Check card content:
- DCIM
- MISC
- ML
- autoexec.bin

If it looks like this: unmount  and card.
Done.

Running ML the first time:
Shutdown camera
Insert card
Close compartment door
Startup cam. Wait for LED activity to end.
After standard Canon interface appears: Press trashcan button to access ML menus.


Remarks:
- If startup fails you have to remove battery and try to startup without card.
- After opening card door wait a few seconds before removing card. Canon firmware will access card and it doesn't make a difference if power switch is on or off.
- At first ML startup cam will write a ROM dump to card. Backup content of ML/LOGS!
- Have fun!