Ixus Wireless - SD430 Porting thread - page 4 - General Help and Assistance on using CHDK stable releases - CHDK Forum

Ixus Wireless - SD430 Porting thread

  • 131 Replies
  • 46586 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: Ixus Wireless - SD430 Porting thread
« Reply #30 on: 07 / October / 2013, 19:25:13 »
Advertisements
Check if debug code is inside this conditional:
Code: [Select]
if (conf.debug_misc_vals_show) {
....
}
To enable it,  CHDK menu -> Miscellaneous stuff -> Debug Parameters -> Show Misc. Values [ * ]

In light of the fact that the <ALT> key doesn't currently work, is this setting saved on the SD card, if so can I set it outwith CHDK by editing *something*?
Since you're changing the source anyway, just make that condition always true:
Code: [Select]
if (/*conf.debug_misc_vals_show*/ 1) {or even
Code: [Select]
/*if (conf.debug_misc_vals_show)*/ {.

edit

Quote
This particular camera is one of the few that assigns a function to the <PRINT> key ( the usual CHDK <ALT> key for this style of  Ixus) in playback mode. It uses the key to set up the Wireless. When pressed in playback mode, you are taken to the Wireless <Connect/Disconnect> menu
If the camera doesn't distinguish between short and long presses on that button, using it as ALT button still lets you use the original function by pressing it longer (short press = ALT button, long press = original function), just like cameras where the PLAY button is the ALT button.
« Last Edit: 07 / October / 2013, 19:34:20 by srsa_4c »

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #31 on: 08 / October / 2013, 09:55:25 »
Making the debug change I see this...

Status with no buttons pressed - camera in playback mode.
MEM: 0x47b21dd2
PS1: 0x?004200       << ? alternates rapidly between 6 and 7 with no buttons pressed
                                           (I assume we actually have 0x0?004200 - i.e. 64 bits)
PS2: 0x3f3?49c2      << ? alternates rapidly between 1 and 3 with no buttons pressed
PS3: 0x2ffe     


PS2: and PS3: Seem to contain the key matrix I/O bits.

PS2: Bits

PS2: ------C2  - No switches set - playback mode
PS2: ------C1  - Video mode
PS3: ------C3  - Shoot mode

PS3: Bits 
PS3: 2FFE     - No switches set
PS3: --DE     - Dpad - Up (ISO)
PS3: --BE     - Dpad - Down (Continuous shoot/Self Timer)
PS3: --7E     - Dpad - Left (Macro/Landscape)
PS3: 2E--     - Dpad - Right (Flash)
PS3: 2D--     - Func/Set
PS3: --F8     - Shoot Full
PS3: --F?    - Shoot Full Only - (inferred).
PS3: --FC     - Shoot Half
PS3: --F6     - Focus Lever Right
PS3: --EE     - Focus Lever Left
PS3: 2B--     - Menu
PS3: 27--     - Display
PS3: 0F--     - Print

I'm unsure about the <ALT> key, since it blanks the display, pressing <HALF_SHOOT> at the same time gives the above result but if I fix the above, the <Display> key should function correctly and we then fix the <ALT> if necessary.

This appears to  match with what is in the kbd.c file ( platform/ixusw_sd430/kbd.c ) - (sound of head scratching)  :(

Code: [Select]
     
        {KEY_UP      , 0x00000020 },
        {KEY_DOWN    , 0x00000040 },
        {KEY_LEFT    , 0x00000080 },
        {KEY_RIGHT   , 0x00000100 },
        {KEY_SET     , 0x00000200 },
        {KEY_SHOOT_FULL, 0x00000006 },
        {KEY_SHOOT_FULL_ONLY, 0x00000004 },
        {KEY_SHOOT_HALF, 0x00000002 },
        {KEY_ZOOM_IN , 0x00000008 },
        {KEY_ZOOM_OUT, 0x00000010 },
        {KEY_MENU    , 0x00000400 },
        {KEY_DISPLAY , 0x00000800 },
        {KEY_PRINT   , 0x00002000 },
        { 0, 0 }
« Last Edit: 08 / October / 2013, 16:30:23 by ahull »

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #32 on: 08 / October / 2013, 11:42:55 »
That all looks OK to my novice eye, but the problem persists.
I even went so far as to do a SVN checkout from scratch, and it still has the issue.
kbd.c looks correct.

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #33 on: 08 / October / 2013, 12:17:17 »
Are we bit shifted too far to the left by any chance?

I ask this, because Key <Print> seems to act as key <Display>

Alternative thought... the keyboard was kinda working (but not the mode switch) earlier, where would it have inherited the setting from, can we use those,  or was CHDK simply not intercepting the keys previously.
« Last Edit: 08 / October / 2013, 12:25:38 by ahull »

*

Offline srsa_4c

  • ******
  • 4451
Re: Ixus Wireless - SD430 Porting thread
« Reply #34 on: 08 / October / 2013, 14:13:23 »
These will need to be overridden to the following in stubs_entry_2.S:
kbd_pwr_on, 0xff82b05c
kbd_pwr_off, 0xff82b078
(I used the ixus65 fw for comparison)
As before, I didn't try to fully overlook the whole project, so other errors are possible.

@nafraf
If the 110a firmware is the latest for this camera, and the official fw update package from Canon is exactly the same version, then there is no need to port that older (100f) firmware, as those cameras can be updated. Also, if I remember right, hook_raw_fptr() and hook_raw_ret_addr() in 110a/lib.c are no longer used by CHDK, don't waste your time on them.
« Last Edit: 08 / October / 2013, 14:22:29 by srsa_4c »

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #35 on: 08 / October / 2013, 16:54:52 »
These will need to be overridden to the following in stubs_entry_2.S:
kbd_pwr_on, 0xff82b05c
kbd_pwr_off, 0xff82b078
(I used the ixus65 fw for comparison)
As before, I didn't try to fully overlook the whole project, so other errors are possible.

@nafraf
If the 110a firmware is the latest for this camera, and the official fw update package from Canon is exactly the same version, then there is no need to port that older (100f) firmware, as those cameras can be updated. Also, if I remember right, hook_raw_fptr() and hook_raw_ret_addr() in 110a/lib.c are no longer used by CHDK, don't waste your time on them.

Thanks for that, will they have any bearing on the keyboard issue?

*

Offline srsa_4c

  • ******
  • 4451
Re: Ixus Wireless - SD430 Porting thread
« Reply #36 on: 08 / October / 2013, 17:15:47 »
kbd_pwr_on, 0xff82b05c
kbd_pwr_off, 0xff82b078
Thanks for that, will they have any bearing on the keyboard issue?
As both functions are called by my_kbd_read_keys() in platform/ixusw_sd430/kbd.c, something will surely change. I don't know whether the keyboard code is correct for this camera though, didn't check that.

*

Offline nafraf

  • *****
  • 1308
Re: Ixus Wireless - SD430 Porting thread
« Reply #37 on: 08 / October / 2013, 22:21:22 »
These will need to be overridden to the following in stubs_entry_2.S:
kbd_pwr_on, 0xff82b05c
kbd_pwr_off, 0xff82b078
(I used the ixus65 fw for comparison)
As before, I didn't try to fully overlook the whole project, so other errors are possible.

@nafraf
If the 110a firmware is the latest for this camera, and the official fw update package from Canon is exactly the same version, then there is no need to port that older (100f) firmware, as those cameras can be updated. Also, if I remember right, hook_raw_fptr() and hook_raw_ret_addr() in 110a/lib.c are no longer used by CHDK, don't waste your time on them.
Thanks, unnecessary code was deleted.

@ahull, please update your working copy before testing.
Some changes related to keyboard:
- kbd_pwr_* addresses detected by srsa_4c were added to svn,
- KEY_MASK was wrong, it was fixed.
- some other addresses were verified and defined in stubs_entry_2.S
« Last Edit: 08 / October / 2013, 22:36:24 by nafraf »

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #38 on: 09 / October / 2013, 04:47:25 »
Updated as suggested. This builds OK.
Update Firmware > CHDK splash appears and camera goes in to playback mode (lens extends etc)
Print <ALT> key doesn't work, but no longer blanks the display.
None of the other keys work.
Power button works.
 



*

Offline srsa_4c

  • ******
  • 4451
Re: Ixus Wireless - SD430 Porting thread
« Reply #39 on: 09 / October / 2013, 10:31:30 »
Perhaps the whole kbd.c could be re-done by using another port as basis. Looks like the 0xc0220200 IO port's bits are not passed on for example, not sure if they are needed or not.
The ixus65 code uses the port reading function of the firmware ( _kbd_read_keys ), but that cam a touch sensitive control pad ("feather"), all feather references will need to be cleaned from the file if it's used as base. Note that I'm not the author of that code, I just know that it works.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal