Mode dials and Playback pushbuttons - page 2 - General Discussion and Assistance - CHDK Forum

Mode dials and Playback pushbuttons

  • 201 Replies
  • 64820 Views
Re: Mode dials and Playback pushbuttons
« Reply #10 on: 23 / February / 2009, 17:23:17 »
Advertisements
The screen went blank when I 'connected the video cable'.

It never came back on  ;)
« Last Edit: 23 / February / 2009, 17:27:25 by Microfunguy »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Mode dials and Playback pushbuttons
« Reply #11 on: 23 / February / 2009, 17:33:06 »
The screen went blank when I 'connected the video cable'.
It never came back on  ;)

??? On a710:
PostLogicalEventForNotPowerType(0x1081 /*ConnectVideoCable*/, 0) - black screen, no sound from speaker
then
PostLogicalEventForNotPowerType(0x1082 /*DisconnectVideoCable*/, 0) - all returns to normal state

How about switching between record and playback modes, it works?

Re: Mode dials and Playback pushbuttons
« Reply #12 on: 23 / February / 2009, 17:51:57 »
How about switching between record and playback modes, it works?

Yes !

A lot simpler  than altering physw bit patterns.

I will check tomorrow why return from movie mode does not work.


Re: Mode dials and Playback pushbuttons
« Reply #13 on: 24 / February / 2009, 04:53:34 »
"Magic" variable @0x722C is found using memory browser, but it present, for example,  is sub_FFD9CE8C ("_DecideModeDial").

I do not have memory browser in SDM so I will use CHDK.

Does it only display a few bytes ?

If so, ow did you use it to find the 'magic' variable  ?


David


*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Mode dials and Playback pushbuttons
« Reply #14 on: 24 / February / 2009, 06:19:04 »
I do not have memory browser in SDM so I will use CHDK.
Does it only display a few bytes ?
If so, ow did you use it to find the 'magic' variable  ?

I started from approximate address (known from disassembly) and then searched variable containing current mode.

Well, here is IDA listing for a620:
Code: [Select]
ROM:FFD774F0                 STMFD   SP!, {R4,R5,LR}
ROM:FFD774F4                 MOV     R0, #0x20
ROM:FFD774F8                 MOV     R4, R1
ROM:FFD774FC                 LDR     R1, =a_decidemodedia
ROM:FFD77500                 BL      PutsCameraLog
ROM:FFD77504                 LDR     R3, =0x7D58
ROM:FFD77508                 LDR     R2, [R3]
ROM:FFD7750C                 LDR     R1, =0x7D3C
ROM:FFD77510                 MOV     R3, #0
ROM:FFD77514                 CMP     R2, #0
ROM:FFD77518                 STR     R3, [R1]
ROM:FFD7751C                 LDMNEFD SP!, {R4,R5,PC}
ROM:FFD77520                 LDR     R2, =0x7DA0
ROM:FFD77524                 LDR     R3, [R2]
ROM:FFD77528                 CMP     R3, R4
......

Here 0x7DA0 is address of this "magic variable".

0x2348 for a570
0x607C+0x4C for SX100

But how about IXUS cameras (without mode dial)?

Re: Mode dials and Playback pushbuttons
« Reply #15 on: 24 / February / 2009, 07:34:04 »

Here 0x7DA0 is address of this "magic variable".

Sure, that is how I found it.
I was just wondering how you found it using memory browser.


Quote
But how about IXUS cameras (without mode dial)?

You mean for Playback ?

I am sending someone a version for the ixus75 that uses PressPB and UnpressPB.
« Last Edit: 24 / February / 2009, 07:37:35 by Microfunguy »

*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: Mode dials and Playback pushbuttons
« Reply #16 on: 24 / February / 2009, 12:01:06 »
But how about IXUS cameras (without mode dial)?
I have an Ixus950 which does have a mode dial, sorry...

Otherwise,
   PostLogicalEventForNotPowerType(0x1061 /* ModeDialToPlay */, 0);
and
   PostLogicalEventForNotPowerType(0x1065 /* ModeDialToRec */, 0);
switch to and fro without any additional magic. Switch to rec ends up in auto or in the mode the dial is on. With just brief experimenting, i couldn't find how to switch to a particular rec mode -- magic number (which seems to be 0x23A8) doesn't appear to help. On the contrary, without restoring this variable I at least briefly see "M" when I call e.g.
   PostLogicalEventForNotPowerType(0x1055 /* ModeDialToP */, 0);
although the mode doesn't really change.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Mode dials and Playback pushbuttons
« Reply #17 on: 24 / February / 2009, 15:01:58 »
Patch attached to add PostLogicalEventForNotPowerType and PostLogicalEventToUI to Lua as shortened aliases PostLgEvent4NPT() and PostLgEvent2UI(). The patch is kind of large because it has the free RAM osd from that other thread included as well.

I only included stubs for a570 100e, others can be taken from PhyrePhox's IDA func list exports with ease and added to platform/*/sub/*/stubs_entry_2.S.

Also attached a simple Lua script to try things out, with or without magic address (to non-developers: good grief don't even think of running this script it if you don't know what it does, it may peek&poke your camera to oblivion), defaulting to a570 values.

----------

I experimented a little bit already. There was no need for any magic number play to makes modes stick, a PostLogicalEventForNotPowerType() call was enough.

00001061 00000002 ModeDialToPlay <-- switched camera to PLAY mode from REC
00001065 00000002 ModeDialToRec <-- switched camera to REC mode from PLAY
0000100a 00000002 ModeLeverPlay <-- no effect in REC mode
0000106c 00000002 IsoDialTo100 <-- no effect in REC mode M mode with ISO400 selected.
00001052 00000002 ModeDialToM <-- switched camera to M mode when mode dial was in P position
0000100c 00000002 ModeLeverStillRec <-- no effect in PLAY mode or REC mode with movie mode selected
0000105b 00000002 ModeDialToMovie <-- switched camera to movie mode when mode dial was in M position, but ModeDialToM did not get me back to M mode.

I believe this last one is similar to what Microfunguy experienced. I don't know why it is, but a kludgy way to get out of overrided video mode mode dial position back to a still shooting mode is to call ModeDialToPlay and then ModeDialToRec and the camera will return to whatever position mode dial is in. I didn't try how the cam behaves if all this is started with mode dial physically in movie position.

To keep things clear and sane for everyone:
A570IS has 13-position mode dial with 12 positions for still shooting and 1 position for movie mode.
A570IS has a 2-position slide switch for REC/PLAY mode selection and can be powered on to either mode.
A570IS has a power ON/OFF button.
A570IS does not have ISO dial or any sort of jog dial for that matter.


Re: Mode dials and Playback pushbuttons
« Reply #18 on: 24 / February / 2009, 15:38:13 »
Well, the A620 did not work without 'magic number', immediately returned to current mode.

I have not got anything working on the ixus75.
It has a three position switch (AUTO/MOVIE/SCN) and playback pushbutton.

Even connecting video cable did not blank screen.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Mode dials and Playback pushbuttons
« Reply #19 on: 24 / February / 2009, 17:30:28 »
A couple of more codes tried:

000009a1 00000000 PressSwOne <--- press half shoot
000009a2 00000001 UnpressSwOne <--- release half shoot
000009a3 00000000 PressSwTwo <--- press full shoot
000009a4 00000001 UnpressSwTwo <--- release full shoot, I suppose.
00001055 00000002 ModeDialToP <-- works ok, no magic required as usual for me
00001054 00000002 ModeDialToTv <--- works ok, no magic required as usual for me
00001005 00000000 PressOffButton <--- ok, powers OFF camera (lens goes in cleanly from REC mode)
00001003 00000000 PressPBButton <--- another way to switch cam from REC to PLAY
00001001 00000000 PressRecButton <--- another way to switch cam from PLAY to REC
The above two have unpress complements, but they don't seem to be required for the above two to work, and don't appear to do anything:
00001004 00000001 UnpressPBButton
00001002 00000001 UnpressRecButton
0000105e 00000002 ModeDialToC <--- a570 has no C mode... but this does make the cam go to a user settings mode, sort of. Problem is, if I try to go to Canon's func/set menu to change ISO, camera shuts down with lens out. It does let me change WB settings and browse the func/set menu. Also the large mode indicator letter in Canon's osd is a blank dark area, not C as one would expect. So C mode is partially implemented but not enough to use it. I'd expect similar results when trying to use Tv or M modes in cameras that don't have them...

When in PLAY mode, these two make 6 more tasks appear/disappear (I don't remember how many appeared with remote or real USB host plug-in, but clearly this has an effect):
000010a5 00000002 ConnectUSBCable
000010a6 00000002 DisconnectUSBCable

No effect in rec mode (UI nor PowerType):
0000096a 00000001 UnpressTeleMagButton
00000969 00000000 PressTeleMagButton
00000878 00000001 UnpressEnjoyButton (rec and play tested)
00000877 00000000 PressEnjoyButton (rec and play tested)
0000085c 00000003 HoldISButton
0000085b 00000001 UnpressISButton
0000085a 00000000 PressISButton (I didn't try to see if IS mode changed, but nothing changed on the LCD)
0000083d 00000002 RotateElectronicMainDialLeft
0000083c 00000002 RotateElectronicMainDialRight
00000914 00000001 UnpressRemoteMenuButton
00000913 00000000 PressRemoteMenuButton
000009a6 00000001 UnpressMovieButton
000009a5 00000000 PressMovieButton
00000976 00000003 PressMenuAndSetAndEdit
000010a1 00000002 ConnectVideoCable
000010a2 00000002 DisconnectVideoCable
No visible effect from these last two either, but current consumption should be measured to check that video output driver isn't enabled/disabled. Because if it is, this could be used to disable video output driver while av plug is inserted, for more power saving during MD.

It should be noted that a570 doesn't have a movie button.
I don't know what a main dial is, but apparently it's not the mode dial and a570 doesn't have other dials.


no effect in PLAY mode while lens was in (and thus covered):
000010ba 00000002 CloseLensCoverHalf
000010b9 00000002 OpenLensCoverHalf
000010b8 00000002 CloseLensCover
000010b7 00000002 OpenLensCover


 

Related Topics