Skip to content

Add 1300D version 1.1.0 to ML - #283

Open
ccritix wants to merge 11 commits into
reticulatedpines:devfrom
ccritix:dev
Open

Add 1300D version 1.1.0 to ML#283
ccritix wants to merge 11 commits into
reticulatedpines:devfrom
ccritix:dev

Conversation

@ccritix

@ccritix ccritix commented Jul 2, 2026

Copy link
Copy Markdown

No description provided.

Cristian added 7 commits July 2, 2026 09:41
On 1300D, CONFIG_AUDIO_CONTROLS is not enabled, so the audio_gain
semaphore is never created by the audio backend. In this configuration,
gain.sem remains at its initial sentinel value, (void*)1.

During startup, Canon may deliver PROP_MVR_REC_START with mode 0 to report
the current "not recording" state. The audio property handler treated this
as a reconfiguration event and attempted to give gain.sem unconditionally.
On 1300D this results in give_semaphore((void*)1), which triggers a DryOS
assert in SystemIF::KerSem.c.

Only register/run the PROP_MVR_REC_START audio handler on builds where the
audio reconfiguration path is actually initialized, such as cameras with
CONFIG_AUDIO_CONTROLS or the special 600D/7D handling.

This avoids calling DryOS semaphore APIs with an invalid sentinel pointer
and fixes the startup assert on 1300D.
On 1300D, get_current_task_id() returns an encoded task ID that does not always round-trip cleanly through get_task_info_by_id().

This caused selftest to fail when checking:
get_task_name_from_id(get_current_task_id())

get_task_name_from_id() now returns current_task->name directly when the requested ID matches the current task, while keeping the existing fallback logic for other call sites that pass either a task index or an encoded task ID.

This preserves the existing behavior for task menus and other lookups, while making the selftest check pass correctly on 1300D.
1300D triggers a kernel assert when the recursive lock negative test releases the lock one time too many. Keep the valid recursive lock checks, but skip the final over-release assertion on this model so the selftest can complete without aborting. Other platforms still run the full check.
1300D triggers an EDMAC assert in cache test A because the BMP destination buffer does not satisfy the uncacheable memory precondition expected by edmac_copy_rectangle_cbr_start(). Skip this test on 1300D to avoid aborting selftest, while keeping the rest of the cache coverage intact on other cameras.
@ccritix ccritix changed the title Add 1300D to ML Add 1300D version 1.1.0 to ML Jul 2, 2026
ccritix added 4 commits July 3, 2026 10:08
Running make clean from platform/<camera> does not remove modules/build, so stale module artifacts can survive and prevent modules from rebuilding on the next disk_image run.
This commit adds a working Dual ISO implementation for the EOS 1300D (110).

Highlights:
- Reverse engineered the CMOS ISO tables used by the 1300D.
- Added automatic detection of PHOTO and LiveView CMOS ISO tables.
- Implemented camera-specific CMOS patching logic.
- Added support for the 1300D CMOS layout (6 entries, 0x14-byte photo records, 0x1E-byte LV records).
- Determined correct ISO encoding (ISO bits = 3, flag bits = 2).
- Implemented safe runtime patching of the temporary CMOS command buffer instead of modifying firmware tables.
- Verified correct alternating ISO pattern in RAW captures.
- Added EOS 1300D support to cr2hdr (camera identification, color matrix and DNG metadata).
- Fixed host build issues for cr2hdr and updated the build system so the host tool is generated together with the module.
- Verified successful reconstruction with cr2hdr, producing full-resolution DNG files.

Current status:
- Photo Dual ISO is fully functional and validated.
- LiveView CMOS table has been identified and reverse engineered; Movie/LiveView Dual ISO support will be completed in a future update.
1300D: fix Magic Lantern menu access in Movie mode

- Added support for the Movie mode TRASH button event on EOS 1300D.
- Mapped the Movie-mode TRASH event (0x61) to the ML menu handler
  without affecting Photo mode.
- Added debounce logic to ignore duplicate button events, preventing
  the ML menu from opening and immediately closing.
- Photo mode behavior remains unchanged.

The ML menu can now be opened and closed reliably with the TRASH
button in both Photo and Movie modes.
Changes:
- detect the real movie-mode TRASH button event by its exact event signature
- prevent unrelated 0x61 GUI events from opening the ML menu
- stop ML menu from being triggered when exiting Canon MENU
- stop ML menu from opening after REC start/stop
- keep ML out of the guessed LV GUI mode while recording

Result:
- TRASH opens/closes ML menu correctly
- MENU works normally
- REC start/stop no longer opens ML menu
- black screen issue during REC transition is fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant