A570 Underwater need to move the Alt button - General Discussion and Assistance - CHDK Forum

A570 Underwater need to move the Alt button

  • 35 Replies
  • 18985 Views
A570 Underwater need to move the Alt button
« on: 25 / January / 2009, 16:21:33 »
Advertisements
Apoligse in advance if asking an inappropriate questtion in an inappropriate place!  I have got CHDK working just fine on my new A570.  my problem is I bought it for underwater use and the Canon housing doesn't have a "Print" button that is the "Alt" button in this version.  I had a search in the forum and found a guy who thinks ago that there was someway to change the code to refer to one of the other buttons.  I know nothing about writing/compiling code, but wondered if this was actually quite straiht forward and if anyone could point me in the right direction?

Clearly I can just set everything up and have worked out how to get it to autoboot, but won't be able ot change anything once underwater.  thanks in advance

Mike

Re: A570 Underwater need to move the Alt button
« Reply #1 on: 03 / April / 2009, 22:12:32 »
I recently ran into this exact problem and I found a solution that works (for me, anyway).  I'm now using DISPLAY as my alt-mode button.

I started off with the most recent revision (727) of the code from https://tools.assembla.com/svn/chdk .

Here's a summary of the changes I made:

In include\camera.h, added the following to the a570 section:
Code: [Select]
    #define CAM_ADJUSTABLE_ALT_BUTTON   1
In platform\a570\kbd.c, added the following after line 18:
Code: [Select]
static long alt_mode_key_mask = 0x00000800;
Also in platform\a570\kbd.c, uncommented the following line:
Code: [Select]
physw_status[1] |= alt_mode_key_mask;
Same file, uncommented this section:
Code: [Select]
void kbd_set_alt_mode_key_mask(long key)
{
    int i;
    for (i=0; keymap[i].hackkey; ++i) {
if (keymap[i].hackkey == key) {
    alt_mode_key_mask = keymap[i].canonkey;
    return;
}
    }
}

Finally, in core\gui.c, added the following after line 1435:
Code: [Select]
#elif defined(CAMERA_a570)
    static const char* names[]={ "Print", "Display"};
    static const int keys[] = {KEY_PRINT, KEY_DISPLAY};

The fact that some of this code was already in there and commented out makes me suspicious that it may have been done so for a reason.   :)  But I figured I'd try it anyway, and it seems OK so far.  If anyone knows of a reason why this fix could be bad please let me know.

I'm attaching my diffs and binaries in case anyone wants them. The binaries are for the 101a firmware, but I can build and post for the 100e firmware too if anyone wants them.

Re: A570 Underwater need to move the Alt button
« Reply #2 on: 12 / April / 2010, 19:14:26 »
Hi there

Ive been looking for this for 2 days now, thanks.

Do i just copy the .Bin and .Fir files to the card as usual or do i have to do something with the .txt file too?

Thanks


Re: A570 Underwater need to move the Alt button
« Reply #3 on: 12 / April / 2010, 19:29:20 »
The text file is just for people who want to compile their own build.


Re: A570 Underwater need to move the Alt button
« Reply #4 on: 22 / April / 2010, 01:09:14 »
neilp1, hope this works for you. I've been using this code for a year now with no problems. A couple of notes:

  • If you press DISPLAY quickly it will act as your ALT mode button, but if you hold it down for a second, it acts like the DISPLAY button normally does.
  • I have an 8 GB card so I have multiple partitions on the card. I find that Windows can't read the second partition, so I use the Swap Partitions menu item on the camera so that I can copy my pictures onto my Windows machine, and then Swap Partitions back so that I can boot from CHDK again. I find that when I do this, the ALT mode button gets set back to the default (PRINT). I have to go back and change it to DISPLAY again. After that the setting stays until the next time I do Swap Partitions.

Bottom line: if you fiddle with your SD card, check to make sure to check that ALT mode button setting before you get in the water!  :)

Re: A570 Underwater need to move the Alt button
« Reply #5 on: 11 / June / 2010, 13:11:10 »
I realize this is a bit of an old thread now, but...

I'm having the same issue with my A710IS (firmware 100a). Is there anything in the .bin or .fir files that I can easily change to make my ALT button something other than the quick print button? I'm not really up on compiling my own files...

Thanks!

Re: A570 Underwater need to move the Alt button
« Reply #6 on: 01 / July / 2010, 00:26:38 »
mantraguy, try these files. I took the changes I made for the a570 and applied them to the a710. The code is a bit different and I don't have a 710 to test against, so I'm not sure it'll work, but it's worth a try.  Good luck!

Re: A570 Underwater need to move the Alt button
« Reply #7 on: 01 / July / 2010, 02:06:57 »
Thanks Rorschach - much appreciated! I tried the files you attached but it doesn't seem to do anything differently. It still works, but the ALT button has not been changed; the display button acts normally and doesn't affect the alternate (CHDK) mode. Oh well - I really appreciate the effort all the same!


Re: A570 Underwater need to move the Alt button
« Reply #8 on: 01 / July / 2010, 20:28:47 »
I just realized, I didn't mention the important fact that for this change to take effect you have to go to the "Miscellaneous stuff" menu and change the "<ALT> mode button" setting.    :-[

Of course maybe you already did that...if it still doesn't work, I'm curious, does the "ALT mode button" menu item even appear, and if so, does anything happen when you select it?


Re: A570 Underwater need to move the Alt button
« Reply #9 on: 05 / July / 2010, 01:10:39 »
I was out of town for the weekend so couldn't try your suggestion - I didn't realize there was a setting to change. Just tried it quickly and everything seems to work perfectly! I'll play with it more tomorrow but I think this is exactly what I wanted. Many thanks! :-)

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal