Flash hot shoe - override the switch - page 2 - General Discussion and Assistance - CHDK Forum
supplierdeeply

Flash hot shoe - override the switch

  • 42 Replies
  • 10830 Views
Re: Flash hot shoe - override the switch
« Reply #10 on: 16 / September / 2014, 19:34:17 »
Advertisements
Will do. Updating my Dev machine to an SSD tonight. Long overdue but I have my fingers crossed about how long I will be down.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline koshy

  • *****
  • 1065
Re: Flash hot shoe - override the switch
« Reply #11 on: 16 / September / 2014, 19:38:35 »
Thought I'd note that of mine S5, SX10, SX20 have hot shoes. I think I'll not monitor this thread actively but if you need some test with those feel free to PM and I'll come back here to do it. I'll need specific instructions of what to do...
« Last Edit: 17 / September / 2014, 19:31:06 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline srsa_4c

  • ******
  • 4426
Re: Flash hot shoe - override the switch
« Reply #12 on: 17 / September / 2014, 19:28:51 »
@Werner_O
Here's a Lua script that displays 3 words of physw_status in hexadecimal. If you still have the test version on the camera, set "Blitzschuh belegt" to "auto". The script will scan those words ~3 times / second. Try to determine which digits change when there's something in the hot shoe. I'd expect more than one bit to change. If there's only one bit that is changing (bit28 of the third word), then a possible solution will be much more complicated.
The script is camera specific.
Code: [Select]
function printf(...)
print(string.format(...))
end

function restore()
    set_console_layout(0,0,25,5)
end


set_console_layout(0,0,32,10)

-- sx20 102d physw_status = 0x32464
physw0 = 0x32464

while true do
    r0 = peek(physw0)
    r1 = peek(physw0+4)
    r2 = peek(physw0+8)
    printf("%08x:%08x:%08x",r0,r1,r2)
    sleep(300)
end

@koshy

What is the fw version of those cameras?

*

Offline koshy

  • *****
  • 1065
Re: Flash hot shoe - override the switch
« Reply #13 on: 17 / September / 2014, 19:31:45 »
What is the fw version of those cameras?
s5is-101a, sx10-102b, sx20-100f

Just found that I forgot to mention g7-100i because it was sitting on my desk waiting for FWT tests...
« Last Edit: 17 / September / 2014, 19:34:11 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)


*

Offline srsa_4c

  • ******
  • 4426
Re: Flash hot shoe - override the switch
« Reply #14 on: 17 / September / 2014, 19:43:23 »
What is the fw version of those cameras?
s5is-101a, sx10-102b, sx20-100f

Just found that I forgot to mention g7-100i because it was sitting on my desk waiting for FWT tests...
If you want, you can use the above script, but you need to adapt "physw0" to the camera. The required address can be found in the camera specific stubs_entry.S or stubs_min.S files (locate "physw_status").

*

Offline koshy

  • *****
  • 1065
Re: Flash hot shoe - override the switch
« Reply #15 on: 18 / September / 2014, 19:14:48 »
-- sx20 100f physw_status = 0x32444

Hot shoe empty:
000e003:00fffff7:02b00000

With flash in hot shoe:
000e003:00fffff7:12b00000
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline koshy

  • *****
  • 1065
Re: Flash hot shoe - override the switch
« Reply #16 on: 18 / September / 2014, 19:19:08 »
-- s5is 101a physw_status = 0x11abc

Hot shoe empty:
00028003:7f7f7e77:01860000

With flash in hot shoe:
00028003:7f7f7e77:018e0000
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline srsa_4c

  • ******
  • 4426
Re: Flash hot shoe - override the switch
« Reply #17 on: 18 / September / 2014, 20:06:19 »
@koshy
Thanks, that confirms the sigfinder and is a bad news for the sx20.
I have updated the patch in the 1st post to include support for s5is, sx10. If you feel like it, you can test whether you can use the internal flash when the hot shoe is occupied and 'CHDK settings' -> 'Flash hot shoe occupied' is set to 'Off'. The g7 can also get support, but you'll have to determine the appropriate physw bit.

Please use something other than a Canon compatible flash in the hot shoe (a match-stick will probably suffice).


Re: Flash hot shoe - override the switch
« Reply #18 on: 18 / September / 2014, 20:40:36 »
Patch file tested with SX50HS.   

With CHDK Settings menu item  Flash hot shoe occupied =
  • Auto : camera built-in flash and hot shoe override function normally. Hot shot switch disables internal flash even if it is raised.
  • Off :  camera ignores state of hot shoe switch and shoots with raised internal flash even with something in hot shoe.
  • On :  camera will not enable internal flash when raised.

Success !
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4426
Re: Flash hot shoe - override the switch
« Reply #19 on: 19 / September / 2014, 16:12:07 »
Patch file tested with SX50HS.   

With CHDK Settings menu item  Flash hot shoe occupied =
  • Auto : camera built-in flash and hot shoe override function normally. Hot shot switch disables internal flash even if it is raised.
  • Off :  camera ignores state of hot shoe switch and shoots with raised internal flash even with something in hot shoe.
  • On :  camera will not enable internal flash when raised.

Success !
That's good news, thanks!

SX20
The failure on the sx20 might be caused by its hw design. Firmware strings indicate that it has a "subcpu" (an additional low power CPU). It's possible that the hot shoe switch is also connected to the subcpu, which reports its state to the main firmware.
Somebody could try executing the following Lua script (using patched CHDK and setting 'Flash hot shoe occupied' to 'Off'), maybe it can enable internal flash when the hot shoe is occupied:
Code: [Select]
call_event_proc("UI.Create")
call_event_proc("UIFS_UnmountExtFlash")

 

Related Topics