Enabling HDMI on 102a firmware - DryOS Development - CHDK Forum

Enabling HDMI on 102a firmware

  • 6 Replies
  • 6225 Views
Enabling HDMI on 102a firmware
« on: 15 / April / 2018, 03:28:45 »
Advertisements
Hi !

I'm currently trying to get HDMI LiveView on Canon S100 (102a firmware). So far I've not been able to get it working, but I wanted to open a thread to share some of my findings (and seek help from experienced DryOS hackers :) ).

Video mode management

I tried to trace functions from UIFS_ConnectVideo (0xFF1CE600). It sets two logical events (0x10B0 and 0x10AF), which seems to be handled by a controller located at 0xFF207624 to execute 0xFF207538 function. This functions reads and writes variables from a struct located at 0xAADC.

0xAADC+0x4 holds the controller handle, 0xAADC+0x8 is a semaphore.

HDMI

HDMI functions use DryOS's message queue system. The HDMI message queue is located in RAM at 0x26B0. All the messages are handled by HecMngTask (0xFF0571F0).

An example of a message sent to the message queue is in 0xFF0572F4 function, which is triggered by HDMI plug/unplug interrupts (0x53 interrupt IIRC).
« Last Edit: 15 / April / 2018, 04:25:34 by |||||||||||||||| »
Canon S100, and some Canon DSLRs

*

Offline srsa_4c

  • ******
  • 4451
Re: Enabling HDMI on 102a firmware
« Reply #1 on: 15 / April / 2018, 06:01:52 »
Here's a somewhat related (and failed) experiment, using analog video.
Note however, that (AFAIK) HDMI was never supported in rec mode on PowerShots (this might have changed on the very latest models). Being not supported, fw code that would properly handle the situation might simply be missing.

Re: Enabling HDMI on 102a firmware
« Reply #2 on: 16 / April / 2018, 16:01:34 »
Do you know if LCD, AV and HDMI use different video buffers ?
Canon S100, and some Canon DSLRs

*

Offline srsa_4c

  • ******
  • 4451
Re: Enabling HDMI on 102a firmware
« Reply #3 on: 16 / April / 2018, 16:49:57 »
Do you know if LCD, AV and HDMI use different video buffers ?
First, see this overview: http://chdk.wikia.com/wiki/Frame_buffers
Playback and record mode use separate sets of buffers. All output types use the same buffers, but buffer dimensions can change according to the active output device. As mentioned, there is likely no configuration for HDMI output in record mode.
If you're curious, dump the camera's whole RAM into a file (in playback, rec modes, using various outputs) and use the dumps to discover/compare various buffers and their configuration. Here's a utility that can help with the visualization.


Re: Enabling HDMI on 102a firmware
« Reply #4 on: 17 / April / 2018, 05:00:39 »
I did some RAM dumps and found the following.

The UI framebuffer has the same size (320px wide) for LCD & HDMI output, but only 240px are used for LCD output.

The video/image/liveview buffers have different sizes (1280px HDMI, 360px LCD).

Also some random notes :
 - EDID data seems to be stored at 0xB51EC and is 0x200 (512) bytes long
 - 0xC0090000 seems like a plausible register base address for I2C
 - DC/DC converter is configured by I2C : we should be VERY carefull when toying around with I2C (or we might end up with a fried motherboard). I don't know if there's multiple I2C buses or a single one.
« Last Edit: 17 / April / 2018, 05:41:54 by |||||||||||||||| »
Canon S100, and some Canon DSLRs

Re: Enabling HDMI on 102a firmware
« Reply #5 on: 18 / April / 2018, 12:41:15 »
Some (new) random notes :
 - Setting both 0xC0F14074 and 0xC0F14070 to 0xA mutes the Viewfinder (0xFF051BC0 does exactly this)
 - 0xC0910004 adjusts the backlight level (0 is max), 0xB4858 seems to be the related struct for backlight functions
 - =call_func_ptr(0xFF025C0C, 0xC0F0102C, 0x614610DD) turns off the LCD controller (image fades away slowly) but backlight is still on
   =call_func_ptr(0xFF025C0C, 0xC0F0102C, 0x20) turns it back on but there's flicker and vertical stripes
   =call_func_ptr(0xFF025C0C, 0xC0F0102C, 0x80080021) less vertical stripes on the LCD and no flicker
Canon S100, and some Canon DSLRs

*

Offline srsa_4c

  • ******
  • 4451
Re: Enabling HDMI on 102a firmware
« Reply #6 on: 18 / April / 2018, 12:52:27 »
FWIW (you may already know these):
Many HW related info can be found here: http://magiclantern.wikia.com/wiki/Register_Map
And in the contrib/qemu folder of ML (qemu branch): https://bitbucket.org/hudson/magic-lantern

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal