Magic Lantern for 200D: Not Dead Yet edition

Started by names_are_hard, October 27, 2022, 12:06:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

names_are_hard

Don't get too excited - very few features work.  But, it's ML, and it's on 200D.

Edit 2022-10-31: bugfix ROM dump function in Debug menu, offsets needed updating.  Build zip link updated.

Build: https://github.com/reticulatedpines/magiclantern_simplified/releases/download/release_200D_2022-10-31/magiclantern-Nightly.2022Oct31.200D101.zip
Firmware version: 1.0.1
Bootflag enabler: https://a1ex.magiclantern.fm/bleeding-edge/200D/BOOT200D.FIR
Repo: https://github.com/reticulatedpines/magiclantern_simplified

What works:
- ML menus
- 30 min LV timer disable; AKA webcam mode (NOT normal video recording, a 30 min limit remains here)
- Shutter count
- Screenshots
- ML overlays in LV
- various debugging features (crash logs, task mon, etc)

What doesn't work:
- everything else

To exit sub-menus, use Av, not Q.

I would describe current status as a framework for porting ML to new cams.  A lot of the work has been on internals to support the differences between old and new generations, as well as changes to the repo and build system to make it easier to use on more modern systems.  It's much easier now for new devs to join in and work on things without too much pain.

ML boot process, inputs and GUI work on a wider range of cams in test, including: 750D, 850D, M50, RP, R.  These are either not stable enough yet, too early to release a build for, or nobody with time and access to the cam is available to support it.

It is possible to use ML APIs to patch arbitrary RAM and ROM locations on Digic 7 and up.  This means all features that classic ML supports can be ported - if the hardware supports it.  This still leaves many unknowns, but does mean if you want to do dev work, you have a lot of power to investigate capabilities.

For cool features, the main thing we need are devs with time and ability to reverse engineer camera and OS internals, especially the DMA controller.  This is how raw video works, instructing the DMA controller to map devices together in a way Canon GUI doesn't expose.  New cams do this differently than old cams and so far this area isn't well understood.

Newer cams are very powerful, they just need work to free that power!

Large pieces that were required to get to this point:
- boot code for each new digic generation (A1ex, me)
- handling the new display / GPU (A1ex, kitor, me)
- fixing lens info for overlays (kitor)
- fixing task handling (turtius, me)
- MMU patching (srsa, me)
- module support (me)

Special thanks to Kitor for code reviews, design discussions and git help!

Special thanks to coon42 for PCB design for UART connector:
https://github.com/coon42/magic-lantern-dev-kit/tree/master/cable/gerber

Special thanks to Walter for many boring 200D tests on physical cam,
and answering thousands of ML questions in Discord.

https://i.imgur.com/yvZX1V1.mp4

names_are_hard



kitor

I think with that news I can say that we planned a Xmas 2021 development build for multiple Digic 6/7/8 models.
In fact just to achieve it I spent 3 weeks of last December working full time on Magic Lantern.

Here we are, just shy 4 days of November 2022 with first public build for just a single model.
I think that shows well two things:
- how complicated development is, and
- how small the team is right now

Thank you @names_are_hard for your hard work! I mostly wasn't able to participate during last 6 months, but I hope to get back on track soon.
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.

Dreamers2

that insanly good
thanks from the deep of my hearth for this work
i own a canon 200d and i can't wait for a more "stable" relaase to start using it
meanwhile if i want to install it is there an "easy" method?
i'm running the 1.0.1 firmware

thanks

Walter Schulz

Current release is stable. Just lacking features.

Main use cases:
1) Webcam via HDMI. 30-minute timer can be disabled via ML menu
2) Cropmark overlays for liveview composition. Up to 9 can be stored on card and you can build your own customized cropmarks.

Dreamers2

thanks
how to install?
regular method with Firmware Update?
is there any additional steps?
also how high is the risk of bricking?

names_are_hard

Yes, standard install using the FIR linked in the first post to enable bootflag on cam.

I cannot quantify the risk of bricking.  To my knowledge ML has never bricked any users cams (only some devs, when doing work to understand the cams).  This release for 200D has a small number of features and has been tested by about 2 and a half people.  I tried to code it in a cautious way to minimise risk, but it can never be risk free.

Dreamers2

is this release for the canon 200d i or 200d ii?

names_are_hard

200D.  ML uses the EU naming scheme.  There is no 200D Mk II in EU naming (it would be 250D there).

https://wiki.magiclantern.fm/camera_models_map

iaburn

I'm new to the Magic Lantern world, but I'm surprised that this achievement didn't get more attention  :-\

Just the fact that after well over 10 years since this started, there are still devs with the motivation to keep researching and working to unleash all the raw power hidden inside the newer cameras, is astonishing...  :o

I read that the active team is smaller now, but even if it would stop now, I think the whole project was eye-opening for many people like me. I could speculate about what could be full potential of a camera like the Canon EOS M, but never in my mind I could imagine that inside this cheap camera there was potential to record RAW at speeds faster that what my CFast 1.0 cards can handle, with added unique features like Dual ISO, that all together make the Magic Lantern supported cameras something to be remembered.

I have a programming background and I tried to get an idea of how all this works to see if I could help somehow, but I could not even get the big picture. I don't understand the terms used, the hardware concepts, the tools needed... so I don't even understand enough to know the actual complexity. I would need something like the typical step by step tutorial, with examples an explanations, at least to know if I can handle it.
Does something like this exist already? Maybe a crash course from scratch?

In any case, my respect to those who went beyond what the Canon engineers thought was possible!

Walter Schulz


iaburn

Thanks, I already joined  :)
The problem is that I don't have a particular question, I need more like an in-depth overview plus a step by step guide, which is too much for Discord  ::)

Walter Schulz

Have a talk with names_are_hard on discord ...
We have an 101 section for aspiring devs there.

names_are_hard

Quote from: iaburn on February 19, 2023, 10:02:53 AM
I'm new to the Magic Lantern world, but I'm surprised that this achievement didn't get more attention  :-\

It doesn't have many features yet, so most people don't care :)  Thanks though!

Quote
I have a programming background and I tried to get an idea of how all this works to see if I could help somehow, but I could not even get the big picture. I don't understand the terms used, the hardware concepts, the tools needed... so I don't even understand enough to know the actual complexity. I would need something like the typical step by step tutorial, with examples an explanations, at least to know if I can handle it.
Does something like this exist already? Maybe a crash course from scratch?

The framework of ML is not complicated.  Canon have a mechanism designed to run code from a file on card (presumably for factory diagnostics or automated testing).  We enable that and use it to run our code.  That happens very early in boot, and we use that to modify the boot process, so our code remains running and control is given back to Canon's normal startup code.

To build ML you need a standard C toolchain, able to target ARM.  This probably means you want arm-none-eabi-gcc and friends.

Working out how to enable and debug features is the hard part.  This is harder to describe since it varies by feature.  I'm not even sure you're asking about this part so I'm not going to go into great detail.  Here you use a range of techniques depending on what you're doing, but likely to include Ghidra (or IDA Pro) for understanding the code in the camera rom, and serial port access to the cam to get better live debug output and maybe inspecting memory.  This is somewhat like debugging a binary where you don't have symbols, if you've done that before.  We also have a qemu fork with partial support for emulating roms.  Support is good for older cams, not good yet for newer models, but this is still useful for testing some code without risking a physical cam.

iaburn

Thanks a lot for the explanation  :) Never herd of Ghidra, but it looks like hacking a video game console, with no hardware documentation and trying to reverse-engineering everything with little to no help... I cannot imagine many people being able to do that, and I'm not one of them (yet... haha)
I will try to read more and see if this takes me somewhere  ::)

diddlypockets

I am new to Magic Lantern, trying to install it to my EOS 200d. Followed the instructions -
1) Camera in Manual Mode, firmware confirmed 1.0.1
2) tried with 64GB SD card as well as 32GB micro SD with adapter. Formatted the card
3) Extracted files/folders from the link from the first post in this thread to root of SD card on my laptop running windows 11 (also tried on windows 10 laptop)
4) Copied fir file to root of SD card using my laptop running windows 11  (also tried on windows 10 laptop)
5) inserted the card back into the camera, started camera, in camera mode went to the menu for firmware, Camera asked for updating firmware, proceeded with firmware update.

6) Instead of updating the firmware, it looks like only boot flag was attempted to be flipped and I got the Magic Lantern Rescue screen as attached. Restarting, removing battery/restarting nothing is working and the installation is not successful. logically it seems like the autoexec.bin is not getting executed.


MLR" border="0</a>



scratching my head on how to get this to work. Can anyone help please?

Walter Schulz

Download EOScard utility.
Insert card into cardreader.
Run EOScard as Admin.
Make sure to have card drive selected.
Enable checkboxes EOS_DEVELOP and BOOTDISK.
Press Save button and ignore error message.

Insert card into cam and startup.



ML doesn't alter cam's fimware. Bootflag enabler flips a setting telling the cam to look for a bootable card at startup.

diddlypockets

Thanks for replying Walter. This has however not worked.

I started EOScard as Admin user, checked the boxes for EOS_DEVELOP and BOOTDISK as in the picture below and Saved. Did not get any errors and the save was successful.
1-EOScard" border="0

Attaching another picture showing the contents of the card before I inserted it into the camera. The contents are - ML folder, DCIM and MISC folder, autoexec.bin and BOOT200d.FIR.

2-SD-Contents" border="0

Inserted the card into the camera, went through firmware update and still got the same Magic Lantern Rescue screen. The before and after update of boot flags shows no change. The firmware update process ends with the line that says 'You may now remove the battery'. Magic Lantern does not get installed. :(

3-ML-Rescue" border="0


Walter Schulz

Restart cam. Press trashcan/delete button.
Also top of page > Wiki > FAQ

diddlypockets

thanks for the reply again. Restarting cam and pressing trash can button does nothing.  the camera is not recognising autoexec.bin yet.

Walter Schulz

Remove battery and card. Rename autoexec.bin to autoexec.bin_
Insert card. Insert battery. Close compartment door. Try to startup cam.
If cam is stuck remove battery and card.
Report back.

diddlypockets

Followed the instructions fully expecting nothing different to happen... but!
Removed battery and card, renamed autoexec.bin to autoexec.bin_
inserted card, inserted battery, closed compartment door, tried to start up the cam - nothing happens, camera does not start, screen remains dark. Removed Battery and Card.

reporting back. (must say I am worried now that the camera is not starting!)

No difference to the files on the card btw, no logs, no additional files generated.

Walter Schulz

Actually this result is perfect!

It tells without doubt following requirements are met:
- Cam's bootflag is set
- card is bootable and accessed in the correct way

Now:
Rename autoexec.bin_ to autoexec.bin.
remove battery
make sure power switch is in off position.
insert battery and card
close compartment door
press SET button and keep it pressed
switch power on
after startup is complete release SET button.

press trashcan button to access ML menu

diddlypockets

Thanks for the help Walter. Followed instructions, pressing the Set button and switching on the camera did start the camera (phew!). however trashcan button did nothing, switched off and on again, now trash can button starts ML (yay!)

however the main reason why I wanted ML - record movies for more than 30 min - does not seem to be enabled. The Movie Menu of ML is empty (see picture).

Could you please help with -
How would I install ML on other cards? Do I follow the same renaming autoexec.bin to autoexec.bin_, let the camera get stuck, then start by pressing the set button?

How do I uninstall ML to go back - follow the process of updating the firmware and waiting for 60 sec to uninstall or format card? how do I reset the bootflag back?

Is the movie menu expected to remain blank? the posts above mentioned that this was a working feature.

ML-Movie-menu-empty" border="0