CHDK Forum

CHDK Development => General Discussion and Assistance => Topic started by: brabl2 on 27 / February / 2008, 15:06:35

Title: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: brabl2 on 27 / February / 2008, 15:06:35
This topic is intended for requests to add a new/modified source code into svn repository.




Hi,
is anybody from developers able (and interested) in adding A460 source code into trunk?

I prepared A460 source code based on trunk-r308.
I already prepared same package for trunk-r306 some time ago, however nobody replied.
Please, can someone from developers add attached files to the trunk.

More about A460 porting here : A460? (http://chdk.setepontos.com/index.php/topic,474.msg4961.html#msg4961)

If you have any questions, let me know.

Pavel
Title: Re: Adding A460 source code into trunk
Post by: Microfunguy on 27 / February / 2008, 16:34:47
Hi,
is anybody from developers able (and interested) in adding A460 source code into trunk?

Hi Pavel.


I would like to help but I do not have access to assembla.

Even if I did, I do not know how you are meant to add new builds.

Send a personal message to one of the developers, they cannot ignore you.


David
Title: Re: Adding A460 source code into trunk
Post by: GrAnd on 28 / February / 2008, 07:26:29
Integrated into trunk #309.
Title: Re: Adding A460 source code into trunk
Post by: 3DBruce on 28 / February / 2008, 14:03:14
Hi GrAnd,

while you're at it: Would you mind adding the latest ixus55 port for firmware 1.00b and 1.00c to the trunk as well? ;-)

allbest_ixus55_100bc_b3.zip - 3.56MB (http://www.zshare.net/download/80492585f6eb12/)

thanks a lot in advance!!
- 3DBruce
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: mrblack51 on 01 / March / 2008, 11:54:05
Please add zSHARE - ixus850_sd800_100e_beta_2-sources.zip (http://www.zshare.net/download/82680713e17fa9/) to the trunk - ixus850 1.00e.

seems to be working fine - thanks
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: GrAnd on 01 / March / 2008, 17:27:12
ixus850: Added into trunk #312.
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: GrAnd on 01 / March / 2008, 17:28:37
@3DBruce
Your version needs more time to adapt to the latest trunk...
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: mrblack51 on 01 / March / 2008, 20:16:45
ixus850: Added into trunk #312.

Thanks!
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: 3DBruce on 02 / March / 2008, 05:42:22
@3DBruce
Your version needs more time to adapt to the latest trunk...
Hi GrAnd,
I applied the port to the latest version in trunk again:
allbest_ixus55_100bc_b4.zip - 4.13MB (http://www.zshare.net/download/83492964fe2841/)
It should be fairly easy to integrate now. Let me know if there are still problems.
Thanks in advance
- 3DBruce
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: GrAnd on 02 / March / 2008, 07:13:34
IXUS 55 (SD450): Added into trunk #313.
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: 3DBruce on 02 / March / 2008, 07:32:35
IXUS 55 (SD450): Added into trunk #313.
Thanks GrAnd!
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: GerhardSchneider on 02 / March / 2008, 12:01:31
General question from a beginner:

There is a stub for A540 for a long time..
There WAS working code for A540 written by I think GrAnd and "somebody else" that never found its way into the repository.

When I looked a bit at the source it seems that the platform files are diverging more and more so it would be more work to merge together..

Is there a reason for that?

GS
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: muttley on 11 / March / 2008, 08:54:07
Hi GrAnd,

I hope this last release of my a550 porting is enough 'stable'  ::)

I have used last 320 trunk...

Here the complete source: a550trunk320.rar - 0.94MB (http://www.zshare.net/download/87725555900246/)

ciao and thanks!
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: GrAnd on 12 / March / 2008, 02:53:57
@muttley

Heh... #320 is not the latest trunk anymore... :)
Anyway, I'll try...
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: muttley on 12 / March / 2008, 06:17:36
yesterday (when i have posted) it was last  :o

too speedy development  :D

here the last (i hope) trunk with my a550 porting: a550trunk322.rar - 0.97MB (http://www.zshare.net/download/8819336c63c491/)

thanks again!!

p.s. i can't test it now...
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: GrAnd on 12 / March / 2008, 08:42:37
A550 - integrated into trunk #323.
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: muttley on 12 / March / 2008, 09:08:12
Great GrAnd!!

you are a flash, thank you!!  :)
Title: please also import the a530 port
Post by: image13 on 19 / March / 2008, 15:54:11
hi,

would it be possible to also integrate the a530 port into
the subversion trunk? - it is nearly completely working
now (usb remote doesnot seem to work yet, but every-
thing else seems to be ok)

i have put together the sources angainst trunk-334 at

  a530-trunk-334.zip - 0.23MB (http://www.zshare.net/download/91905141d200eb/)

most credits go to bondo, ewavr, whoever

a lot of thanks in advance and best wishes - image13
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: GrAnd on 20 / March / 2008, 06:36:09
A530 - integrated into trunk #335.
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: whim on 20 / March / 2008, 07:34:58
@GrAnd

#335 does not create an A530 CHDK for me, GCC reports a missing file:

E:\CHDK\trunk335\bin\logs\err-a530-100a.txt

arm-elf-gcc: stubs_auto.S: No such file or directory
arm-elf-gcc: no input files
E:\CHDK\gcc\bin\gmake[4]: *** [stubs_auto.o] Error 1
E:\CHDK\gcc\bin\gmake[3]: *** [all-recursive] Error 1
E:\CHDK\gcc\bin\gmake[2]: *** [all-recursive] Error 1
E:\CHDK\gcc\bin\gmake[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1


wim

PS This is - of course - from a freshly unpacked,  untouched trunk-r335.zip
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: GrAnd on 20 / March / 2008, 08:20:45
Hm... The section, which is responsible for creation of this file under Windows, was commented out. What's the reason? Decommented.
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: whim on 20 / March / 2008, 08:53:09
@GrAnd

#336 XREF'ed & Tested: is OK now for A530 (the compile, don't have the cam to test binaries)

wim
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: image13 on 20 / March / 2008, 14:22:51
hi,

thanks for importing the a530 code and uncommenting that one
part - looks like a left over from the old code.

i just fetched a fresh copy of the trunk via svn from scratch,
compiled and tested it on the a530 and it works fine!

i also found the reason why the usb remote did not work in the
a540 beta 0.5 code (credits go to niederhammer) and now also
usb remote works on the a530

a diff against trunk 336 and some compiled binaries can be
found at

  a530-336-usbremote.zip - 0.21MB (http://www.zshare.net/download/9236680a44b2d3/)

the diff also contains two more defines for include/camera.h
which i think should be correct: it looks like focus override
also works in mf mode and i think the zoom unlock change
(rev 333) was not yet done for the a530 - it would be nice if
someone can submit this little change into trunk as well

best wishes - image13
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: GrAnd on 20 / March / 2008, 14:53:07
Code: [Select]
#if !defined(CAMERA_a530)
        physw_status[USB_REG] = kbd_new_state[USB_REG] & ~USB_MASK;
#endif

I do not understand why it does affect usb remote function?
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: image13 on 20 / March / 2008, 15:01:11
hi grand,

me neither (i'm not really deep into the chdk code), but
it definitely does - without this, usb remote does not work
and with it does ... maybe niederhammer (from whom
this code is) can explain it?

best wishes - image13
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: image13 on 21 / March / 2008, 11:32:17
hi,

how about adding the current version of the a540
port to the trunk as well - it works completely fine
now as far as i can see ... sources and a diff to the
336 rev of the trunk is at

  a540-336-new.zip - 0.02MB (http://www.zshare.net/download/92840844876a42/)

a lot of thanks in advance and best wishes - image13

p.s.: all the credits for this code go to niederhammer
- i just updated it to the current tree and fixed that
file numbering bug
Title: Re: Adding new cameras into trunk (with source code prepared)
Post by: GrAnd on 21 / March / 2008, 17:01:56
A540 - added to #338.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: niederhammer on 25 / March / 2008, 04:30:55
physw_status[USB_REG] = kbd_new_state[USB_REG] & ~USB_MASK;

it seems to me, that this writes back the bits to the hardware  register of the camera, except the usb-bit.

on a530&a540 this confuses the camera.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: borisbergman on 04 / April / 2008, 11:24:16
here (http://www.xs4all.nl/~gebral/IXUS70.dum)'s a dump of the ixus70_sd1000 firmware 1.01a.

P.S. I would love to port it myself, or at least try. Is there a good point to start with?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: kennyb03 on 19 / April / 2008, 14:25:56
Here you go grand.  I added the 100d sub for the ixus55_sd450.

zSHARE - sd450_100d_trunk.zip (http://www.zshare.net/download/10550056e86b5323/)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: GrAnd on 19 / April / 2008, 15:59:09
Here you go grand.  I added the 100d sub for the ixus55_sd450.

In the trunk now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: fe50 on 25 / May / 2008, 19:38:56
Hi GrAnd,

i've attached a svn diff for the Ixus 50 (SD400, fw 101a & 101b) against trunk 405.
It's a work (http://chdk.setepontos.com/index.php/topic,986.0.html) from mproko, done in April '08, somewhat revised by me...

I've tested most things for fw 101b; optical zoom in video mode is working only in a script,
but most things else seems to be ok, including RAW, Bracketing & the USB remote.

Would it be possible to integrate this port into the trunk?

Title: Re: [REQ] SD400 READY FOR TRUNK-Adding new cameras, applying patches into trunk
Post by: fe50 on 03 / June / 2008, 18:41:57

...and trunks go by... ???

Now the latest trunk is 408, so i have updated my diff for the SD400 1.01a & 1.01b.

Also tested:
* Video Parameters / Bitrate
* USB remote
* Optical zoom in scripts

See attachement...

Can it now be integrated in the trunk ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fingalo on 06 / June / 2008, 06:47:43
Hi fe50,
i added your work to the trunk. Please check that I got it rigth! I did had some confusion when merging so I migth have something missing. It did compile in the end, but I can't test the cameras. And, great job :D you and mproko have done.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: fe50 on 06 / June / 2008, 07:27:59
Many THX for integration, fingalo !

I will test it this evening (i'm on the way now), but by having a short look to the t409 sources it seems to be all ok.

I will report the results then & edit the SD400 related things in the wikia, i'll post a compiled 101a version for testing here, too (can only test the 101b by myself).


*EDIT:
Tested ok, you got it right, nothing is missing, all there !
I posted in the porting Thread (http://chdk.setepontos.com/index.php/topic,986.new.html#new), compiled binarys are available in the Autobuild by now...wow, now we have trunk 411...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: zeno on 11 / June / 2008, 18:16:07
Both the A650 and A720 platform versions of kbd.c have the get_usb_power function partly commented out, like this:
Code: [Select]
int get_usb_power(int edge)
{
// int x;

/*if (edge)*/ return remote_key;
// x = usb_power;
// usb_power = 0;
// return x;
}
The effect is to make the function return 0 (if no power has been applied) or 1 (if it has), rather than returning the time (in 10ms unit) that power has been applied.
 
There seems no reason for this. Uncommenting the code certainly works on the a720. Could someone remove the comments please - it would make the function work the way the documentation says it should.

Two other cameras also have reduced function versions of the function (equivalent to the above, but without the comments). They are the s5 and the tx1.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: fishpepper on 06 / August / 2008, 04:55:15
Hi!

I prepared a svn diff for adding support for the ixus40 sd300.
Its originally based on code from SD300 porting: I really need some help... (http://chdk.setepontos.com/index.php/topic,108.0.html)
which i took and added new features/fixed some bugs.
My thread on that topic is here: Ixus 40 / SD300 v1.00k - beta version available :) (http://chdk.setepontos.com/index.php/topic,2042.0.html)

Could someone add it to trunk ? I hope i got all files in the diff :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waldo on 06 / August / 2008, 12:07:06
Strange, FireFox locks up tighter than a drum when I click that link.  Had to use IE.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / August / 2008, 02:38:01
The a540 mode values were completely bogus  :o

Attached patch uses the values observed on my camera.

Note that there's values added to the platfrom.h enum, for SCN_COLOR_SWAP and VIDEO_COLOR_SWAP

I also nuked the is_mode_photo() function, as it doesn't appear to exist in any other platforms or be used anywhere.

edit:
re-uploaded patch. May as well use PROPCASE_SHOOTING_MODE
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fudgey on 31 / August / 2008, 05:47:24
This probably affects all builds:

In tools/gensigs.sh the first line should probably be
Code: [Select]
#!/bin/bashinstead of
Code: [Select]
#!/bin/sh
I really don't know what a standard sh should support, but I know Ubuntu Hardy's /bin/sh is dash and it fails on line 11 of gensigs.sh, causing CHDK build to fail if there are any firmware dumps in place.

Before fixing this, someone using the Windows dev tools should check /bin/bash exists there.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 31 / August / 2008, 07:04:58
@fudgey

Nice one !
and yes, it's in the standard dev pack for windows

edit: 'bash --help' gives: 
Quote
GNU bash, version 2.04.0(1)-release-(i686-pc-msys)

wim
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: PhyrePhoX on 31 / August / 2008, 16:22:42
will change this in the branch. i wonder why this didnt happen (or got reported) before?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fudgey on 31 / August / 2008, 16:36:28
will change this in the branch. i wonder why this didnt happen (or got reported) before?

Probably because
1) not that many people build with the primaries in the src tree (there are no dumps in svn, after all)
2) many distros (such as Debian on which I used to compile CHDK) use bash (or some other sufficiently extended shell) as /bin/sh by default
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fred55 on 06 / September / 2008, 16:48:36
hi,

here is the port for the ixus40 (sd300) firmware 100k adapted for firmware 100j.  additionally it corrects the series-shooting bug (shooting series as well as bracketing now works).  setting iso < 58 results in whitescreen + poweroff (take care with the autoiso settings).

please add this to the trunk.

thanks,
fred.

p.s. works well in juciphox too.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: PhyrePhoX on 09 / October / 2008, 13:45:19
tried to apply your patch to trunk. applying patch works, compiling for ixus40 100j fails though. maybe i did something wrong, please someone else confirm this.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: chr on 13 / October / 2008, 16:18:56
Hello ppl!

I think it's time to put sd1100 into the trunk. I just merged the latest stuff and made another release:

SD1100/ixus 80 porting ....  (http://chdk.setepontos.com/index.php/topic,2044.msg22570.html#msg22570)

A patch is attached there. I hope, this build is as stable as the previous. There was no crash report since then.

However, it's still missing the move_rec and sdhc_largedisk support. I hacked that but it still freezes in PLAY mode. It is in the patch but disabled in the build chain.

The greatest problem is, that the diskboot.bin file must be encoded to be bootable. So no hacker can contribute unless running qemu/gdb ... and it can't go to the automated build thing, too.

(Reminder to that prob: Problems dumping the SD1100IS/IXUS80IS (http://chdk.setepontos.com/index.php/topic,1504.0.html) |  Emulating Digicam with QEMU (http://chdk.setepontos.com/index.php/topic,1918.msg17501.html#msg17501) ... udumper2008)

So I wrote this little tool (included in patch):

Code: (c) [Select]
/*
 * make an image bootable for latest cams
 * (c) 2008 chr
 *
 * GPL v3+
 *
 * Why make things easy if complex sells better?
 */
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>

unsigned char _chr_[8] = { 4,6,1,0,7,2,5,3 };

unsigned char dance(unsigned char allbest, int fudgey);

#define GHOST 0x400
#define BARNEY 0x00

int main(int whim, char **reyalp) {
FILE *jeff666, *jucifer;
unsigned char *ewavr;

if (whim != 3) {
printf("usage: <in file> <out file>\n");
exit(1);
}

jeff666  = fopen(reyalp[1], "r");
if (jeff666 == NULL) {
printf("Error open %s: %s\n", reyalp[1], strerror(errno));
exit(1);
}
jucifer = fopen(reyalp[2], "w+");
if (jucifer == NULL) {
printf("Error open %s: %s\n", reyalp[2], strerror(errno));
exit(1);
}
fputc(BARNEY, jucifer);
ewavr = malloc(GHOST);

int grand, hacki = 0;
int phox = fread(ewavr, 1, GHOST, jeff666);
while (phox > 0) {
for (grand=0; grand<phox; grand+=8) {
unsigned char fe50[8];
for (hacki=0; hacki<8; hacki++) {
// fe50[hacki] = dancingbits(ewavr[grand + _chr_[hacki]], grand+hacki);
fe50[_chr_[hacki]] = dance(ewavr[grand + hacki], grand+hacki);
}
fwrite(fe50, 1, 8, jucifer);
}
phox = fread(ewavr, 1, GHOST, jeff666);
}
fclose(jeff666);
fclose(jucifer);
free(ewavr);
exit(0);
}

unsigned char dance(unsigned char allbest, int fudgey) {
if ((fudgey % 3) !=0)
return allbest ^ 0xff;
if ((fudgey & 1) == 0)
return allbest ^ 0xa0;
return (allbest >> 4) | (allbest << 4);
}

Note: it's already reverted. Must not run 15 times ;)
TODO: include this somehow into the build chain.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fudgey on 13 / October / 2008, 16:39:53
lol@your variable names...  :P

Nice work anyhow! :D
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 13 / October / 2008, 17:44:18
 ::) :lol
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: PhyrePhoX on 21 / October / 2008, 19:23:06
tried again patching, both hacki and me did not succeed. fred55, you have to help us in order to get this into trunk :)

edit: uhm, where am i?

2nd edit: this is a reply to my post here: [REQ]Adding new cameras, applying patches into trunk (with source code prepared) (http://chdk.setepontos.com/index.php/topic,650.msg22419.html#msg22419)
Title: sd1100 support
Post by: chr on 14 / November / 2008, 21:55:07
Hi there!

Here's a patchset against svn trunk rev 565. to support sd1100 aka ixus80/82

It contains:

0001-found-O_APPEND-for-dryos.patch
0002-sd1100-support-ixus80-82-fw-100c-101a.patch
0003-mh-these-files-are-autogenerated.patch
0004-tool-for-encoding-diskboot.bin-images.patch
0005-hack-gensigs.sh-we-have-different-rom-start-adresse.patch
0006-add-signatures-from-sd1100.patch
0007-rerun-finsig.patch
0008-while-hacking-it-happend-that-.cfg-got-corrupt-and.patch
0009-hacking-debug-osd-panel.patch
0010-new-feature-save-romlog.txt-in-debug-menu.patch
0011-compile-fix-make-OPT_DEBUGGING-global.patch


please add it to svn!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / November / 2008, 07:40:13
Merged. I haven't added the romlog stuff yet. I also had to do significant surgery on the sig stuff. Needs testing.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: pixeldoc2000 on 02 / January / 2009, 00:47:48
IXUS850 / SD800 1.00e fix

i found it while comparing SD800 / SD900...

shooting.c diff : last tv value is "1/1600":
Code: [Select]
--- platform/ixus850_sd800/shooting.c (revision 661)
+++ platform/ixus850_sd800/shooting.c (working copy)
@@ -65,7 +65,7 @@
     {  29,  928, "1/800",  1250 },
     {  30,  960, "1/1000", 1000 },
     {  31,  992, "1/1250",  800 },
-    {  32, 1008, "1/1500",  667 },
+    {  32, 1021, "1/1600",  625 },   // ROM:FF9B5A9C 0x3FD (word) = 1021
 };

SD800 1.00e firmware:
Code: [Select]
ROM:FF9B5A68 a11250          DCB "1/1250",0
ROM:FF9B5A6F                 DCB    0
ROM:FF9B5A70 a11250_1        DCB "1250",0
ROM:FF9B5A75                 DCB    0
ROM:FF9B5A76                 DCB    0
ROM:FF9B5A77                 DCB    0
ROM:FF9B5A78                 DCW 1
ROM:FF9B5A7A                 DCW 0x4E2
ROM:FF9B5A7C                 DCW 0x3E0     // 992
ROM:FF9B5A7E                 DCW 0x3E0
ROM:FF9B5A80                 DCW 0x3EE
ROM:FF9B5A82                 DCW 0x8A
ROM:FF9B5A84                 DCW 0x8B
ROM:FF9B5A86                 DCW 0x149
ROM:FF9B5A88 a11600          DCB "1/1600",0    // <--- 1/1600 is last TV
ROM:FF9B5A8F                 DCB    0
ROM:FF9B5A90 a11600_1        DCB "1600",0
ROM:FF9B5A95                 DCB    0
ROM:FF9B5A96                 DCB    0
ROM:FF9B5A97                 DCB    0
ROM:FF9B5A98                 DCW 1
ROM:FF9B5A9A                 DCW 0x640
ROM:FF9B5A9C                 DCW 0x3FD    // <--- 1021
ROM:FF9B5A9E                 DCW 0x3FD
ROM:FF9B5AA0                 DCW 0x2710
ROM:FF9B5AA2                 DCW 0x8D
ROM:FF9B5AA4                 DCW 0x8D
ROM:FF9B5AA6                 DCW 0x155

Attached the diff...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: garnwraly on 12 / January / 2009, 23:15:49
um...could anyone port chdk for a2000is?
I tried to learn through the posts but I really can't figure out what to do after loading the dump into IDA and running the scripts..
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: pixeldoc2000 on 01 / February / 2009, 14:29:36
IXUS850 / SD800 1.00e Update #2

i've added EnterToCompensationEVF & ExitFromCompensationEVF for sd800.  8)

I'll look forward to hunt down the remaining issus with my sd900 port to include it in thrunk...  ::)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: PhyrePhoX on 02 / February / 2009, 17:14:54
great work so far :)

edit: this was meant for the sd900 thread ;)

what i meant was: will prolly add to trunk soon. however, this thread he is more or less obsolete, please create a ticket in the mantis ticket browser :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: hph@ on 19 / October / 2009, 22:15:37
Help me !, i need chdk for A1100-fw GM1.00b
Adj.ver : 004.010
Is firmver : 2.11
Is paranver : 2.07
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: barberofcivil on 18 / November / 2009, 11:55:46
A small patch to fix an annoyance I thought I'd share.

I found I was trying to watch propcases with the debug, but every time I restarted, the page got set back to 0.
This patch adds the propcase page to the conf file.

*EDIT* fixed my patch so it's MUCH smaller.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: barberofcivil on 27 / November / 2009, 16:27:01
I fixed my extended shutter speed Diff patch from here http://chdk.setepontos.com/index.php/topic,4392.15.html (http://chdk.setepontos.com/index.php/topic,4392.15.html) to be smaller.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: barberofcivil on 02 / December / 2009, 09:01:35
Based on my conversation on the CHDK-Shell thread (http://chdk.setepontos.com/index.php/topic,845.msg43820.html#msg43820 (http://chdk.setepontos.com/index.php/topic,845.msg43820.html#msg43820)) and my exoeriences with the autobuilding of reference signatures and stubs_entry.c, I have prepard a patch that adds to the compiling functionality.  Currently, if the reference dump binaries are present in /tools, the compiler will always use the signature generator and build signatures_vxworks.h/signatures_dryos.h.  Likewise, if the PRIMARY.BIN firmware dump for the model(s) being coompiled is present, the stubs_entry.c file will always be rebuilt.  This means that to turn off rebuilding either of these, the binaries need to be removed or renamed so the compile rdoesn't see them.
To simplify this, the attached patch adds the OPT_UPDATE_STUBS and OPT_GEN_SIGS compile options.  When enabled (in buildconf.inc), the stub/sigs will be rebuilt (if binaries are present, i.e., current operation).  If not enabled, the compiler ignores stub/sig rebuilding regardless of if the binaries are present.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / December / 2009, 22:38:49
Hmm, I used PRIMARY_ROOT to control building of stubs, which has the added advantage you can nuke your working copy without touching your primaries (and you only need one primaries tree for any number of working copies).

I was going to add an option to use the primaries for the reference bins, which would make PRIMARY_ROOT control both if set.

I guess we can add your options too, if people want to keep the primaries in their source tree.

edit:
I guess you might want to generate stubs without regenerating sigs each time, to speed up building, so options to control them individually are good.

edit 2:
Ok, I've committed this as changeset 851 (http://tools.assembla.com/chdk/changeset/851) with the following modifications
- OPT_UPDATE_STUBS is renamed to OPT_GEN_STUBS
- both OPT_GEN_STUBS and OPT_GEN_SIGS default to one, so previous behavior is preserved by default. Note that you can still undefine them on the make command line (e.g. make OPT_GEN_STUBS= clean fir) to turn them off, or override them in localbuildconf.inc

edit 3:
In  changeset 852 (http://tools.assembla.com/chdk/changeset/852), I've added the propcase page thing. I also made it save the misc debug vals option.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: barberofcivil on 12 / December / 2009, 21:02:39
I did some cleaning up and fixing of some of the menu operation.
The zoom in/zoom out button could be used to alter the step size for MENUITEM_INT items.
The zoom in/out could also be held to control step size for both MENUITEM_INT and MENUITEM_ENUM items, but this was in conflict with the above operation, so I removed and modified.

zoom in/zoom out increases/decreases the step size: 1,10,100,1000,10000 for MENUITEM_INT, 1,3,9,27,81 for MENUITEM_ENUM.
I also extended the DISPLAY usage to all cameras.  Now it alters the step size as per zoom out for both and recycles back to 1 at the top, so this can be used for cams without zoom button (I figured it may as well also extend to cams with zoom as well).
The step values are saved, so they don't reset back to 1 when moving around in the menu.
I also found the display of the step size at the top was inconsistent.  it wouldn't clear itself when moving from item to item even though it had been changed.  There were also some other display issues with it.   Now it displays permanently and displays the stem to reflect the menuitem type (int or enum, for others it is blank).
The half-shoot was also used to be held for step size alteration.  I modified it so it is a toggle (for all cams) that alters the step size by a factor of 1 or 2.  it also updates the step size display above to reflect this change.
There were some other minor cleanup issues I did as well.
Please have a look at it and see if it is acceptable to be commited or if some alterations may be required.
 


*EDIT*
1. Slight error in the patch, I had one line from another item I was working on that would make it not work.

2. Made another addition to the menu operation.  On the MISC tab there is now an item to select "Jogdial action".  You can choose "KEY_U/D" (default) which is the previous operation, jogdial moves up/down menu items.  Or you can select "KEY_L/R" and the jogdial will change values like the LEFT/RIGHT KEY operation. This have been enclosed with "#if CAM_HAS_JOGDIAL" so it's only included on cams with jogdials.  State is also saved to config file.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / December / 2009, 20:29:11
barberofcivil,
Thanks for the work, and sorry it's taken me a while to get to this.

I'm going to continue the discussion in a new thread, since this looks a bit more involved than something I can just apply with minor adjustments. http://chdk.setepontos.com/index.php/topic,4636.0.html (http://chdk.setepontos.com/index.php/topic,4636.0.html)

As a general comment, I prefer more, smaller patches when stuff isn't directly related. Especially true if one part is clearly a bug fix and another is a behavior change or new feature. The less I have to think about a patch, the quicker it gets applied :) It's OK for one patch to depend on another, although you won't be able to make them in tortoise until the preceding ones are committed. You can do it with regular diff if you want.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ERR99 on 30 / January / 2010, 13:01:12
Hello,

if possible, please add this inital port for the G11 into trunk.

Caused by the new dryos version of the G11, there are several patches to the CHDK core neccessary ( i merged this changes from from RaduP SD980 porting thread, they are marked with #ifdef CAM_DRYOS_2_3_R39). Also a new CAM_BITMAP_PALETTE 4 (gui_draw.h) was necessary. The PropSet has also changed, so i added propset 3.

I also added two bugfixs in gui_menu.c, to fix a crash in the script menu of the G11. They are marked with  #if defined (CAMERA_g11) in gui_menu.c. Without this fixes, the G11 port also works,  but the Script menu will crash if scripts with long titlenames are loaded and/or they will be left overs on the display (see http://chdk.setepontos.com/index.php/topic,4647.msg46080.html#msg46080 (http://chdk.setepontos.com/index.php/topic,4647.msg46080.html#msg46080)). I also added a small bugfix in script.c (search for ERR99) to fix a sporadic crash of the camera at startup (free() was sometimes called on an invalid pointer in script.c, caused by missing initalisation).

If there are any questions left regarding integration of this port to the trunk, let me know.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / January / 2010, 17:14:55
Great work ERR99. Unfortunately I'm totally swamped with real work, so I won't be able to merge this into the trunk for a while. Possibly next weekend if I'm really lucky.

Maybe someone else will be able to do this, it would be good to get it in before code rot sets in :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 30 / January / 2010, 18:23:19
@ERR99
I'm also a bit busy atm, but i'll have a look tomorrow today   ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 31 / January / 2010, 17:00:14
if possible, please add this inital port for the G11 into trunk.
Done, changeset #871 (http://tools.assembla.com/chdk/changeset/871/)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: ERR99 on 12 / February / 2010, 09:36:14
Hello,

please update propcase.lua with the attached one (added proset 3).
Scripts wont work correctly without this on the G11.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 13 / February / 2010, 06:22:01
please update propcase.lua with the attached one (added proset 3).
Scripts wont work correctly without this on the G11.
Done, changeset #874 (http://tools.assembla.com/chdk/changeset/874/)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Sambas on 05 / March / 2010, 01:52:22
ixus 750 1.00H sources: http://kotisivu.dnainternet.net/sakrkorh/canon/ixus750_sd550.zip (http://kotisivu.dnainternet.net/sakrkorh/canon/ixus750_sd550.zip)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ERR99 on 21 / March / 2010, 03:21:09
Hello,
here are the sources for the G11 1.00L firmware support. After a week of testing, there are no major bugs reported, so i thinks its ready for integration. ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 21 / March / 2010, 06:44:27
ixus 750 1.00H sources: http://kotisivu.dnainternet.net/sakrkorh/canon/ixus750_sd550.zip (http://kotisivu.dnainternet.net/sakrkorh/canon/ixus750_sd550.zip)
Added to the trunk in changeset #877 (http://tools.assembla.com/chdk/changeset/877).
(Not "activated" in the autobuild yet)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 21 / March / 2010, 07:09:00
here are the sources for the G11 1.00L firmware support. After a week of testing, there are no major bugs reported, so i thinks its ready for integration. ;)
Done, changeset #882 (http://tools.assembla.com/chdk/changeset/882)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ERR99 on 24 / April / 2010, 08:14:34
Hello,

here is the S90 CHDK port for firmware versions: 100c 101a 101c. 101b is the same as 101c, so no different port is necessary. This is a filediff againts the chdk r885 version. Please integrate this changes into the chdk trunk.

Note:In difference to the G11 port, also the firmware upgrade boot method is working on the S90.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ERR99 on 25 / April / 2010, 03:08:33
Uups, if forgot to files in the platform/generic folder for the S90 port.
So please add also this two files for the S90 port to the trunk.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ERR99 on 25 / April / 2010, 04:56:35
Another DRYOS2.3#39 fix: raw_merge.c makes trouble on the new dryos version (G11 and S90), because of pathname error (rename function call failes). So please also integrate the attached file to the trunk to fix the problem with e.g. br_dev05.lua script:

Changed lines:

#ifdef CAM_DRYOS_2_3_R39
  #define TEMP_FILE        "A/raw16.tmp"
#else
  #define TEMP_FILE        "raw16.tmp"
#endif

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / April / 2010, 01:15:08
Thanks ERR99.
Added last three as changeset 888 (http://tools.assembla.com/chdk/changeset/888).

I didn't review the code much, just checked that it compiled. Also added to the batch builds as beta.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: ERR99 on 30 / April / 2010, 04:49:18
Hi reyalp,

i have here a update for the S90 configuration in camera.h.
I forgot to undefine the CAM_HAS_ERASE_BUTTON feature for the S90,
so "User Menu editing" is currently not working properly. Please integrate the attached
update of camera.h to the trunk.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / May / 2010, 01:50:03
Hi reyalp,

i have here a update for the S90 configuration in camera.h.
I forgot to undefine the CAM_HAS_ERASE_BUTTON feature for the S90,
so "User Menu editing" is currently not working properly. Please integrate the attached
update of camera.h to the trunk.
Done, changeset 889 (http://tools.assembla.com/chdk/changeset/889)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: acid2000 on 23 / May / 2010, 11:21:33
Please add the SX20 102b port to head

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: pedropaislopes on 03 / June / 2010, 22:26:33
Hello,

here is a .zip file with everything related to ixus85/SD770IS port, firmware version 100a. It compiles against trunk version 898.

Thanks a lot!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 04 / June / 2010, 17:07:17
Please add the SX20 102b port to head
Added to the CHDK trunk, changeset #900 (http://tools.assembla.com/chdk/changeset/900).

Notes:
* For now, this SX20 port is commented out in the main makefile - therefore the Autobuild Server will not deliver binaries yet.
* Changes i've made:
- some cosmetic things
- corrected typo in generic\shooting.c:  (CAMERA_sx20)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 05 / June / 2010, 06:16:42
here is a .zip file with everything related to ixus85/SD770IS port, firmware version 100a. It compiles against trunk version 898.
Added to the CHDK trunk, changeset #901 (http://tools.assembla.com/chdk/changeset/901)/ #902 (http://tools.assembla.com/chdk/changeset/902).

Notes:
* For now, this Ixus85_SD770 port is commented out in the main makefile - therefore the Autobuild Server will not deliver binaries yet.
* Changes i've made:
- some cosmetic things
- added to the main makefile (commented out)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ultimA on 06 / August / 2010, 23:09:55
I have two patches prepared, both created against trunk918. The first one renames the "examples" folder of scripts to "EXAM". This solves the problem of the SX20 (and some other cameras too) not being able to load scripts in that folder.

The second patch is less trivial and adds support for SX20 1.02d. Please include both in the trunk.

Patch "rename SCRIPTS/examples for better compatibility": http://www.megaupload.com/?d=0LS1182R (http://www.megaupload.com/?d=0LS1182R)
Patch "add support for SX20IS 1.02d": http://www.megaupload.com/?d=XA6738SJ (http://www.megaupload.com/?d=XA6738SJ)

Enjoy,
ultimA
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 07 / August / 2010, 15:43:57
* I have two patches prepared, both created against trunk918. The first one renames the "examples" folder of scripts to "EXAM". This solves the problem of the SX20 (and some other cameras too) not being able to load scripts in that folder.
* The second patch is less trivial and adds support for SX20 1.02d. Please include both in the trunk.
Done, changeset #919 (http://tools.assembla.com/chdk/changeset/919/).

ultimA - pls. check the SX20 1.02d port from the SVN server - i had to adapt the diff file manually to fit the SVN tree structure, i hope i got it all right...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: zfeet on 08 / August / 2010, 20:57:09
Hello!

Here's diff to r920 that adds support for A430. Let me know if it needs any changes.

Edit: This is the final version made with svn diff

http://www.mediafire.com/?1vrfklirgfrssbt (http://www.mediafire.com/?1vrfklirgfrssbt)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ultimA on 09 / August / 2010, 09:36:11
ultimA - pls. check the SX20 1.02d port from the SVN server - i had to adapt the diff file manually to fit the SVN tree structure, i hope i got it all right...

Perfect. Thx.

So, in the future if I make patches, how do you prefer it? I simply did: diff -rupN path_to_old_trunk path_to_new_trunk
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: pixeldoc2000 on 12 / August / 2010, 20:00:34
PATCH

I stumbled over some redundant "CAM_CONSOLE_LOG_ENABLED" stuff in sd780, sd300, sd1200. It already exists in platform\generic\main.c .
chdk-trunk920-cam-console-log-enable-cleanup-pd (http://drop.io/ixus900_sd900_100c/asset/chdk-trunk920-cam-console-log-enable-cleanup-pd-7z)

EDIT: Found more...
FEATURE_FEATHER updated CAM_FEATURE_FEATHER for sd1100, sd870, sd790, sd950 and cleaned some leftovers...
chdk-trunk920-feature-feather-cleanup-pd (http://drop.io/ixus900_sd900_100c/asset/chdk-trunk920-feature-feather-cleanup-pd-7z)

I love housekeeping  ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ultimA on 28 / August / 2010, 19:46:10
Finally, the accumulated patchset: http://www.mediafire.com/?7v1tzonlfh7rgvv (http://www.mediafire.com/?7v1tzonlfh7rgvv)
It is a zip archive which contains the following 5 patches. I propose all of them to be added to the trunk.

00_global-edge.diff: This patch contains the rewritten edge overlay. I say no more about this, if you want to know more, read its thread which explains all the details (http://chdk.setepontos.com/index.php/topic,5583.0.html (http://chdk.setepontos.com/index.php/topic,5583.0.html)). This is a global change which applies to all cameras, but for the SX20 it is even a requirement. Without this patch, the edge overlay is not stable on the SX20 (low memory). It also re-enables games for the SX20. The rest of the patches apply only to the SX20 and do not influence other cameras.

01_sx20-102d-darkframe_remote.diff: This is a combined patch to correct both Dark Frame Subtraction and Remote USB. Both of them suffered from the same mistakes.

02_sx20-102d-onoff.diff: This corrects the ON/OFF button behaviour for the SX20. With this patch it is now possible to turn the camera on directly into REC-mode by holding the button down, as is documented for the SX10.

03_sx20-zebra.diff: This was written by f_m_b and contains a workaroung for the memory requirement of zebra for the SX20. It will make the zebra paint directly into the frame buffer instead of a backbuffer. Works great with only minor issues and prevents the camera from crashing.

04_sx20-stable.diff: This is just an update to the main Makefile to make the 1.02D of the SX20 active.

I also ask for the 1.02D port of the SX20 to be marked stable and be enabled for autobuild.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 29 / August / 2010, 05:50:29
@ultimA: done, changeset #928 (http://tools.assembla.com/chdk/changeset/928/); let's see whether it kills the autobuild server :D
@pixeldoc2000: i'll have a look to your "housekeepings" later  :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ultimA on 29 / August / 2010, 11:25:40
Thank you. I just did a quick test on the autobuild and it works perfectly. A small note on the SVN comments: the zebra has not been rewritten for all cameras. It just contains a fix for the SX20. It also does not avoid flickering, but the contrary, since there is no doublebuffering anymore (only for the SX20).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: kms on 31 / August / 2010, 20:26:45
A tiny patch for the venerable A710is.

Could this be added to include/camera.h in the A710is section:

#define  CAM_REAR_CURTAIN 1

I've built with this enabled and taken photos to verify that it does
indeed change the rear curtain setting correctly.

Kim.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ultimA on 02 / September / 2010, 10:28:21
Here is a set of changes: http://drop.io/ultimaa/asset/for-chdk-931-patch (http://drop.io/ultimaa/asset/for-chdk-931-patch)

First, the short log:
- Optimizations to edge overlay
- Make edge overlay more "multitask-friendly"
- Detect a full shutter press during edge calculations too
- Wrap pano-modes in edge menu & change icons (by msl)
- Backport fixes from #928 SX20 1.02d to 1.02b
- Add experimental PTP support to SX20 1.02d (based on mweerden's PTP proposal 20/07/2010)
- Center edge overlay horizontally
- Make the overlay's horizontal area larger (+6 pixels)

And now some details:
First, the 1.02b of SX20 has received some love from me. It now has all the fixes that went in for 1.02d in #928 and its changes have been tested in the german forum. 1.02b is now also considered stable, please enable the autobuild. Second, the edge overlay has received some updates, but nothing that would change behavior. It does not fail to detect shutter presses any more, and it is also noticably faster. Also, I now only update half of the screen on every call to make it more friendly to other tasks. This effect is sometimes visible in that on a full-screen reinitialization only half of the edges are on the screen, but after 1/2 sec the other half is painted too. A complete update cycle is about unchanged since each update takes half the time now. There are some other changes too (as seen in the change list) but those are pretty self explanatory. The PTP-parts are useless without applying the PTP proposal itself, of course, which needs to be patched separately by the user (the port can be built without the PTP-proposal without changes).

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 02 / September / 2010, 17:24:26
@ kms - Hello & welcome, Kim !

Could this be added to include/camera.h in the A710is section:
#define  CAM_REAR_CURTAIN 1
Done with CHDK changeset #931 (http://tools.assembla.com/chdk/changeset/931/), thx for testing !
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 02 / September / 2010, 17:27:28
Here is a set of changes: http://drop.io/ultimaa/asset/for-chdk-931-patch (http://drop.io/ultimaa/asset/for-chdk-931-patch)
Done in changeset #931 (http://tools.assembla.com/chdk/changeset/931/) - used your "short log" for SVN comment this time  :D
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ewavr on 02 / September / 2010, 18:42:26
A tiny patch for the venerable A710is.
#define  CAM_REAR_CURTAIN 1

But why, A710 has native rear curtain support.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: kms on 02 / September / 2010, 20:36:37
But why, A710 has native rear curtain support.

Indeed. The patch is not required (though it is harmless, just adds an extra chdk config item).
Good to know the underlying chdk machinery for this works, though :)

The problem was I misunderstood the comment in camera.h:
    #undef  CAM_REAR_CURTAIN                // Camera do not have front/rear curtain flash sync
Too many negatives! Perhaps this could be amended to:
#undef CAM_REAR_CURTAIN  // when defined, enable front/rear curtain flash sync for cameras that dont already provide this

Kim.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ultimA on 04 / October / 2010, 14:00:10
Hi All,

Some small changes I'm proposing to trunk can be found at http://drop.io/hidden/jlqkjtgpqd29rhy/asset/cGF0Y2g5NTMtZGlmZi0y (http://drop.io/hidden/jlqkjtgpqd29rhy/asset/cGF0Y2g5NTMtZGlmZi0y)

Changelog:
- Fix: Make the A2000, G11 and ixus100_sd780 ports compatible with GCC 4.5. Apparently GCC 4.4 was too forgiving and still built the code, but GCC 4.5.1 errored out on them. This patch fixes the ASM so that these cams can be built successfully. The changes were not actually tested, but the fixes are trivial. As a result, all stable ports can be built using GCC 4.5.1 now. Credit also goes to whim who noticed these cams failing to build and he also suggested the first set of fixes.
- Shut up some (not all) warnings from ixus100_sd780, ixus40_sd300, ixus65_sd630, s5is, ixus60_sd600
- Fix: Make edge overlay respect OPT_EDGEOVERLAY. Previously, generated binary size did not get significantly smaller even when OPT_EDGEOVERLAY was undefined, because undefining it only resulted in the overlay being excluded from the menu, but still being built. Excluding edge overlay now saves appr. 3Kbytes.
- Fix: Edge overlay erroneously depended on OPT_DEBUGGING. Builds failed when OPT_DEBUGGING was not defined previously.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 04 / October / 2010, 16:13:21
thanks, ultimA !

In case you hadn't done this yet, I just regression-tested with GCC 4.4.0 and patched 953 still produces
exactly the same errors as the unpatched 953  :)

cheers,

wim
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ultimA on 04 / October / 2010, 16:24:29
In case you hadn't done this yet, I just regression-tested with GCC 4.4.0 and patched 953 still produces
exactly the same errors as the unpatched 953  :)

Errors? Didn't 4.4.0 only had warnings, but no errors? I've tested the patch on all cameras by doing a 'make batch-zip' and all build fine on 4.5.1. I only have one compiler set up at the moment and I did not do regression testing using the old GCC. Do you mean that it is now 4.4.0 that cannot compile?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 04 / October / 2010, 16:36:13
Oops, sorry - warnings, not errors for ixus100_sd780 ...
It has exactly the same warnings as before - mostly related to blinking and debugging
code corpses lying about

sorry for the scare ;)

wim
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ultimA on 04 / October / 2010, 16:51:40
Oops, sorry - warnings, not errors for ixus100_sd780 ...

Phew... so scared the **** out of me, don't do that again! :D
Yeah, those warnings are there but they were there before too. I did not investigate any of them yet, although to be honest, I'm not sure I will.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 04 / October / 2010, 17:21:19
It was just an ill-timed low cafeine level, i guess  :D
Now that that's fixed, I'll try and figure out how the edge overlay disable fixes work out,
never use it anyways (although I usually load vanilla builds on my cams)

wim

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ultimA on 06 / October / 2010, 19:43:26
I refreshed the patch from my 04.okt. post. It fixes all the warnings for the ixus100, and also fixes some other warnings. Some are still left, because I don't have these cameras, so I only took on the trivial fixes as I have no possibility to test. Many of the remaining warnings would have needed me to dive into firmware disassembly. Changes have been compile-tested on GCC 4.4 and 4.5.1.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 14 / October / 2010, 05:15:29
Some small changes I'm proposing to trunk can be found at http://drop.io/hidden/jlqkjtgpqd29rhy/asset/cGF0Y2g5NTMtZGlmZi0y (http://drop.io/hidden/jlqkjtgpqd29rhy/asset/cGF0Y2g5NTMtZGlmZi0y)
Changelog:
- Fix: Make the A2000, G11 and ixus100_sd780 ports compatible with GCC 4.5. Apparently GCC 4.4 was too forgiving and still built the code, but GCC 4.5.1 errored out on them. This patch fixes the ASM so that these cams can be built successfully. The changes were not actually tested, but the fixes are trivial. As a result, all stable ports can be built using GCC 4.5.1 now. Credit also goes to whim who noticed these cams failing to build and he also suggested the first set of fixes.
- Shut up some (not all) warnings from ixus100_sd780, ixus40_sd300, ixus65_sd630, s5is, ixus60_sd600
- Fix: Make edge overlay respect OPT_EDGEOVERLAY. Previously, generated binary size did not get significantly smaller even when OPT_EDGEOVERLAY was undefined, because undefining it only resulted in the overlay being excluded from the menu, but still being built. Excluding edge overlay now saves appr. 3Kbytes.
- Fix: Edge overlay erroneously depended on OPT_DEBUGGING. Builds failed when OPT_DEBUGGING was not defined previously.
I refreshed the patch from my 04.okt. post. It fixes all the warnings for the ixus100, and also fixes some other warnings. Some are still left, because I don't have these cameras, so I only took on the trivial fixes as I have no possibility to test. Many of the remaining warnings would have needed me to dive into firmware disassembly. Changes have been compile-tested on GCC 4.4 and 4.5.1.
Thx ultimA !  ... added to the trunk, changeset #955 (http://tools.assembla.com/chdk/changeset/955/).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / October / 2010, 18:16:39
A note on the last "cleanup"

Code: [Select]
BL      0xFFC0BD98
BL      0xFFC0BB50
This is wrong. It does NOT jump to the given address, because B and BL only take 24 bit PC relative offsets. It will crash.  The "correction"
Code: [Select]
BL      =0xFFC0BD98
BL      =0xFFC0BB50
Is also wrong. In this case, it doesn't matter much because it's an assert anyway.

Explanation: http://chdk.wikia.com/wiki/CHDK_Coding_Guidelines#Calling_original_ROM_functions (http://chdk.wikia.com/wiki/CHDK_Coding_Guidelines#Calling_original_ROM_functions)

There are several correct ways do do this
#1)
BL sub_<address>
CHDK build process will automatically put the correct shim in stubs_auto.S
edit: Note, this only applies to platform files mentioned in STUBS_AUTO_DEPS

#2)
MOV LR, PC
LDR PC, =<address>
for a BL, or just the LDR for a B

#3)
Add a stub to stubs_entry_2.S, and use B/BL <name>

B/BL <constant> is not something that you are ever likely to want to do.

edit:
and ADR should should generally be translated to the appropriate LDR =constant, although AFAIK ADRL will do the right thing if it assembles at all.

Random debugging code (e.g.  ixus100 boot.c) should be #if 0'd out to save memory.

I'm going to grep the code for all the B/BL [0=]0x* and fix them. Something to look out for when adding ports, it seems to be a common mistake.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / December / 2010, 23:20:14
I would like to get the SX30 and G12 ports added to the main trunk.
I'd like to do this in stages rather than trying to do a big bang as there are a lot of changes required in various files.

The first patch is attached.
This contains:
- new propset file (propset4.h)
- updated CHDK\Makefile to build propset4.lua
- updated platform.h with new propset include
- updated camera.h with SX30 & G12 sections, plus some new #defines for the functional changes in other code
- updated gui_draw.h with a new palette (#7)
- updated reversebytes.S for the DNG double buffer optimisation (platform.h is configured so that the existing calls to reverse_bytes_order are mapped to the new function name reverse_bytes_order2 so that existing code will still compile and work). I needed to include this to cover all the changes in platform.h

None of this should break any existing code (fingers crossed).

First time I've done this so I hope I haven't made too much of a mess :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / December / 2010, 23:43:33
First time I've done this so I hope I haven't made too much of a mess :)
Quite the opposite  :D

Added in changeset 1007 (http://tools.assembla.com/chdk/changeset/1007/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 31 / December / 2010, 06:48:33
Part 2 for SX30 & G12 attached.

This includes updates for the files below based on the new #defines. There are also a few camera specific bits (e.g. nTxtbl).

- core\edgeoverlay.c
- core\gui.c
- core\gui_osd.c
- core\histogram.c
- core\kbd.c
- core\motion_detector.c
- core\raw.c
- include\keyboard.h
- include\modelist.h
- makefile.inc
- platfom\generic\wrappers.c

Finally there are the new loader and platform directories for sx30 and g12 (hopefully I haven't left anything out here).

Phil.

[Update: broken patch removed]
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 31 / December / 2010, 08:12:35
hi phil

just patched 1007, edited Makefile and compiled under GCC 4.5.1 / Win 7

all 4 cam/firms say:
Quote
stubs_entry_2.S:2:29: fatal error: stubs_entry_ida.S: No such file or directory
compilation terminated.
C:\CHDK\gcc451-pmmx\bin\gmake.exe[4]: *** [stubs_entry_2.o] Error 1
C:\CHDK\gcc451-pmmx\bin\gmake.exe[3]: *** [all-recursive] Error 1
C:\CHDK\gcc451-pmmx\bin\gmake.exe[2]: *** [all-recursive] Error 1
C:\CHDK\gcc451-pmmx\bin\gmake.exe[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1

HTH,

wim

PS attached modded root Makefile removed
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: CHDKLover on 31 / December / 2010, 09:39:18
Hi phil,
the eventproc_export_* functions are missing.

CHDKLover
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 31 / December / 2010, 12:36:26
Hi phil,
the eventproc_export_* functions are missing.

CHDKLover
I usually just replace these names sub_**** when making the asm.

Including all the ida stubs takes extra memory.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 31 / December / 2010, 16:03:15
Thanks guys, don't know why I didn't try building it in the main trunk last night (oh well).

Anyway here's an updated patch that should work.

Regards,
Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 31 / December / 2010, 16:28:30
Great, no errors or warnings ! Congrats & Happy New Year !

wim
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / January / 2011, 17:53:43
Added changeset 1008 (http://tools.assembla.com/chdk/changeset/1008/trunk)

Note added to the autobuild yet, because I have to make sure the autobuild server has the FI2 keys needed for these cams.

I have some comments on the code, I'll put in the sx30 thread

edit:
broke the build, a610
Code: [Select]
gui.o: In function `gui_menuproc_swap_patitons':
gui.c:(.text+0xf8a): undefined reference to `get_part_count'
collect2: ld returned 1 exit status
???

edit:
Should be fixed in 1010, vx cams with multipartition were broken.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 01 / January / 2011, 20:47:55
Added changeset 1008 (http://tools.assembla.com/chdk/changeset/1008/trunk)

Note added to the autobuild yet, because I have to make sure the autobuild server has the FI2 keys needed for these cams.

I have some comments on the code, I'll put in the sx30 thread

edit:
broke the build, a610
Code: [Select]
gui.o: In function `gui_menuproc_swap_patitons':
gui.c:(.text+0xf8a): undefined reference to `get_part_count'
collect2: ld returned 1 exit status
???

edit:
Should be fixed in 1010, vx cams with multipartition were broken.

Thanks for that, sorry about breaking the VX stuff.
I've sent you the FI2 keys in a personal message.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / January / 2011, 20:52:56
Thanks for that, sorry about breaking the VX stuff.
No problem. I actually tried a vx camera before commiting, but it wasn't one with multipartition...
Quote
I've sent you the FI2 keys in a personal message.
I have them already, I just need to make sure the auto build server has them.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / January / 2011, 03:39:47
Some updates for the SX30 & G12.
- removed the new #defines previously added for DNG double buffer and viewport buffer width support. Now handled using weak functions and overrides.
- fixed some wrong addresses for G12
- added support for different aspect ratio / image size where the image size does not match the LCD / viewport size (SX30 has 16:9 and G12 has 16:9, 3:2, 1:1 and 4:5). Added variable viewport with & height, viewport_xoffset and viewport_yoffset so that edge overlay, zebra, histogram and motion detect only look at the image area not the whole viewport area.
- added new key definitions to keynames table.
- moved some functions that should never change across firmware versions from the platformsub/lib.c files to the platform/lib.c file for both cameras.

Regards,
Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / January / 2011, 14:51:37
Added, changeset 1017 (http://tools.assembla.com/chdk/changeset/1017)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / January / 2011, 18:33:15
Attached is a patch to add firmware 1.00e for the G12.

Firmware dump is at:
http://chdk-g12.googlecode.com/files/G12_100e_FirmwareDump.rar (http://chdk-g12.googlecode.com/files/G12_100e_FirmwareDump.rar)

Thanks,
Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / January / 2011, 22:23:34
Attached is a patch to add firmware 1.00e for the G12.
Added, changeset  1019 (http://tools.assembla.com/chdk/changeset/1019)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 05 / January / 2011, 03:57:56
Minor update for SX30 & G12.
- Cleaned up the image offset code.
- minor bug fixes and corrected address for exmem_alloc
- moved SCREEN_COLOR define into gui_draw.h so it can be easily overridden (found in five places and default value was white on the SX30 and G12).
- added some defines configured in makefile.inc so that gui_debug_draw_values can be used to show memory properly (was hard wired to VX addresses).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 06 / January / 2011, 23:30:28
Added, changeset 2^10 (http://tools.assembla.com/chdk/log/trunk). I didn't add pb2rec and rec2pb for g12 to stubs_entry_2.s, since the same addresses are found by finsig.

I actually had something else in mind for the image offset code (add the offset outside the loops, like chdkde) but that's OK.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 07 / January / 2011, 01:00:00
Note
Code: [Select]
# Misc (only used in ARM code so do not need stub)
DEF(_DebugAssert, 0xFF81EB78) // ok (comp 1.00c)
DEF(_PT_GetPropertyCaseString, 0xFF8954F0) // ok (comp 1.00c)
This compiles on some compilers (not the one on the autobuild server, apparently), but it doesn't work.

These addresses are too far away for a B/BL from RAM. It's another instances of the B <address> mistake in http://chdk.wikia.com/wiki/CHDK_Coding_Guidelines#Calling_original_ROM_functions (http://chdk.wikia.com/wiki/CHDK_Coding_Guidelines#Calling_original_ROM_functions)

You need a stub to get from RAM to ROM.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waldo on 15 / January / 2011, 18:05:47
I'm trying to use diff to create a patch file.  Is there a command-line option for outputting relative directory paths like the patches I get from tools.assembla.com rather than the absolute paths that it generates?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / January / 2011, 18:35:39
I'm trying to use diff to create a patch file.  Is there a command-line option for outputting relative directory paths like the patches I get from tools.assembla.com rather than the absolute paths that it generates?
I'm not sure which 'diff' you are talking about (svn, gnu, other) but the person applying the patch can always use -p N to remove N leading path elements.

svn diff produces relative paths by default. SVN diff is preferred for CHDK patches (as long as they are against our SVN) because they include the revision numbers which helps dealing with conflicts.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waldo on 15 / January / 2011, 21:50:45
Below, I have posted a link to a complete version 1043 release with the changes for the S95.  Perhaps someone more comfortable with the patching process could merge this into the trunk.  Thanks.

http://www.zshare.net/download/8529240391496f6b/ (http://www.zshare.net/download/8529240391496f6b/)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / January / 2011, 22:17:45
Below, I have posted a link to a complete version 1043 release with the changes for the S95.  Perhaps someone more comfortable with the patching process could merge this into the trunk.  Thanks.

http://www.zshare.net/download/8529240391496f6b/ (http://www.zshare.net/download/8529240391496f6b/)
This is definitely NOT the preferred format for submissions :(
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 25 / January / 2011, 23:49:21
IXUS120-SD940
First attempt at a TortoiseSVN patch file  Used TortoiseSVN to create a local repository and downloaded trunk1053.  Modified those files to match the IXUS120_SD940 Beta 6 build and then had TortoiseSVN create a patch file.  Does this look right? Can this be used to add the Beta version of the IXUS120_SD940 to the core trunk?

TIA.

Update :  whoops - changes to core/conf.c need #if defined(CAMERA_ixus120_sd940) around them.  Reposted - but there should probably be a better way to change the Mode set key default though ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / January / 2011, 01:46:34
waterwingz
The patch looks ok (haven't looked at the code). My time will be very limited for the next couple weeks, so I may not get to this or any other large submissions for a while.

re conf.c
Yes, it would be better to have the default alt key defined some other way.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 26 / January / 2011, 06:17:17
re conf.c
Yes, it would be better to have the default alt key defined some other way.
Thanks - now that I'm comfortable with the release mechanism,  I'll use the time to clean-up the default settings for CCHDK.CFG a bit, remove my patch to conf.c and do some testing to assure that I can apply the patch file to a clean download and compile to get a working release.  Let me know if you get some time sooner but otherwise assume I'm not ready to complete the release until I post an update ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / February / 2011, 21:48:08
Submitted for approval and possible inclusion in the main trunk as a stable Beta version,  the IXUS120 SD940.

ixus120_sd940_for_trunk_1054.patch - 0.20MB (http://www.zshare.net/download/861847530ec23100/)

Link is to a TortoiseSVN patch file that inserts the SD940 as cleanly as I think is possible into trunk revision 1054.  I have tested this by downloading 1054 clean from the svn repository, applying the patch and successfully compiling the two firmware versions supported.

Is there anything else I need to do for this to be considered a (Beta) release candidate ?

Edit :  updated - see below or http://chdk.setepontos.com/index.php?topic=5855.msg60918#msg60918 (http://chdk.setepontos.com/index.php?topic=5855.msg60918#msg60918)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Lebeau on 06 / February / 2011, 02:02:32
Bonjour tout le monde ! Here is lebeau :)

I generate a patch file from CHDK Shell, based on trunk 1054 (revision), relative to my "working copy".

I tested it on my A650.

Here is the resume of my change:

 ----------- brand new dng.c
 = speed optimization
 = addition of the Canon masked area (to evaluate noise without black framing)
 = addition of some other available DNG tags (e.g.: lens info, focal plane resolution, ... usefull in adobe profile)
// = thumbnail creation based on YCbCr instead of RGB (faster)
 = !!! RGB thumbnail creation from viewport YCbCr, since YCbCr was interpreted as RGB for non-Adobe software
 = create DNG static data at startup and update dynamic data at capture time (faster)
 = save a visual raw file when creating bad pixel bin file (a new star system is born :))
++++++++++++++++++++++++++++++++++++++++++++++
These are change that could be impact post-dng process like DNG4PS2
+const int cam_BaselineExposure [ ] = { 0, 1 } instead of ={-1,2};
+const int cam_BaselineSharpness [ ] = { 1, 1 } instead of ={4,3};
+const int cam_Resolution [ ] = { 300, 1 } instead of ={180,1};

These macros were added in camera.h file to permit ...
+#if defined CAM_MASKED_AREA_X1
+const int cam_MaskedArea [ ] = { CAM_MASKED_AREA_Y1, CAM_MASKED_AREA_X1, CAM_MASKED_AREA_Y2, CAM_MASKED_AREA_X2 };
+#endif
+#if defined CAM_ANTI_ALIAS_STRENGTH
+const int cam_AntiAliasStrength [ ] = { CAM_ANTI_ALIAS_STRENGTH };
+#endif
+#if defined CAM_FOCAL_PLANE_RESOLUTION_X
+const int cam_FocalPlaneResolutionX [ ] = { CAM_FOCAL_PLANE_RESOLUTION_X };
+const int cam_FocalPlaneResolutionY [ ] = { CAM_FOCAL_PLANE_RESOLUTION_Y };
+#endif
+#if defined CAM_COLORMATRIX2
+const int cam_ColorMatrix2 [ 9 * 2 ] = { CAM_COLORMATRIX2 };
+#endif
+#if defined CAM_FORWARDMATRIX
+const int cam_ForwardMatrix  [ 9 * 2 ] = { CAM_FORWARDMATRIX };
+#endif
+#if defined LENS_INFO
+const int cam_LensInfo [ ] = { LENS_INFO };
+#endif
++++++++++++++++++++++++++++++++++++++++++++++

 ----------- revisit raw.c
 = speed optimization
 = new explicit dng creation sequence (no more intricated)
 = active area bad pixel patching (faster)

 ----------- revisit motion_detector.c
 = speed optimization
 = add "wait-stability" option which, at startup, delay motion detection until 25% of user threshold is reached
 = launch an immediate shoot as soon as a detection cell is encounter, returning the cell index location as return value
 = on immediate shooting, md_get_cell_diff return the diff value of the triggering cell
 = !!! I fix the calculation of RGB, using (Cb-128 and Cr-128), like histogram does correctly !!!

 ----------- revisit histogram.c
 = speed optimization
 = replace half sampling (123) with full sampling (123456)

I didn't program C since long time ago and don't know how to deliver to things but I pack a rar file in case you would be interested to hadd my change into next release.

Slow download, so be patient :(
lebeau_1054_change_2011_02_11.rar - 0.29MB (http://djjatech.homeip.net:8090/chdk/lebeau_1054_change_2011_02_11.rar)

If I could do something else ... I would be please to contribute.

Lebeau

P.S.1: My DNG use YCrCb as thumbnail !!! but revert to viewport RGB since other soft see it as RGB :(
P.S.2:Since I had to understanding viewport, I optimize motion detector and then histogram. RAW was modified to move dng things into dng module and raw things to raw module. Sorry but that's why all these changes are altogether :(

Moderator edit: followup discussion here: http://chdk.setepontos.com/index.php?topic=6110.msg60927#msg60927 (http://chdk.setepontos.com/index.php?topic=6110.msg60927#msg60927)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / February / 2011, 15:31:39
Submitted for approval and possible inclusion in the main trunk as a stable Beta version,  the IXUS120 SD940.

Updated with one Stub address fix : ixus120_sd940_for_trunk_1054.patch - 0.20MB (http://www.zshare.net/download/86216428157cb239/)


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 13 / February / 2011, 18:50:06
Submitted for approval and possible inclusion in the main trunk as a stable Beta version,  the IXUS120 SD940.

Updated with one Stub address fix : ixus120_sd940_for_trunk_1054.patch - 0.20MB (http://www.zshare.net/download/86216428157cb239/)
Added in changeset 1056 (http://tools.assembla.com/chdk/changeset/1056). Thanks!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 13 / February / 2011, 22:54:41
Below, I have posted a link to a complete version 1043 release with the changes for the S95.  Perhaps someone more comfortable with the patching process could merge this into the trunk.  Thanks.

http://www.zshare.net/download/8529240391496f6b/ (http://www.zshare.net/download/8529240391496f6b/)
Aside from being a zip of an entire tree with a bunch of irrelevant white space changes and other random oddities, this doesn't even compile. and...
Quote from: stubs_entry_2.s
STUB(FF83457C)
???

Anyway, I've added this in changeset 1059 (http://tools.assembla.com/chdk/changeset/1059) with enough changes to make it compile .

Haven't added it to the autobuild, if someone wants to verify that what I've checked in is functional, I can add it as a beta.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 17 / February / 2011, 17:51:15
Minor patch for SX30 and G12 (patched against changeset 1064).
- fixed 'off by 1' mistake in get_focal_length (main.c) for both cameras.
- moved the call to 'capt_seq_hook_raw_here' to fix problem with exposures longer than 1 second not saving RAW/DNG file.

Regards,
Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / February / 2011, 17:30:41
Welcome back Phil.

I've added this in changeset 1065 (http://tools.assembla.com/chdk/changeset/1065)


Minor patch for SX30 and G12 (patched against changeset 1064).
- fixed 'off by 1' mistake in get_focal_length (main.c) for both cameras.
- moved the call to 'capt_seq_hook_raw_here' to fix problem with exposures longer than 1 second not saving RAW/DNG file.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / February / 2011, 11:05:51
Patch file for trunk 1066 to correct vid_get_viewport_live_fb() in lib.c for IXUS120-SD940 firmware versions 1.02c & 1.03c


EDIT :  implemented RefreshPhysicalScreen() correctly and removed the hacked version.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / February / 2011, 17:57:47
Patch file for trunk 1066 to correct vid_get_viewport_live_fb() in lib.c for IXUS120-SD940 firmware versions 1.02c & 1.03c
EDIT :  implemented RefreshPhysicalScreen() correctly and removed the hacked version.
Added, changeset 1067 (http://tools.assembla.com/chdk/changeset/1067)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / February / 2011, 18:29:09
Added, changeset 1067 (http://tools.assembla.com/chdk/changeset/1067)
Thanks - for adding to trunk and for prompting me to fix those things up in the first place.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / February / 2011, 20:18:25
<posted in the wrong place - sorry - moved to the correct thread>
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 25 / February / 2011, 02:06:03
Another small update for G12 & SX30 (patched against changeset 1067).
- updates for exmem memory allocation to allow these cameras to exclude video buffer memory
- fixed set_zoom function to correctly wait until zoom is finished before returning
- fixed startup code for SX30 so that init_file_modules_task gets called correctly in all cases
- changed startup code for SX30 so that short on/off button press starts in record mode and long press starts in review mode (previously was the other way around).

Regards,
Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Microfunguy on 25 / February / 2011, 20:31:14
Hi Phil.


I cannot find the thread where you discussed using DNG4PS2 calibration feature so I will just ask here.

An IXUS105 user presented me with a RAW file of the palette image.

The JPG compression artefacts are quite pronounced even at lowest ISO.

Anyway, I was eventually able to get all phases of the calibration to run but only seven areas from 22 had an error less than 10 %.

What was your experience of this ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / February / 2011, 01:32:05
Hi Phil.

I cannot find the thread where you discussed using DNG4PS2 calibration feature so I will just ask here.

An IXUS105 user presented me with a RAW file of the palette image.

The JPG compression artefacts are quite pronounced even at lowest ISO.

Anyway, I was eventually able to get all phases of the calibration to run but only seven areas from 22 had an error less than 10 %.

What was your experience of this ?

I was unable to get DNG4PS2 to work for the SX30. Instead I used the 'colorcheck' option in dcraw to create the calibration table (you have to compile your own version of dcraw to enable this).

I have not done this yet for the G12 (it's is using the G11 calibration matrix).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / February / 2011, 18:31:46
Another small update for G12 & SX30 (patched against changeset 1067).
- updates for exmem memory allocation to allow these cameras to exclude video buffer memory
- fixed set_zoom function to correctly wait until zoom is finished before returning
- fixed startup code for SX30 so that init_file_modules_task gets called correctly in all cases
- changed startup code for SX30 so that short on/off button press starts in record mode and long press starts in review mode (previously was the other way around).
Added all except for the startup change in changeset 1068 (http://tools.assembla.com/chdk/changeset/1068)

I'm hesitant to add the startup change because
- It's inconsistent with all other cameras.
- Unexpectedly opening the lens is less friendly that unexpectedly not entering REC mode.

I'm open to being convinced otherwise. Ideally this should be a user option, but it happens before we can read the CFG file.

Possible solutions:
1) We now have the ability to switch modes from normal CHDK code. This didn't exist when the "long press to start in rec mode" feature was initially added.

We could check a cfg value in main startup, and switch to the desired mode. We could still capture the button state as early as possible to detect a long / short press. This would probably result in slightly longer startup times, since the camera would start fully in play and then switch to REC.

As an aside, it should be possible to capture the switch state earlier, before copy_and_restart and stash the value somewhere (data TCM ?). This should reduce the length of the required press slightly, not clear if it is worthwhile.

2) Make it a compile time option.

3) store the value somewhere else. This would have to be
- a specific disk sector
- in the CHDK image itself (requiring proper encoding when updating)
- in camera flash
None of these are very attractive.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / February / 2011, 22:13:43
Added all except for the startup change in changeset 1068 (http://tools.assembla.com/chdk/changeset/1068)

I'm hesitant to add the startup change because
- It's inconsistent with all other cameras.
- Unexpectedly opening the lens is less friendly that unexpectedly not entering REC mode.

Thanks reyalp,

I change the SX30 because that's the way the G12 was working so I thought I had the SX30 wrong.
Attached is a patch to make the G12 work consistently with the standard (long press of on/off to start in record mode, otherwise start in playback mode).

Ideally it would be good to use the value the camera determined during the pre-CHDK startup; but this gets overwritten by the load of diskboot.bin.

One idea I've been thinking about is to not embed the CHDK code into diskboot.bin; but instead load it from another file on the SD card (in the diskboot.bin code).
This might speed up the boot process since the CHDK code would not need to be decoded/decrypted and the memory copy could be avoided (by loading the file directly to the correct location).
If the resulting diskboot.bin is small enough it would also mean that the original startup state value would not get trashed.

Regards,
Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / February / 2011, 22:55:06
One idea I've been thinking about is to not embed the CHDK code into diskboot.bin; but instead load it from another file on the SD card (in the diskboot.bin code).
This could be a good thing in many ways. However, the fact that you don't have the normal filesystem functions available will make it difficult. Even loading a small diskboot trashes enough of the OS that you really don't want to rely on anything working. Maybe you can boot enough of the canon OS the first time around, but the hooked tasks might give you trouble.

There are enough filesystem functions in the romstarter to load a diskboot, but these will only work with fat16. This might still be OK with multipartition setups, as long as they have the same behavior as the regular OS code with the "first" partition. May be worth investigating.

This is definitely something I've thought about. On the other hand, some kind of generic loadable binary support (like the currently stalled elf project) might be a better use of the effort. The "bootloader" might be a bit bigger, but the other benefits would be large.
Quote
If the resulting diskboot.bin is small enough it would also mean that the original startup state value would not get trashed.
Possible. Be aware that many cameras fail to boot an extremely small diskboot.

edit:
added in changeset 1070 (http://tools.assembla.com/chdk/changeset/1070)

FWIW, quite a few people have requested starting in REC mode as the default. Having this a compile time option would be a step in the right direction.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: quid on 27 / February / 2011, 04:56:40
3) store the value somewhere else. This would have to be
- a specific disk sector
Maybe we can do this like Canon, and store this value in the FAT16 Boot Record's executable code (0x3E-0x1FD), which is already destroyed by BOOTDISK string.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / February / 2011, 11:31:31
IXUS120-SD940 :  Found a broken jump table and a small typo in Makefile.  Probably not worth a trunk update on its own but would be nice to add into the next rolling update ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 27 / February / 2011, 15:07:47
IXUS120-SD940 :  Found a broken jump table and a small typo in Makefile.  Probably not worth a trunk update on its own but would be nice to add into the next rolling update ?
Added. I like small changes ;)

changeset 1071 (http://tools.assembla.com/chdk/changeset/1071)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / February / 2011, 15:41:18
Just curious - are updates sync'd with the German version (CHDK-DE) in any way ? Or do they just get out of sync unless somebody who watches both forum's notices ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 27 / February / 2011, 16:03:36
Just curious - are updates sync'd with the German version (CHDK-DE) in any way ? Or do they just get out of sync unless somebody who watches both forum's notices ?
The CHDKDE developers are very good about picking up changes from the trunk. I'm not so good about picking up changes from CHDKDE :(

Anyone watching either project can get email notices of each commit.

I would really like see them come back together somehow, it would be much easier if it was all in the same svn.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 05 / March / 2011, 22:12:37
Update for G12 & SX30 (patched against changeset 1081).
- Fixes startup crash (hopefully) by using different 'Open' firmware function (G12 & SX30).
- Added ND filter to G12 (from CHDK-DE).
- Faster motion detect by implementing vid_get_viewport_live_fb (G12 & SX30).
- Optimised & cleaned up motion_detect code.
- Fixed bracketing in continuous shooting mode when timer enabled.

Regards,
Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 13 / March / 2011, 17:46:40
Update for G12 & SX30 (patched against changeset 1081).
- Fixes startup crash (hopefully) by using different 'Open' firmware function (G12 & SX30).
- Added ND filter to G12 (from CHDK-DE).
- Faster motion detect by implementing vid_get_viewport_live_fb (G12 & SX30).
- Optimised & cleaned up motion_detect code.
- Fixed bracketing in continuous shooting mode when timer enabled.

Regards,
Phil.
Thanks Phil. Added all but the motion detection optimization in changeset 1086 (http://tools.assembla.com/chdk/changeset/1086)

Sorry for the delay, feel free to send me a pm if I seem to have forgotten your patch. It does happen.

I'll add the md part in another commit.

I'd like to reiterate how much I prefer more, smaller patches for unrelated changes. I can add them quicker (because I don't need a large block of free time to do the trivial parts), it's easier for CHDK-DE to keep up (especially when some changes are back-ported from their tree and others are not), and it makes reading/understanding the history easier later.

If changes are really straightforward, combining them isn't a problem, but anything that I have to think about I'd rather have isolated if possible.

edit:
added md stuff, changeset 1087 (http://tools.assembla.com/chdk/changeset/1087)

The autobuild seems to be broken but it's not due to compile errors. - fixed, thank to Hacki for some late night hacking!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 13 / March / 2011, 21:07:50
Thanks Phil. Added all but the motion detection optimization in changeset 1086 (http://tools.assembla.com/chdk/changeset/1086)

edit:
added md stuff, changeset 1087 (http://tools.assembla.com/chdk/changeset/1087)
Thanks reyalp, I'll try and keep the patches smaller in future :)

Edit: Ignore this patch, the crash fix is still not working.

Speaking of patches here's another G12 & SX30 update (patched against changeset 1089):
- fixed a bug in the histogram code that I added earlier to deal with viewport buffer width being greater than viewport width (also contains some small changes to the 'img' variable to align with the motion detect code).
- added a better method for detecting and avoiding potential crashes coming from the FsIoNotify code when opening files (http://chdk.setepontos.com/index.php?topic=6179.0 (http://chdk.setepontos.com/index.php?topic=6179.0)). The previous fix caused the RAW/DNG file save times to be slower.
- updated stub addresses (for the FsIoNotify handling)
- added #define in camera.h for the FsIoNotify special case code (plus some formatting cleanup)


Thanks,
Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 20 / March / 2011, 06:15:24
Latest G12 & SX30 patch (patched against changeset 1092).

Changes:
- added delay for SX30 in action_push_click (action_stack.c) [from CHDK-DE].
- fixed bug in histogram code for cases when viewport buffer memory is wider than actual viewport, also cleaned up the code a little (to align with the motion detect code) and added some comments.
- minor format cleanup in camera.h for G12 & SX30
- added new #define in camera.h for the (current) startup crash fix code (http://chdk.setepontos.com/index.php?topic=6179.0 (http://chdk.setepontos.com/index.php?topic=6179.0))
- added some new propcase values in propset4.h (used for some other fixes)
- clean up old code in kbd.c for G12
- updated battery min & max for G12
- fixed Dark Frame Subtraction for G12 & SX30 (requires change in generic/capt_seq.c as well as camera specific capt_seq.c).
- fixed some incorrect stub addresses for both cameras.
- added code to lens_set_focus_pos (generic/wrappers.c) for G12 to stop it crashing if 'Continuous AF' enabled.
- added startup crash fix code to open (generic/wrappers.c).
- fixed AE lock in movie mode for G12 (MakeAFScan in generic/wrappers.c)
- fixed SX30 value for KEYS_MASK0 and removed old code in kbd,c
- removed old comments in platform/sx30/main.c

Hope this isn't too big,
Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / March / 2011, 01:31:37
Fix USB_MASK for Ixus100 (SD780is) to match CHDK-DE and SDM.
http://chdk.setepontos.com/index.php?topic=6211 (http://chdk.setepontos.com/index.php?topic=6211)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 23 / March / 2011, 02:57:34
Fix USB_MASK for Ixus100 (SD780is) to match CHDK-DE and SDM.
http://chdk.setepontos.com/index.php?topic=6211 (http://chdk.setepontos.com/index.php?topic=6211)
Added, http://tools.assembla.com/chdk/changeset/1102 (http://tools.assembla.com/chdk/changeset/1102)

The autobuild server appears to be down.

Haven't forgotten about the one in your previous post, just haven't had time.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / March / 2011, 03:49:03
Haven't forgotten about the one in your previous post, just haven't had time.

No problem - I'm all too familiar with that. Always more to do than time to do it :)
Appreciate all the effort you put in here - without you (and others like you) this project would probably never happen.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / March / 2011, 19:23:26
Latest G12 & SX30 patch (patched against changeset 1092).
Added in changesets 1103-1106 (http://tools.assembla.com/chdk/log/trunk?action=stop_on_copy&rev=1106&stop_rev=&mode=stop_on_copy).

Quote
Hope this isn't too big,
It's not size that bothers me. What I'd rather not have is a lot of unrelated changes in the same patch.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / March / 2011, 20:18:38
Added in changesets 1103-1106 (http://tools.assembla.com/chdk/log/trunk?action=stop_on_copy&rev=1106&stop_rev=&mode=stop_on_copy).
Thanks again.

Quote
It's not size that bothers me. What I'd rather not have is a lot of unrelated changes in the same patch.
Noted, will try and keep things in smaller related chunks (sometimes hard when multiple fixes are in the same files; but I'll do my best).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / March / 2011, 21:34:12
Patch for SX110is to enable the startup crash fix.
Tested by danraymond - http://chdk.setepontos.com/index.php?topic=6217.msg63414#msg63414 (http://chdk.setepontos.com/index.php?topic=6217.msg63414#msg63414)
Main thread - http://chdk.setepontos.com/index.php?topic=6179.0 (http://chdk.setepontos.com/index.php?topic=6179.0)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / March / 2011, 21:45:43
Patch (from S95 port) for G12 & SX30 to fix overrides not working if shutter pressed quickly  - i.e. when you don't wait on half press for camera to calculate focus & exposure.
http://chdk.setepontos.com/index.php?topic=6226 (http://chdk.setepontos.com/index.php?topic=6226)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / March / 2011, 21:58:12
Patch for G12 & SX30 that reduces the size of the 'movie_rec.c' code by moving the quality override code to the main loop. This removes the need for one of the large functions to be patched in CHDK.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / March / 2011, 23:00:11
All added, changesets 1107-1109 (http://tools.assembla.com/chdk/log/trunk?action=stop_on_copy&rev=1109&stop_rev=&mode=stop_on_copy)

Thanks for breaking up the patches.

I assume you've verified that the video quality is still set with the movie rec change ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / March / 2011, 23:23:42
All added, changesets 1107-1109 (http://tools.assembla.com/chdk/log/trunk?action=stop_on_copy&rev=1109&stop_rev=&mode=stop_on_copy)

Thanks for breaking up the patches.

I assume you've verified that the video quality is still set with the movie rec change ?
Thank you, yes I've tested the video quality with this change on both cameras (at least for the firmware versions I have). Setting quality to 1 results in a very small file that has massive compression artifacts, and 99 gives a file that is about 2-3 times the size of the Canon default (although I'm hard pressed to see any visual difference).

I'm afraid I have a few more patches to go to bring everything up to date with the fixes I've made recently, will try and keep them as tidy as possible.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / March / 2011, 23:51:27
New property value for propset4.h - needed in lens_set_zoom_point for G12 & SX30.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / March / 2011, 23:53:16
Stub value for zoom_status for G12 & SX30, plus additional stub needed for lens_set_zoom_point for both cameras.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / March / 2011, 23:54:54
Set zoom_status in gui.c for both G12 & SX30.
Fixes problem on G12 where camera could not zoom out of digital zoom range into optical zoom range when recording video.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / March / 2011, 23:57:19
Update to lens_set_zoom_point function for G12 & SX30 (platform/generic/wrappers.c).
- Set zoom_status value.
- Zoom out of digital zoom range if camera was in this range when lens_set_zoom_point is called.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 27 / March / 2011, 01:12:42
Added, changesets 1110-1113 (http://tools.assembla.com/chdk/log/trunk?action=stop_on_copy&rev=1113&stop_rev=&mode=stop_on_copy)

It's ok if you don't break them up quite this much, all of these seemed related (zoom issues specific to these two cameras) and reasonable simple.

Probably seems like I'm never satisfied :haha ... actually I'm still figuring out what works best for me. The main thing I like to avoid is <something complicated I have to think about> + <some other unrelated stuff>. Of course, "complicated" and "unrelated" are subjective.

Thanks for all your contributions.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 01 / April / 2011, 03:49:09
Patch to cleanup 'inline' file I/O functions from stdlib.h.
Since inline optimisation is turned off this was causing multiple instances of each function to be generated.
Functions moved to platform/generic/wrappers.c since they were all simple wrappers for firmware code (except ftell which is in core/main.c).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / April / 2011, 22:48:28
Patch to cleanup 'inline' file I/O functions from stdlib.h.
Since inline optimisation is turned off this was causing multiple instances of each function to be generated.
Functions moved to platform/generic/wrappers.c since they were all simple wrappers for firmware code (except ftell which is in core/main.c).

Added, changeset 1119 (http://tools.assembla.com/chdk/changeset/1119)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / April / 2011, 00:40:36
Some more cleanup of the file I/O functions.
- mkdir, rename & remove now use the _Fut firmware functions (required for lua). FS_USE_FUT define no longer needed.
- All file I/O wrappers moved to platform/generic/wrappers.c. Direct calls to file I/O firmware code removed from raw.c.
- Re-org, and some cleanup of platform/generic/wrappers.c

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / April / 2011, 02:27:05
Some more cleanup of the file I/O functions.
- mkdir, rename & remove now use the _Fut firmware functions (required for lua). FS_USE_FUT define no longer needed.
- All file I/O wrappers moved to platform/generic/wrappers.c. Direct calls to file I/O firmware code removed from raw.c.
- Re-org, and some cleanup of platform/generic/wrappers.c

Phil.
Added, changeset 1122 (http://tools.assembla.com/chdk/changeset/1122). I removed fdelete completely, since it's the same as remove() remove now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / April / 2011, 18:55:55
Small patch for G12 & SX30 - found the rand & srand functions in the firmware,
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / April / 2011, 19:22:13
G12 & SX30 patch for loading CHDK into EXMEM allocated memory.
This includes a new option to enable the feature, plus an option to enable exmem test code (see wrappers.c & gui.c).
I've moved the values for the exmem block size and video buffer skip value from camera.h to the platformsub/makefile.inc file (this seems more consistent with other things like MEMISOSTART). These values are also needed to calculate the new MEMISOSTART for loading CHDK into exmem.

This should still be considered 'experimental'; but so far seems very stable on both G12 and SX30.

Edit
Changes to suba.c were also made in this patch:
- Removed code and variables that were not being used by CHDK (makes it smaller and simpler). This was related to supplying custom functions for the allocator and also to implement 'reclaim' logic if it ran out of memory. This would be used in more complex allocation systems (might be useful in future to merge Canon memory heap with exmem heap so you could use both).
- Added a new function 'suba_largest_block' that returns the size of the largest free memory block in the free list. This is called from 'core_get_free_memory' (main,c) to get the free memory value rather than allocating and freeing decreasing sized blocks.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / April / 2011, 21:09:24
Small patch for G12 & SX30 - found the rand & srand functions in the firmware,
Added changeset 1123 (http://tools.assembla.com/chdk/changeset/1123). If someone wants to look into adding these to the sig finder, that might help other cameras.

G12 & SX30 patch for loading CHDK into EXMEM allocated memory.
Very nice. Added in changeset 1124 (http://tools.assembla.com/chdk/changeset/1124)

Could you explain the changes in suba.c ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / April / 2011, 21:46:58
Could you explain the changes in suba.c ?

Added details to the patch post.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / April / 2011, 21:55:05
Patch to cleanup font handling:
- allocate font memory in a single block instead of a small chunk for each character in the font (uses less memory and avoids fragmentation).
- cleaned up code in rbf_font.c for font loading (merged two similar functions).
- fixed problem with 'Visual Settings -> Reset Files' menu option that would erase the symbol font file instead of resetting it back to the default value, causing symbols to vanish (gui.c, conf.c, conf.h).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / April / 2011, 01:07:01
- fixed problem with 'Visual Settings -> Reset Files' menu option that would erase the symbol font file instead of resetting it back to the default value, causing symbols to vanish (gui.c, conf.c, conf.h).
I may be mistaken, but I suspect the old behavior was intended to prevent memory being used by the symbols.

Of course, it would be better to just not load the symbols if they aren't enabled :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / April / 2011, 01:16:00
I may be mistaken, but I suspect the old behavior was intended to prevent memory being used by the symbols.

Of course, it would be better to just not load the symbols if they aren't enabled :)

Could be; but the default in a clean install is to load the icon_10.rbf file. If you use the reset files option your symbols disappear and it's not obvious how to get them back. This change resets it back to the 'clean' install value. Happy to leave the change out - the other changes to rbf_font.c are not dependent on this.

Not loading the symbols if you turn them off is probably worth looking at; but the symbols get turned off automatically when the file is loaded if the symbol font height is taller than the menu font height. So this would need some rework as well to cope with all cases.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / April / 2011, 01:41:28
Could be; but the default in a clean install is to load the icon_10.rbf file.
Here's the history of that http://tools.assembla.com/chdk/changeset/696 (http://tools.assembla.com/chdk/changeset/696) and http://chdk.kernreaktor.org/mantis/view.php?id=184 (http://chdk.kernreaktor.org/mantis/view.php?id=184)

I'll have a look at this tomorrow.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / April / 2011, 04:20:02
Initial beta for the SX130is.
Original code from previous developers merged with current changeset 1124.
Testing done by achillies.
Seems pretty stable, and supports the exmem extension to get around the low memory problems on this camera.

Patch removed - missing camera.h file
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / April / 2011, 04:27:05
Here's the history of that http://tools.assembla.com/chdk/changeset/696 (http://tools.assembla.com/chdk/changeset/696) and http://chdk.kernreaktor.org/mantis/view.php?id=184 (http://chdk.kernreaktor.org/mantis/view.php?id=184)

Makes sense, probably best to leave this bit as it is then.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / April / 2011, 15:47:51
Patch to cleanup font handling:
- allocate font memory in a single block instead of a small chunk for each character in the font (uses less memory and avoids fragmentation).
- cleaned up code in rbf_font.c for font loading (merged two similar functions).
- fixed problem with 'Visual Settings -> Reset Files' menu option that would erase the symbol font file instead of resetting it back to the default value, causing symbols to vanish (gui.c, conf.c, conf.h).
Added (lib/font/rbf_font.c part only) changeset 1125 (http://tools.assembla.com/chdk/changeset/1125)

The settings whole settings part of it (interaction between enabled and selected font and whether the font gets loaded) could use some cleanup and some point but it's not urgent.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 03 / April / 2011, 17:25:27
Updates to IXUS120-SD940 for firmware 1.02C.

Patch file attached.  Some addresses in stubs_entry_2.S for fw 1.02c changed to match those used in 1.03b and 1.03c.  Checked by waldo and waterwingz.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / April / 2011, 00:13:26
Initial beta for the SX130is.
Original code from previous developers merged with current changeset 1124.
Testing done by achillies.
Seems pretty stable, and supports the exmem extension to get around the low memory problems on this camera.
camera.h seems to be missing from this patch.

edit
Updates to IXUS120-SD940 for firmware 1.02C.

Patch file attached.  Some addresses in stubs_entry_2.S for fw 1.02c changed to match those used in 1.03b and 1.03c.  Checked by waldo and waterwingz.
Added, changeset 1127 (http://tools.assembla.com/chdk/changeset/1127)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / April / 2011, 04:10:35
camera.h seems to be missing from this patch.

Doh! Hopefully correct patch for sx130is attached to this post.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / April / 2011, 00:57:28
camera.h seems to be missing from this patch.

Doh! Hopefully correct patch for sx130is attached to this post.
There were some bits missing from loader but I got them from the previous patch.

I've added this in changeset 1128 (http://tools.assembla.com/chdk/changeset/1128). I have not added it to the autobuild. Thoughts on the alleged camera damage in: http://chdk.setepontos.com/index.php?topic=5691.msg62825#msg62825 (http://chdk.setepontos.com/index.php?topic=5691.msg62825#msg62825) ?

It is already in the CHDKDE autobuild as alpha, for whatever that's worth.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 05 / April / 2011, 01:29:23
I've added this in changeset 1128 (http://tools.assembla.com/chdk/changeset/1128). I have not added it to the autobuild. Thoughts on the alleged camera damage in: http://chdk.setepontos.com/index.php?topic=5691.msg62825#msg62825 (http://chdk.setepontos.com/index.php?topic=5691.msg62825#msg62825) ?
Thanks, not having an autobuild should not be a problem - anyone who is really keen can use CHDK-Shell to build it. It seems to work best with exmem enabled and chdk loaded into exmem (loading at the start of the Canon heap only leaves ~40K free memory, quid came up with another load address; but I'm not convinced it's a good place to load CHDK).

I don't believe CHDK would cause the sort of problem being reported, other than from the fact that the camera is probably being used more intensively by CHDK users (maybe having the camera re-focus frequently when using the motion-detect scripts contributes to quicker wear). Achillies, unfortunately, has just had this problem on his camera; but it occurred when he was turning the camera on and off (switching between CHDK and SDM partitions on his SD card).

There also seems to be a lot of reports on the net of this lens error failure that are un-related to CHDK - could be a design flaw or a weakness in the lens mechanism. It is a small package to squeeze a 12x zoom lens into - I wonder how the SX220 / SX230 will fare with their 14x zoom?

I'll add a message to sx130 thread that the code is available along with another warning of the possible dangers.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / April / 2011, 01:38:23
I don't believe CHDK would cause the sort of problem being reported, other than from the fact that the camera is probably being used more intensively by CHDK users (maybe having the camera re-focus frequently when using the motion-detect scripts contributes to quicker wear). Achillies, unfortunately, has just had this problem on his camera; but it occurred when he was turning the camera on and off (switching between CHDK and SDM partitions on his SD card).
Yes, my guess is that this model just has a marginal lens mechanism. That said, I'd rather err on the side of caution when it involves other peoples $200+ toys.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 06 / April / 2011, 04:42:00
Re-write of rbf_font.c to avoid cached/uncached memory issue (http://chdk.setepontos.com/index.php?topic=6261.0 (http://chdk.setepontos.com/index.php?topic=6261.0)).
Also cleaned up a few areas of the code and added some comments.

Phil.

Edit:
Some users have reported that the beta SX30IS version that includes this patch does not display any text in the menus after updating CHDK. I am investigating.
- Patch file removed due to bug when starting camera with no config file (default values). No text displayed in menus.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: horape on 08 / April / 2011, 04:54:43
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bdasmith on 08 / April / 2011, 17:56:13
Re-write of rbf_font.c to avoid cached/uncached memory issue (http://chdk.setepontos.com/index.php?topic=6261.0 (http://chdk.setepontos.com/index.php?topic=6261.0)).
Also cleaned up a few areas of the code and added some comments.

Phil.


Phil, this patch does not want to install for me with chdk shell...says something about a unified diff?

Not sure what to do with this.

thanks!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 08 / April / 2011, 18:57:33
Hi bdasmith,

Gave this a shot for you - turns out Phil's paths are different from CHDK-Shell's
(it uses the root of the build as working directory, so it does not "see"  'trunk',
 and even if it did, it would expect 'trunk1132'  i.o. 'trunk')

try changing (lines 3 & 4 in the patch):
Quote
--- trunk/lib/font/rbf_font.c   (revision 1132)
+++ trunk/lib/font/rbf_font.c   (working copy)
to:
Quote
--- lib/font/rbf_font.c   (revision 1132)
+++ lib/font/rbf_font.c   (working copy)
and it should work (as in: a 'test only' mode patch succeeded) [edit: tested, works fine]

hope that works for you too,

wim

[ PS Tested some more: CHDK-Shell's patch and diff commands use/generate paths relative to build's root,
  so this is something to check for if things appear not to work ]
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / April / 2011, 00:26:24
Repost of the earlier re-write of rbf_font.c to avoid cached/uncached memory issue (http://chdk.setepontos.com/index.php?topic=6261.0 (http://chdk.setepontos.com/index.php?topic=6261.0)).
(Fixed problem with this change when starting camera with no config file, where no menu text displayed).
Also cleaned up a few areas of the code and added some comments.
This version also avoids copying the 'current_font' data into the rbf_font when there is no custom font being loaded. Instead it calls back to draw_char (in gui_draw.c) to display the 'current_font' characters.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 09 / April / 2011, 12:09:07
Updates to IXUS120-SD940 to add firmware 1.03B
Patch file attached to add support for version 1.03b firmware of the IXUS120-SD940.  Port created by rulen.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / April / 2011, 23:58:07
As discussed in this topic http://chdk.setepontos.com/index.php?topic=6267.0 (http://chdk.setepontos.com/index.php?topic=6267.0) here is the patch to split the current camera.h monster into separate files in the platform/camera directories.

The perl script I used to do this is also attached. This works on CHDK-DE and SDM as well.

I have added defaults into the main camera.h for the values that did not have any placeholder there and done a little bit of re-organising.

Also added a new setting which can be used override the hard coded DNG exposure bias setting (code inserts a value of -0.5 into the DNG header, which explains why my DNG files always came out underexposed!). (Use of this in dng.c will be in a later patch).

I am working on a new tool to take all the defaults and camera values and generate a tabular file with all the cameras and values (like what CHDK-Shell can do) - unless whim beats me to it :)

Edit: patch updated to include platform_camera.h for A580 just added.

Regards,
Phil.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 10 / April / 2011, 00:17:01
Patch file attached to add support for version 1.03b firmware of the IXUS120-SD940. 
I'm kind of hoping that this gets in under the wire ahead of ths :
As discussed in this topic http://chdk.setepontos.com/index.php?topic=6267.0 (http://chdk.setepontos.com/index.php?topic=6267.0) here is the patch to split the current camera.h monster into separate files in the platform/camera directories.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / April / 2011, 01:14:51
Patch file attached to add support for version 1.03b firmware of the IXUS120-SD940. 
I'm kind of hoping that this gets in under the wire ahead of ths :
As discussed in this topic http://chdk.setepontos.com/index.php?topic=6267.0 (http://chdk.setepontos.com/index.php?topic=6267.0) here is the patch to split the current camera.h monster into separate files in the platform/camera directories.

I've checked your ixus120 patch and the only file we are both patching is makefile.inc in the root directory. If your patch is applied first I may need to redo mine, unless reyalp (or whoever merges the changes) fixes it manually.

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / April / 2011, 01:46:21
Updates to IXUS120-SD940 to add firmware 1.03B
Patch file attached to add support for version 1.03b firmware of the IXUS120-SD940.  Port created by rulen.
Added changeset 1134 (http://tools.assembla.com/chdk/changeset/1134)

@philmoz: I don't think I'll have trouble with makefile.inc, but I'm not sure how many of the pending patches I'll be able to get to this weekend.

edit
try changing (lines 3 & 4 in the patch):
Quote
--- trunk/lib/font/rbf_font.c   (revision 1132)
+++ trunk/lib/font/rbf_font.c   (working copy)
to:
Quote
--- lib/font/rbf_font.c   (revision 1132)
+++ lib/font/rbf_font.c   (working copy)
and it should work (as in: a 'test only' mode patch succeeded) [edit: tested, works fine]
Just FWIW, I prefer patches in the second format, e.g. relative to the top of the trunk (or whatever branch it belongs to) not the top of the svn repo.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / April / 2011, 02:08:02
Repost of the earlier re-write of rbf_font.c to avoid cached/uncached memory issue (http://chdk.setepontos.com/index.php?topic=6261.0 (http://chdk.setepontos.com/index.php?topic=6261.0)).
(Fixed problem with this change when starting camera with no config file, where no menu text displayed).
Also cleaned up a few areas of the code and added some comments.
This version also avoids copying the 'current_font' data into the rbf_font when there is no custom font being loaded. Instead it calls back to draw_char (in gui_draw.c) to display the 'current_font' characters.

Phil.
Added, changeset 1135 (http://tools.assembla.com/chdk/changeset/1135)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / April / 2011, 02:49:41
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 10 / April / 2011, 04:47:05
@philmoz

Quote
unless whim beats me to it
not likely (ETA = somewhere next week)

BTW, your latest perl script, when applied to 1138, on compilation gives me (on any cam tested)
Quote
In file included from ../../include/stdlib.h:1:0,
                 from font_8x16.c:2:
../../include/camera.h:126:29: fatal error: platform_camera.h: No such file or directory
compilation terminated.
C:\CHDK\gcc451\bin\gmake.exe[2]: *** [font_8x16.o] Error 1
C:\CHDK\gcc451\bin\gmake.exe[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1
gmake: *** Waiting for unfinished jobs....

incidentally, previous version gave exact same error on 1132
(and yes, I checked that the files are present)

sorry, did not have time to debug above further yet,

wim


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / April / 2011, 04:53:58
In file included from ../../include/stdlib.h:1:0,
                 from font_8x16.c:2:
../../include/camera.h:126:29: fatal error: platform_camera.h: No such file or directory
compilation terminated.

The perl script does not modify makefile.inc to add the platform/camera directory to the search path.
You need to apply the patch or manually update makefile.inc by changing
    CFLAGS+=-I$(topdir)include $(PLFLAGS) $(CPPFLAGS)
to
    CFLAGS+=-I$(topdir)include -I$(topdir)platform/$(PLATFORM) $(PLFLAGS) $(CPPFLAGS)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bdasmith on 10 / April / 2011, 09:44:19
As discussed in this topic http://chdk.setepontos.com/index.php?topic=6267.0 (http://chdk.setepontos.com/index.php?topic=6267.0) here is the patch to split the current camera.h monster into separate files in the platform/camera directories.

The perl script I used to do this is also attached. This works on CHDK-DE and SDM as well.

I have added defaults into the main camera.h for the values that did not have any placeholder there and done a little bit of re-organising.

Also added a new setting which can be used override the hard coded DNG exposure bias setting (code inserts a value of -0.5 into the DNG header, which explains why my DNG files always came out underexposed!). (Use of this in dng.c will be in a later patch).

I am working on a new tool to take all the defaults and camera values and generate a tabular file with all the cameras and values (like what CHDK-Shell can do) - unless whim beats me to it :)

Edit: patch updated to include platform_camera.h for A580 just added.

Regards,
Phil.




after applying this patch on chdk shell 3.12, it tried to restart and returned the error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.

just wanted to let you know.

I appreciate your work!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 10 / April / 2011, 17:10:26
Patch to camera.h for IXUS120 SD940 (all versions) to enable fix for camera crash at startup when opening the conf / font files  (CAM_STARTUP_CRASH_FILE_OPEN_FIX) per http://chdk.setepontos.com/index.php?topic=6179.0 (http://chdk.setepontos.com/index.php?topic=6179.0)   

(@reyalp - I think I now have the relative file position in the patch right per your request in this thread ?)                                          
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / April / 2011, 23:57:14
As discussed in this topic http://chdk.setepontos.com/index.php?topic=6267.0 (http://chdk.setepontos.com/index.php?topic=6267.0) here is the patch to split the current camera.h monster into separate files in the platform/camera directories.
Added, changeset 1140 (http://tools.assembla.com/chdk/changeset/1140). I hope this doesn't end up being a mistake :-[

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / April / 2011, 00:04:23
Patch to camera.h for IXUS120 SD940 (all versions) to enable fix for camera crash at startup when opening the conf / font files  (CAM_STARTUP_CRASH_FILE_OPEN_FIX) per http://chdk.setepontos.com/index.php?topic=6179.0 (http://chdk.setepontos.com/index.php?topic=6179.0)   
Added, changeset 1141 (http://tools.assembla.com/chdk/changeset/1141)
Quote
(@reyalp - I think I now have the relative file position in the patch right per your request in this thread ?)                                          
I don't recall problems with yours, some from philmoz had 'trunk' in them. It's not a big deal.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / April / 2011, 00:19:43
Added, changeset 1140 (http://tools.assembla.com/chdk/changeset/1140). I hope this doesn't end up being a mistake :-[



Thanks, if it turns out to be a mistake I can always write a script to put everything back into one file ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 11 / April / 2011, 02:02:28
@reyalp, philmoz

Quote
Added, changeset 1140. I hope this doesn't end up being a mistake Embarrassed

The bad news: I obviously didn't cast a wide enough net, CHDK-Shell 3.12 barfs on 1141  :D
The good news: compiles flawlessly when above is fixed, will issue 3.13 soon  :)

wim



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / April / 2011, 05:15:05
Patch for SX30 & G12 (patched against changeset 1141).
- Added code to override the -0.5 DNG exposure bias that is set in the dng.c code. If your DNG files are 1/2 stop underexposed this is why. Exposure bias set to 0 for G12 & SX30.
- Changed logical screen width to 360 (from 320).
- Cleanup old code in capt_seq.c & added some comments to boot.c
- Aligned vid_bitmap_refresh logic on both cameras. It's still not perfect; but I get less problems with menus vanishing with this version.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bdasmith on 12 / April / 2011, 23:27:14
I love the new camera.h way...makes it so much easier to read and find things :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 13 / April / 2011, 04:10:14
Patch for SX20 1.02d to enable exmem and loading CHDK into exmem.
Also enables startup crash fix for SX20.

Tested by bdasmith.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 13 / April / 2011, 05:38:57
Patch for bug introduced in cleanup of rbf_font.c.
Long lines in menus not properly clipped to menu area.

Sorry about that chief :-[

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 13 / April / 2011, 06:02:54
Patch for bug introduced in cleanup of rbf_font.c.

Added in revision 1142. Thank you for the very fast fix.

msl

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: gkaras on 13 / April / 2011, 09:05:50
Can one answer me or direct to proper topic:

Does exist software for remote control of a camera with chdk firmware via usb from pc?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bdasmith on 13 / April / 2011, 10:04:17
Patch for SX20 1.02d to enable exmem and loading CHDK into exmem.
Also enables startup crash fix for SX20.

Tested by bdasmith.


Sorry!  my testing was quite extensive enough....forget to test video....
video not working
not sure yet if it is the exmem or the startup fix....
will test today

sorry, beeen tired - new baby in the house :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bdasmith on 13 / April / 2011, 17:12:00
Philmoz,

the #define fix works perfectly for the startup issue, you can add that to the trunk....

It was the exmem that was causing the video to not record.  it would try but the buffer bar showed and then it stopped recording.
is there anything i can do to make it work?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 13 / April / 2011, 18:09:14
Philmoz,

the #define fix works perfectly for the startup issue, you can add that to the trunk....

It was the exmem that was causing the video to not record.  it would try but the buffer bar showed and then it stopped recording.
is there anything i can do to make it work?

Disable the OPT_CHDK_IN_EXMEM option and enable OPT_EXMEM_TESTING. Rebuild and try recording a video. If it's a problem with the exmem memory block overlapping the video buffers then it will show the corruption info on screen (write down the values shown and send them to me). If video still fails; but no exmem memory corruption is shown then reduce the EXMEM_BUFFER_SIZE (try 3MB, 0x300000), you will also need to increase MEMISOSTART (to 0x3A089E0 if EXMEM_BUFFER_SIZE is 3MB).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bdasmith on 14 / April / 2011, 20:31:08
Thanks Philmoz,

I used a 3mb buffer size, video works for the most part (sometimes fails) but there is still a video buffer bar on the screen that has one block highlighted - this is with the quality set at 84 (this is default setting)
The emem testing still says ok, even when the video does fail...

Should i try going to a 2mb buffer?  
also, just so i know, what is the buffer that we are changing do/for?

what would memisostart be for the 2mb?

at this point, with Exmem & Exmem testin all the functions i have tested are working correctly, no crashes, edge define and zebra enable at the same time, raw works good, scripts seem to work good and free ram with everything enabled was at 2.6 mb
and Exmem testing says OK.
video was working as described above...

so what do you think?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / April / 2011, 20:57:07

I used a 3mb buffer size, video works for the most part (sometimes fails) but there is still a video buffer bar on the screen that has one block highlighted - this is with the quality set at 90
The emem testing still says ok, even when the video does fail...


I'm not sure what this 'video buffer bar' is you are referring to is - is this a CHDK OSD thing or something the camera displays?

When the video fails what happens? Does it just stop recording, does the camera crash, or is the video corrupted?

If the video recording just stops then you probably have the quality setting too high for your SD card and it can't write the data fast enough. Turn off the quality override in CHDK and make sure it is working with the default camera settings.

If the camera is crashing or the video is corrupted then we need to do more testing of the exmem buffer size and/or location.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bdasmith on 14 / April / 2011, 21:40:10
sorry to be unclear!

ummm..okay...

this is is at the videos default setting, i accidently wrote the wrong number in previous post (edited it)

when the video fails, i mean it just stops recording...

the buffer bar (this is just what i call it, don't know what it is for sure) is the camera OS thing.

so default settings, just stops recording, yet exmem test still says ok.

hope that helps :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / April / 2011, 21:52:50
sorry to be unclear!

ummm..okay...

this is is at the videos default setting, i accidently wrote the wrong number in previous post (edited it)

when the video fails, i mean it just stops recording...

the buffer bar (this is just what i call it, don't know what it is for sure) is the camera OS thing.

so default settings, just stops recording, yet exmem test still says ok.

hope that helps :)

Sounds like your SD card can't keep up - what type/class is it?

If you disable CHDK (unlock the card) can you record videos OK?
The CHDK quality setting of 84 may not be the same as the cameras default video quality setting.
If video recording with CHDK disabled works then turn off the CHDK video quality override (Video Parameters, Video Mode = Default) and try it again with CHDK.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bdasmith on 14 / April / 2011, 21:56:34
sorry to be unclear!

ummm..okay...

this is is at the videos default setting, i accidently wrote the wrong number in previous post (edited it)

when the video fails, i mean it just stops recording...

the buffer bar (this is just what i call it, don't know what it is for sure) is the camera OS thing.

so default settings, just stops recording, yet exmem test still says ok.

hope that helps :)

Sounds like your SD card can't keep up - what type/class is it?

If you disable CHDK (unlock the card) can you record videos OK?
The CHDK quality setting of 84 may not be the same as the cameras default video quality setting.
If video recording with CHDK disabled works then turn off the CHDK video quality override (Video Parameters, Video Mode = Default) and try it again with CHDK.

Phil.


without exmem enabled, my class 10 sd card records video just fine at video setting 99....

its only with the exmem enabled....changing from 4mb to 3mb made it record, but just not as perfect as normal
thats why i was asking about lowering from 3 to 2mb.

edit: maybe we should also move this conversation to the 'experimental alternate memory' thread
edit: this conversation moved to personal messages...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / April / 2011, 01:37:13
Patch to fix a problem with the code generated by GCC 4.4.0 when compiling the readdir function in platform/generic/wrappers.c.

I believe this is the cause of the problem reported on the G12 using builds from the autobuild server (http://chdk.setepontos.com/index.php?topic=6299.0 (http://chdk.setepontos.com/index.php?topic=6299.0)).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / April / 2011, 02:14:34
Patch to fix a problem with the code generated by GCC 4.4.0 when compiling the readdir function in platform/generic/wrappers.c.

I believe this is the cause of the problem reported on the G12 using builds from the autobuild server (http://chdk.setepontos.com/index.php?topic=6299.0 (http://chdk.setepontos.com/index.php?topic=6299.0)).

Phil.

Applied in changeset 1144 (http://tools.assembla.com/chdk/changeset/1144)

Code: [Select]
+  static char de[40] = ""; // (philmoz 15/4/2011) Must initialize this variable or GCC 4.4.0 will generate bad code and the File Browser will crash.
Whaaa ?

Are you sure it's compiler generating bad code ? If it's actually bad code being generated, it seems like it should affect all dryos autobuilds.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / April / 2011, 02:23:00

Are you sure it's compiler generating bad code ? If it's actually bad code being generated, it seems like it should affect all dryos autobuilds.


I have no idea why this only affects the G12 that we know of; but below is what the compiler is generating on my system.

Edit: Same problem occurs on SX30 1.00h with autobuild server version 1143. So could be affecting other cameras as well.

GCC 4.5.1 with 'de' uninitialized, and GCC 4.4.0 with 'de' initialized both generate:
Code: [Select]
00185ba0 <readdir>:
  185ba0: e92d4010 push {r4, lr}
  185ba4: e59f401c ldr r4, [pc, #28] ; 185bc8 <readdir+0x28>
  185ba8: e1a01004 mov r1, r4                              <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  185bac: eb0013d6 bl 18ab0c <_ReadFastDir>
  185bb0: e5d40000 ldrb r0, [r4]                            <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  185bb4: e3500000 cmp r0, #0
  185bb8: 11a00004 movne r0, r4
  185bbc: 03a00000 moveq r0, #0
  185bc0: e8bd4010 pop {r4, lr}
  185bc4: e12fff1e bx lr
  185bc8: 001b0104 .word 0x001b0104

GCC 4.4.0 with 'de' uninitialized generates this:
Code: [Select]
0018633c <readdir>:
  18633c: e92d4010 push {r4, lr}
  186340: e59f401c ldr r4, [pc, #28] ; 186364 <readdir+0x28>
  186344: e2841034 add r1, r4, #52 ; 0x34                <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  186348: eb001248 bl 18ac70 <_ReadFastDir>
  18634c: e5f40034 ldrb r0, [r4, #52]!                        <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  186350: e3500000 cmp r0, #0 ; 0x0
  186354: 11a00004 movne r0, r4
  186358: 03a00000 moveq r0, #0 ; 0x0
  18635c: e8bd4010 pop {r4, lr}
  186360: e12fff1e bx lr
  186364: 001b0cd0 .word 0x001b0cd0

Look at the lines I've highlighted - GCC 4.4.0 with 'de' uninitialized is passing and testing the address 12 bytes past the end of the 'de' memory.

I need to test the next version created from the autobuild server to ensure that it really fixes the problem.

(At a guess I'd say that the changes made to cleanup the stdio functions, or the changes made to the exmem code, have altered the way GCC 4.4.0 is handling the file - thus exposing this compiler bug. Wouldn't be the first time I've seen behaviour like this - the stories I could tell...)


Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / April / 2011, 01:33:41
Patch for SX30 & G12 (patched against changeset 1141).
- Added code to override the -0.5 DNG exposure bias that is set in the dng.c code. If your DNG files are 1/2 stop underexposed this is why. Exposure bias set to 0 for G12 & SX30.
- Changed logical screen width to 360 (from 320).
- Cleanup old code in capt_seq.c & added some comments to boot.c
- Aligned vid_bitmap_refresh logic on both cameras. It's still not perfect; but I get less problems with menus vanishing with this version.

Phil.
Added, changeset 1145 (http://tools.assembla.com/chdk/changeset/1145)

Patch for SX20 1.02d to enable exmem and loading CHDK into exmem.
Also enables startup crash fix for SX20.

Tested by bdasmith.

Added, changeset 1146 (http://tools.assembla.com/chdk/changeset/1145)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: cppasm on 16 / April / 2011, 06:48:25
Look at the lines I've highlighted - GCC 4.4.0 with 'de' uninitialized is passing and testing the address 12 bytes past the end of the 'de' memory.
This shows nothing, because variable in literal pool have different value, and we dont see here address of "de" in memory.
The generated code may be correct in both cases.
The only thing that is changed when you initialize "de" is that it's moved from .bss to .data section.
The wrong code is at next two lines:
Code: (c) [Select]
 _ReadFastDir(d, &de);
  return de[0]? &de : (void*)0;
"de" itself is an address of array, by taking address of it you get pointer to pointer.
GCC silently casts pointer to pointer type to just pointer.
I don't believe that this can lead to some problems, but this is definitely wrong.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 16 / April / 2011, 07:49:24
Look at the lines I've highlighted - GCC 4.4.0 with 'de' uninitialized is passing and testing the address 12 bytes past the end of the 'de' memory.
This shows nothing, because variable in literal pool have different value, and we dont see here address of "de" in memory.
The generated code may be correct in both cases.
The only thing that is changed when you initialize "de" is that it's moved from .bss to .data section.

If that were the only thing that changed then why does the compiler generate different code?
Why does the original code generated by GCC 3.4.6 & GCC 4.5.1 work; but the code generated by GCC 4.4.0 does not - if this is not a compiler bug what is it?
Look closely at the original code generated by GCC 4.4.0 - it is passing R4+52 as the address to _ReadFastDir and is then checking the value at R4+52; but it returns R4. This is clearly wrong, the code when generated correctly uses the same address for all three uses of 'de', when passed to _ReadFastDir, when tested after that call and as the return value of the function.
Using two different addresses is a compiler bug - it is generating bad code pure and simple.

Quote
The wrong code is at next two lines:
Code: (c) [Select]
  _ReadFastDir(d, &de);
  return de[0]? &de : (void*)0;
"de" itself is an address of array, by taking address of it you get pointer to pointer.
GCC silently casts pointer to pointer type to just pointer.
I don't believe that this can lead to some problems, but this is definitely wrong.

This is an incorrect; but common mistake, arising from a misunderstanding of the difference between arrays and pointers in C.
An array name in C is not a pointer, it is the address of the first element of the array.
Using the example from readdir, then in C the following are all true:
  de == &de, &de == &de[0] and de == &de[0]
all forms return the same physical address.
Technically they are slightly different 'de' and '&de[0]' are the address of the first element, while '&de' is the address of the entire array. Practically this makes no difference in the readdir code - the code is perfectly valid C; although perhaps not the most readable form.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: cppasm on 16 / April / 2011, 11:21:41
Look closely at the original code generated by GCC 4.4.0 - it is passing R4+52 as the address to _ReadFastDir and is then checking the value at R4+52; but it returns R4.
Yes, that is true. This looks like compiler bug.
Does it persists with the latest released gcc 4.4.6?
This is an incorrect; but common mistake, arising from a misunderstanding of the difference between arrays and pointers in C.
An array name in C is not a pointer, it is the address of the first element of the array.
I understand the difference.
Name of the array is not a pointer (pointer itself have a size, while array name does not), but casts to it.
As I wrote - this is not an error, but taking address of "de" is not neccessary here, and is wrong.

Here is a testcase:
Code: (c) [Select]
char *test_fn(void)
{
    static char test[40];
    return &test;
}

GCC 4.6.0:
arm-elf-gcc -c -O2 -nostdlib -Wall test.c
test.c: In function 'test_fn':
test.c:4:5: warning: return from incompatible pointer type [enabled by default]

VS 2005:
cl /c /Ox /W3 test.c
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.762 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

test.c
test.c(4) : warning C4047: 'return' : 'char *' differs in levels of indirection from 'char (*)[40]'

Changing code to "return test;" resolves all this warnings.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 16 / April / 2011, 18:43:10
Changing code to "return test;" resolves all this warnings.

Add 'printf("%08x %08x %08x\n",test,&test,&test[0]);' before the return and run the resulting programs.
You should get the same memory address printed 3 times.

As I said technically they are different things, which is what the compiler is warning you about.
But the end result is identical compiled code so it makes no difference when it is running.

Returning the address of 'de' in readdir may not be necessary or good practice; but it is not wrong.

The return type for readdir in wrappers.c is void*, whereas the definition in stdlib.h is 'struct dirent *' - that's a far worse coding practice and abuse of the C language than returning '&de'.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 16 / April / 2011, 21:06:31
G12 patch to cleanup boot.c task hook (removes changes made while tracking down startup crash that are not needed).
Also adds display of exmem start address when OPT_EXMEM_TESTING is enabled. This is the value to use for MEMISOSTART when using OPT_CHDK_IN_EXMEM (saves calculating it manually).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / April / 2011, 08:57:57
Attached please find a patch file to add support for IXUS120-SD940 firmware version 1.01A.   Thanks to forum members gesualdo and zawin for their testing work.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / April / 2011, 09:09:29
A small patch to the value used for  vid_get_viewport_width()  in IXUS120-SD940 firmware 1.02C that aligns it with the other three firmware versions of this camera.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 17 / April / 2011, 13:48:04
G12 patch to cleanup boot.c task hook (removes changes made while tracking down startup crash that are not needed).
Also adds display of exmem start address when OPT_EXMEM_TESTING is enabled. This is the value to use for MEMISOSTART when using OPT_CHDK_IN_EXMEM (saves calculating it manually).
Added changeset 1148 (http://tools.assembla.com/chdk/changeset/1148)

A small patch to the value used for  vid_get_viewport_width()  in IXUS120-SD940 firmware 1.02C that aligns it with the other three firmware versions of this camera.
Added changeset 1149 (http://tools.assembla.com/chdk/changeset/1149)

A small patch to the value used for  vid_get_viewport_width()  in IXUS120-SD940 firmware 1.02C that aligns it with the other three firmware versions of this camera.
Added changeset 1150 (http://tools.assembla.com/chdk/changeset/1150)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / April / 2011, 19:07:10
Added changeset 1149 (http://tools.assembla.com/chdk/changeset/1149)
Added changeset 1150 (http://tools.assembla.com/chdk/changeset/1150)
Thanks for taking care of this.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 18 / April / 2011, 09:14:24
Patch for G12 & SX30 (patched against changeset 1150).

While looking at the EXMEM code in the firmware I noticed the 'memshow' eventproc that displays various useful information about the firmware heap memory allocation.

Tracing through this code I found a function that fills an array of 10 int's with this memory info. It gives things like start and end address of the heap, total size, size allocated, free space and size of the largest free block. This last one is what the code in 'core_get_free_memory' (in main.c) attempts to calculate in a somewhat crude manner.

It would seem that calling the firmware function would be a good replacement for the current 'core_get_free_memory' code.

I've called this function GetMemInfo in the G12 & SX30 patch.

This patch adds:
- new define in camera.h CAM_FIRMWARE_MEMINFO (include comments on how to find the above function).
- prototype for GetMemInfo and struct definition of the data returned in platform.h
- change to core_get_free_memory to use GetMemInfo if CAM_FIRMWARE_MEMINFO is defined in main.c
- added wrapper for the firmware function in generic/wrappers.c
- added stubs for G12 and SX30 for GetMemInfo (surprisingly it's the same address for both cameras across all firmware versions).

I checked the firmware for the SX20, D10, S95 and IXUS1000 and they all appear to have this function.

Phil.

Edit: patch removed.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / April / 2011, 15:31:54
Patch to fix a problem with the code generated by GCC 4.4.0 when compiling the readdir function in platform/generic/wrappers.c.
@philmoz : This appears to break the file browser when CHDK is compiled with gcc3.4.6  (at least I've tracked that problem to this patch for the SD940)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 23 / April / 2011, 17:23:06
Look closely at the original code generated by GCC 4.4.0 - it is passing R4+52 as the address to _ReadFastDir and is then checking the value at R4+52; but it returns R4.
This is clearly wrong, the code when generated correctly uses the same address for all three uses of 'de', hen passed to _ReadFastDir, when tested after that call and as the return value of the function.
No, it isn't:
Code: [Select]
18634c: e5f40034 ldrb r0, [r4, #52]!
The exclamation means update R4.

It's returning the same value it passes to _ReadFastDir

My guess is that the size of dirent has increased.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / April / 2011, 17:46:10
Patch for IXUS120-SD940 using CAM_DATE_FOLDER_NAMING as used but CHDKLover in the CHDK-DE forum.  Allows RAW and DNG files to be save in the same folders as their corresponging JPG's.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 24 / April / 2011, 21:48:54
Patch for IXUS120-SD940 using CAM_DATE_FOLDER_NAMING as used but CHDKLover in the CHDK-DE forum.  Allows RAW and DNG files to be save in the same folders as their corresponging JPG's.
Added, changset 1157 (http://tools.assembla.com/chdk/changeset/1157)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 24 / April / 2011, 22:42:06
Look closely at the original code generated by GCC 4.4.0 - it is passing R4+52 as the address to _ReadFastDir and is then checking the value at R4+52; but it returns R4.
This is clearly wrong, the code when generated correctly uses the same address for all three uses of 'de', hen passed to _ReadFastDir, when tested after that call and as the return value of the function.
No, it isn't:
Code: [Select]
18634c: e5f40034 ldrb r0, [r4, #52]!
The exclamation means update R4.

It's returning the same value it passes to _ReadFastDir

My guess is that the size of dirent has increased.

That makes a lot more sense - glad it's sorted properly now.
Apologies for sending things off in the wrong direction.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 24 / April / 2011, 23:21:21
That makes a lot more sense - glad it's sorted properly now.
Apologies for sending things off in the wrong direction.
No problem. You wouldn't be the first one to convince yourself some blob of assembler was doing something it didn't  :-[

I'm pretty sure the size of dirent was the problem, but if you can verify that the current autobuild does work correctly on g12 and sx30, that would be appreciated.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / April / 2011, 08:55:21
That makes a lot more sense - glad it's sorted properly now.
Apologies for sending things off in the wrong direction.
No problem. You wouldn't be the first one to convince yourself some blob of assembler was doing something it didn't  :-[

I'm pretty sure the size of dirent was the problem, but if you can verify that the current autobuild does work correctly on g12 and sx30, that would be appreciated.

Confirmed latest autobuild (1160) working on G12 (1.00c) and SX30 (1.00h).

Just out of curiosity, why did you use _malloc and _free in opendir and closedir?
Wouldn't malloc and free be preferable in case exmem is enabled?

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / April / 2011, 12:00:30
Just out of curiosity, why did you use _malloc and _free in opendir and closedir?
Wouldn't malloc and free be preferable in case exmem is enabled?
Yes (although the amount of memory is pretty trivial...) I used the _ version just to avoid some warnings, with the intention of switching it after I made stdlib.h include cleanly. Then I forgot when I did clean up stdlib.h ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / April / 2011, 18:50:35
Patch for SX130 IS to stop get_effective_focal_length value from overflowing and displaying negative values.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 29 / April / 2011, 22:03:55
Patch for SX130 IS to stop get_effective_focal_length value from overflowing and displaying negative values.
Added, changeset 1161 (http://tools.assembla.com/chdk/changeset/1161)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / April / 2011, 03:49:14
Patch for SX30 & G12 to fix AV bracketing in continuous drive mode.

Although the PROPCASE_AV value is set in shooting_av_bracketing (via shooting_set_av96_direct) these cameras don't appear to use the new value to change the iris aperture when in continuous shooting mode.

Added a call to MoveIrisWithAv in shooting_av_bracketing for these two cameras to force the physical aperture change when the property is changed.

Phil.

Edit: Also, could we have the 'beta' tag removed from the G12 and SX30 autobuilds please.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / April / 2011, 17:52:36
This one slipped through the cracks, thanks for the reminder.

Patch for G12 & SX30 (patched against changeset 1150).

While looking at the EXMEM code in the firmware I noticed the 'memshow' eventproc that displays various useful information about the firmware heap memory allocation.

Tracing through this code I found a function that fills an array of 10 int's with this memory info. It gives things like start and end address of the heap, total size, size allocated, free space and size of the largest free block. This last one is what the code in 'core_get_free_memory' (in main.c) attempts to calculate in a somewhat crude manner.
Note that the heap start and size shown here are simply constants from ROM (at least on D10), so they don't account for CHDK stealing part of the heap (assuming CHDK not in exmem).
Quote
I checked the firmware for the SX20, D10, S95 and IXUS1000 and they all appear to have this function.
The format of the structure does not appear to be quite the same in D10. For example, it stores start, length and calculates end, where g12 has start, end, size in the struct itself. I would guess (but haven't verified yet) this varies by dryos release, so we should only need a handful of different versions, rather than one for each camera.

Rather then exposing the canon firmware dependent structure to normal CHDK code, it would be better to have a standard CHDK function that extracts the useful values in a consistent way, and restrict the ifdefs to the implementation of that function and possibly struct.

It would probably be worth trying to add this function to the sig finder.

A function to find the largest free block was found for vxworks a long time ago. I have a patch for this sitting around, probably time to revisit it.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / April / 2011, 19:51:01
This one slipped through the cracks, thanks for the reminder.

Patch for G12 & SX30 (patched against changeset 1150).

While looking at the EXMEM code in the firmware I noticed the 'memshow' eventproc that displays various useful information about the firmware heap memory allocation.

Tracing through this code I found a function that fills an array of 10 int's with this memory info. It gives things like start and end address of the heap, total size, size allocated, free space and size of the largest free block. This last one is what the code in 'core_get_free_memory' (in main.c) attempts to calculate in a somewhat crude manner.
Note that the heap start and size shown here are simply constants from ROM (at least on D10), so they don't account for CHDK stealing part of the heap (assuming CHDK not in exmem).
Quote
I checked the firmware for the SX20, D10, S95 and IXUS1000 and they all appear to have this function.
The format of the structure does not appear to be quite the same in D10. For example, it stores start, length and calculates end, where g12 has start, end, size in the struct itself. I would guess (but haven't verified yet) this varies by dryos release, so we should only need a handful of different versions, rather than one for each camera.

Rather then exposing the canon firmware dependent structure to normal CHDK code, it would be better to have a standard CHDK function that extracts the useful values in a consistent way, and restrict the ifdefs to the implementation of that function and possibly struct.

It would probably be worth trying to add this function to the sig finder.

A function to find the largest free block was found for vxworks a long time ago. I have a patch for this sitting around, probably time to revisit it.

OK, thanks. Probably best to put this patch on hold for now. Will revisit it again when I have some time :)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / April / 2011, 23:20:47
Patch for SX30 & G12 to fix AV bracketing in continuous drive mode.

Although the PROPCASE_AV value is set in shooting_av_bracketing (via shooting_set_av96_direct) these cameras don't appear to use the new value to change the iris aperture when in continuous shooting mode.

Added a call to MoveIrisWithAv in shooting_av_bracketing for these two cameras to force the physical aperture change when the property is changed.
Added, changeset 1162 (http://tools.assembla.com/chdk/changeset/1162)
Note I changed the logic with 'value' slightly in shooting.c, since 0 is theoretically a valid value (not that I see Canon shipping an f/1.0 lens in a P&S any time soon ;))

Also wanted to check that Av override works correctly in with just the propcase in non-continuous mode ? Otherwise the _MoveIrisWithAv would be needed elsewhere, for scripting at least.
Quote
Edit: Also, could we have the 'beta' tag removed from the G12 and SX30 autobuilds please.
Done, 1163 (http://tools.assembla.com/chdk/changeset/1163)

edit
OK, thanks. Probably best to put this patch on hold for now. Will revisit it again when I have some time :)

Phil.
I'm looking into putting the functions into the sig finder at least. The vxworks one is slightly annoying because you need to find the mempart id of the canon heap for each camera :/
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / April / 2011, 23:39:20
Added, changeset 1162 (http://tools.assembla.com/chdk/changeset/1162)
Note I changed the logic with 'value' slightly in shooting.c, since 0 is theoretically a valid value (not that I see Canon shipping an f/1.0 lens in a P&S any time soon ;))
Many thanks.

Although, wouldn't a value of 0 be an f/0.0 lens (infinite aperture)? (f/1.0 = Av value of 96 by my calculation) :)

Quote
Also wanted to check that Av override works correctly in with just the propcase in non-continuous mode ? Otherwise the _MoveIrisWithAv would be needed elsewhere, for scripting at least.
Yes, Av override works fine in single shot mode.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / May / 2011, 00:12:47
Although, wouldn't a value of 0 be an f/0.0 lens (infinite aperture)? (f/1.0 = Av value of 96 by my calculation) :)
APEX Av = log2 (f number)2. Camera works in APEX*96 so 0 is f/1.0 and 96 is f/1.4 (or f/sqrt(2) if you want to be pedantic ;))
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / May / 2011, 03:58:08
I'm looking into putting the functions into the sig finder at least. The vxworks one is slightly annoying because you need to find the mempart id of the canon heap for each camera :/
in changeset 1165 (http://tools.assembla.com/chdk/changeset/1165) I've added GetMemInfo to the sig finder for dryos. There appears to only be 2 variants, < R39 and >= R39

I haven't checked all the cams, but all the ones I did check were all 100% matches so it should be good.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 01 / May / 2011, 04:25:07
I'm looking into putting the functions into the sig finder at least. The vxworks one is slightly annoying because you need to find the mempart id of the canon heap for each camera :/
in changeset 1165 (http://tools.assembla.com/chdk/changeset/1165) I've added GetMemInfo to the sig finder for dryos. There appears to only be 2 variants, < R39 and >= R39

I haven't checked all the cams, but all the ones I did check were all 100% matches so it should be good.
Looking at the code the older version returns 9 values instead of 10, with the 'end address' missing (it calculates this from the start address and size in the function that uses the values).

What's the best way to handle this in the wrapper code?
Is it safe to use the CAM_DRYOS_2_3_R39 define to have differentiate the two - and fill in the missing value if this is not defined>

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / May / 2011, 15:53:37
I'm looking into putting the functions into the sig finder at least. The vxworks one is slightly annoying because you need to find the mempart id of the canon heap for each camera :/
in changeset 1165 (http://tools.assembla.com/chdk/changeset/1165) I've added GetMemInfo to the sig finder for dryos. There appears to only be 2 variants, < R39 and >= R39

I haven't checked all the cams, but all the ones I did check were all 100% matches so it should be good.
Looking at the code the older version returns 9 values instead of 10, with the 'end address' missing (it calculates this from the start address and size in the function that uses the values).
That agrees with my observation.
Quote
What's the best way to handle this in the wrapper code?
Is it safe to use the CAM_DRYOS_2_3_R39 define to have differentiate the two - and fill in the missing value if this is not defined>
As safe as anything else in CHDK ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / May / 2011, 07:08:57
Patch to speed up finsig signature finder.

On the G12 / SX30 this reduces the time to generate the stubs_entry.S file from 29 seconds to 14 seconds (on my dev PC).

Tested on a sampling of vxworks and dryos cameras and this still generates the same stubs_entry.S file (have not tested all cameras though so there's a small chance this may break something).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / May / 2011, 07:33:18
Second go at the GetMemInfo patch - now that reyalp has added the signature for this function.

Enabled & tested for G12 & SX30 - note I have not tested this for any pre R39 dryos cameras (as I don't own one).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / May / 2011, 00:51:16
Added, changeset 1168 (http://tools.assembla.com/chdk/changeset/1168)

On the G12 / SX30 this reduces the time to generate the stubs_entry.S file from 29 seconds to 14 seconds (on my dev PC).
About the same on mine, and 89 to 44 on my laptop(!). This should make full batch builds with sigs a little less painful.
Quote
Tested on a sampling of vxworks and dryos cameras and this still generates the same stubs_entry.S file (have not tested all cameras though so there's a small chance this may break something).
autobuilds don't run with primary.bin, so that shouldn't a concern for  the moment. Running a batch build now.

edit:
Backing out. This doesn't find any matches for ixus75_sd750 101a using this dump http://www.zshare.net/download/89721005ad516519/ (http://www.zshare.net/download/89721005ad516519/)

Works fine with the old finsig. I haven't looked into why.

edit #2:
One thing I notice is this is a very short dump, which ends with some FFFFs
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / May / 2011, 01:31:00
Second go at the GetMemInfo patch - now that reyalp has added the signature for this function.

Enabled & tested for G12 & SX30 - note I have not tested this for any pre R39 dryos cameras (as I don't own one).
Is there a reason this fills in a global, rather than just having the caller pass a cam_meminfo * ?

Seems to work fine on D10, (dryos R31)

If we can check it on a couple of other cameras, I'd be tempted to just enable it for all dryos and not add another ifdef. The 100% matches indicate this has changed very little except the R39 transition.

I'd like to expose this in lua (useful for forcing garbage collection, debugging over ptp). For exmem enabled builds, it would be useful to have this for both the camera heap and whatever similar values are applicable in suba. Not saying you have to go and implement this, just thinking out loud.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / May / 2011, 04:53:32
Added, changeset 1168 (http://tools.assembla.com/chdk/changeset/1168)

On the G12 / SX30 this reduces the time to generate the stubs_entry.S file from 29 seconds to 14 seconds (on my dev PC).
About the same on mine, and 89 to 44 on my laptop(!). This should make full batch builds with sigs a little less painful.
Quote
Tested on a sampling of vxworks and dryos cameras and this still generates the same stubs_entry.S file (have not tested all cameras though so there's a small chance this may break something).
autobuilds don't run with primary.bin, so that shouldn't a concern for  the moment. Running a batch build now.

edit:
Backing out. This doesn't find any matches for ixus75_sd750 101a using this dump http://www.zshare.net/download/89721005ad516519/ (http://www.zshare.net/download/89721005ad516519/)

Works fine with the old finsig. I haven't looked into why.

edit #2:
One thing I notice is this is a very short dump, which ends with some FFFFs

Fixed, updated patch attached.
Getting different addresses for the S90 firmware 1.00c - patch removed.

Attached patch tested with all dryos and vxworks cameras in current trunk.
Works correctly except for:

  A570 1.01a
       - cannot find fimware dump

  A580 1.01b
       - SVN stubs_entry.S is missing GetMemInfo function (camera/version is not in trunk/Makefile batch builds)

  IXUS120_SD940 1.02c
       - found firmware dump but appears to be wrong (original finsig generates same entries as new one; but neither matches SVN).

  IXUS750_SD550 1.00h
       - SVN stubs_entry.S is missing Restart & add_ptp_handler functions (camera/version is not in trunk/Makefile batch builds).

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / May / 2011, 02:39:47
Added, changeset 1172 (http://tools.assembla.com/chdk/changeset/1172)

I did a full batch build and it seemed ok
Attached patch tested with all dryos and vxworks cameras in current trunk.
Works correctly except for:

  A570 1.01a
       - cannot find fimware dump
http://www.zshare.net/download/897597441c33b3aa/ (http://www.zshare.net/download/897597441c33b3aa/)

Quote
  IXUS120_SD940 1.02c
       - found firmware dump but appears to be wrong (original finsig generates same entries as new one; but neither matches SVN).
Here's the one I'm using  http://www.zshare.net/download/89759875db5af9f3/ (http://www.zshare.net/download/89759875db5af9f3/)

I updated the stubs for a580 and ixus750, new and old finsig gave the same results.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / May / 2011, 05:31:02
ACDSee Pro 4 does not like the previous 'DNG Exposure Bias' value change for the G12 and SX30 (Pro 3 still works apparently).

This patch changes the bias divisor to 1 which fixes the problem while still keeping the actual exposure bias at 0 for these cameras.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 06 / May / 2011, 18:38:58
Second go at the GetMemInfo patch - now that reyalp has added the signature for this function.

Enabled & tested for G12 & SX30 - note I have not tested this for any pre R39 dryos cameras (as I don't own one).
Is there a reason this fills in a global, rather than just having the caller pass a cam_meminfo * ?

Seems to work fine on D10, (dryos R31)

If we can check it on a couple of other cameras, I'd be tempted to just enable it for all dryos and not add another ifdef. The 100% matches indicate this has changed very little except the R39 transition.

I'd like to expose this in lua (useful for forcing garbage collection, debugging over ptp). For exmem enabled builds, it would be useful to have this for both the camera heap and whatever similar values are applicable in suba. Not saying you have to go and implement this, just thinking out loud.

New version attached for review.
- removed global variable, caller must pass pointer to cam_meminfo struct
- addded ExMem version (GetExMemInfo) and support code to suba.c (a couple of things still to do in here)
- implemented pre & post R39 code versions

I've left the CAM_FIRMWARE_MEMINFO define in for now, if you think this will work safely for all dryos cameras the checks for this can be changed to CAM_DRYOS instead.

Not sure about how to add lua support so I've left that for now.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 07 / May / 2011, 02:20:32
New version attached for review.
- removed global variable, caller must pass pointer to cam_meminfo struct
- addded ExMem version (GetExMemInfo) and support code to suba.c (a couple of things still to do in here)
- implemented pre & post R39 code versions
Added, changeset 1175 (http://tools.assembla.com/chdk/changeset/1175). Thanks for your patience with my various nitpicking. I'll take care of the lua part.

Enabled for D10 as well as G12 and SX30.
Quote
I've left the CAM_FIRMWARE_MEMINFO define in for now, if you think this will work safely for all dryos cameras the checks for this can be changed to CAM_DRYOS instead.
I'd like to get a few users of different cameras to report first.

Users:
Build with CAM_FIRMWARE_MEMINFO in your platform_camera.h, load chdk and look at the memory info dialog. If it shows a reasonable value (not exactly what CHDK would have shown before, but the same ballpark) and doesn't crash, then it's working.

ACDSee Pro 4 does not like the previous 'DNG Exposure Bias' value change for the G12 and SX30 (Pro 3 still works apparently).

This patch changes the bias divisor to 1 which fixes the problem while still keeping the actual exposure bias at 0 for these cameras.
Added, changeset 1176 (http://tools.assembla.com/chdk/changeset/1176)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 07 / May / 2011, 04:55:41

[/quote]
I'd like to get a few users of different cameras to report first.

Users:
Build with CAM_FIRMWARE_MEMINFO in your platform_camera.h, load chdk and look at the memory info dialog. If it shows a reasonable value (not exactly what CHDK would have shown before, but the same ballpark) and doesn't crash, then it's working.
[/quote]

Working without any problems on A590 101b.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 07 / May / 2011, 10:07:54
Patch for IXUS120-SD940 to set more reasonable default battery voltage levels for the battery percentage OSD display.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bdasmith on 07 / May / 2011, 11:47:20
with the CAM_FIRMWARE_MEMINFO, what should i be looking at to test it for the sx20?

i entered the define in Platform.h for the sx20 but don't know what to look for as to changes?
everything seems to be working properly though...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 07 / May / 2011, 16:34:25
i entered the define in Platform.h
This should go in platform/<your camera>/platform_camera.h (putting it in include/camera.h would also work, turning it on for any camera you build)
Quote
for the sx20 but don't know what to look for as to changes?
everything seems to be working properly though...
Just look at "miscellaneous stuff"->"show memory info". The "free memory" section should be similar to what you see without it enabled.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bdasmith on 07 / May / 2011, 17:01:21
Ah....okay....yes, the information is all the same with and without.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 07 / May / 2011, 17:37:37
Patch for IXUS120-SD940 to set more reasonable default battery voltage levels for the battery percentage OSD display.
Added, changeset 1177 (http://tools.assembla.com/chdk/changeset/1177)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fudgey on 08 / May / 2011, 06:31:57
Btw, the new dryos getmeminfo stuff reminds me of this old vxworks mempartfindmax osd/lua thing:
http://chdk.setepontos.com/index.php?topic=2831.msg29364#msg29364 (http://chdk.setepontos.com/index.php?topic=2831.msg29364#msg29364).

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 08 / May / 2011, 13:52:18
Btw, the new dryos getmeminfo stuff reminds me of this old vxworks mempartfindmax osd/lua thing:
http://chdk.setepontos.com/index.php?topic=2831.msg29364#msg29364 (http://chdk.setepontos.com/index.php?topic=2831.msg29364#msg29364).
Yes, thanks for the link, I had the patch but hadn't found the original thread. It's my plan to revisit that, so getmeminfo can return whatever equivalent information is available on vx and we can get rid of the silly malloc loop entirely.

I didn't remember that you had already found most of the mempart ids, that will make it a lot easier.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: hwntw on 11 / May / 2011, 11:09:45
I have posted this in other threads, but FYI:
Exmem works in G9, Ixus 95 & Ixus 960. All with 8meg allocated and CHDK running in exmem. I used the earlier test code by Philmoz for exmem testing and I was helped by Whim who provided the stubs for exmem_allocCacheable.

Stubs:
G9 .............. 100i  ===> NHSTUB(exmem_alloc, 0xFF86C680)
Ixus 95 ...... .100c  ===> NHSTUB(exmem_alloc, 0xFFC54EA0)
Ixus 960 ..... 100d  ===> NHSTUB(exmem_alloc, 0xFF86670C)

Best,

Colin
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 13 / May / 2011, 21:13:12
Patch that (hopefully) fixes the intermittent problem with the recent rbf_font changes.
See http://chdk.setepontos.com/index.php?topic=6365 (http://chdk.setepontos.com/index.php?topic=6365)

Appears to be related to mixing cached and uncached memory references when loading a font from the SD card. Passing the uncached font address to rbf_font_load seems to fix the problem.

Also cleaned up the comments in the code.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / May / 2011, 02:08:36
Patch that (hopefully) fixes the intermittent problem with the recent rbf_font changes.
See http://chdk.setepontos.com/index.php?topic=6365 (http://chdk.setepontos.com/index.php?topic=6365)

Appears to be related to mixing cached and uncached memory references when loading a font from the SD card. Passing the uncached font address to rbf_font_load seems to fix the problem.

Also cleaned up the comments in the code.

Phil.
Added, changeset 1186 (http://tools.assembla.com/chdk/changeset/1186).

edit to add:
I don't really like this shuffling stuff around with cached/uncached till it seems to work. Either we should implement proper cache management functions using cp15, or we should make wrappers for read/write that have a small uncached buffer and memcpy whatever they need to/from that.

This is a general point for the future, not saying you ought to go off and do either of those. Your contributions are appreciated :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / May / 2011, 06:28:25
Small patch to cleanup up some stub addresses and redundant stubs for G12 & SX30.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / May / 2011, 16:37:49
Small patch to cleanup up some stub addresses and redundant stubs for G12 & SX30.

Added, changeset 1188 (http://tools.assembla.com/chdk/changeset/1188), chdkde 666 (http://tools.assembla.com/chdkde/changeset/666) \m/
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 22 / May / 2011, 16:19:46
Patch file to add firmware version 100e support for the IXUS120-SD940.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 22 / May / 2011, 19:09:42
Patch file to add firmware version 100e support for the IXUS120-SD940.
Added, changeset 1189 (http://tools.assembla.com/chdk/changeset/1189).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / May / 2011, 21:27:26
Patch for edge_overlay.c.
- reduced size of edgebuf memory allocation by 20K (50K on G12).
- fixed bug when using 'Filter Edges' option (conf.edge_overlay_filter) that caused a vertical 'edge' stripe at the right edge
- renamed some variables to (hopefully) clearer names.
- cleaned up code to remove all but one "#if defined(CAM_USES_ASPECT_CORRECTION)" section - this one could probably also be removed; but I don't have a suitable camera to test with.
- added code to restore Canon OSD when edge overlay is cleared to clean up any remnants of the overlay and restore any Canon OSD bits that were overwritten.

Tested on G12 & SX30.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / May / 2011, 23:34:20
Patch file to add firmware version 100i support for the S95.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 28 / May / 2011, 18:29:43
Just a note that my main development machine has gone to the big data center in the sky. It may be a while before I get to any patches.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 28 / May / 2011, 18:41:26
Just a note that my main development machine has gone to the big data center in the sky. It may be a while before I get to any patches.

Ouch - happened to me back at Christmas time.  Bad news was the downtime.  Good news was I bought a machine 4x better for 80% of what I paid several years ago.

So I've never thought to ask before,  but is there a backup plan if you decide to do something else other than be the CHDK guru some day ?

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 28 / May / 2011, 19:02:14
So I've never thought to ask before,  but is there a backup plan if you decide to do something else other than be the CHDK guru some day ?
The source is available. Even if all the people with admin access to the official assembla project SVN disappear, you can always fork it. There's also CHDKDE which has several active participants.

Any backup plan would be up to the users, but if I decide to stop working on CHDK, I'd certainly let people know. Of course I could always be hit by a bus or something, in which case you are on your own ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / May / 2011, 00:30:46
G12 firmware 1.00f.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 29 / May / 2011, 07:24:23
Patch file to add firmware version 100i support for the S95.

G12 firmware 1.00f.

added in changeset 1192 (http://tools.assembla.com/chdk/changeset/1192/trunk)

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / May / 2011, 07:50:30
Patch file to add firmware version 100i support for the S95.

G12 firmware 1.00f.

added in changeset 1192 (http://tools.assembla.com/chdk/changeset/1192/trunk)

msl

Thanks; but the platform/g12/sub/100f directory in SVN is missing the files:
boot.c
Makefile
makefile.inc
stubs_auto.S
stubs_entry_2.S
stubs_min.S

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 29 / May / 2011, 10:12:01
platform/g12/sub/100f directory in SVN is missing the files:
boot.c
Makefile
makefile.inc
stubs_auto.S
stubs_entry_2.S
stubs_min.S

Phil.

Thx for info. This was my mistake - sorry. The files was only added in my local system and a control build was ok. So what changeset 1193 fix the problem - I hope  :)

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / June / 2011, 10:08:11
Patch for S95 (all versions) CAM_STARTUP_CRASH_FILE_OPEN_FIX per http://chdk.setepontos.com/index.php?topic=5641.msg67747#msg67747 (http://chdk.setepontos.com/index.php?topic=5641.msg67747#msg67747)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / June / 2011, 14:30:00
Patch file for Beta release of A495 - firmware 1.00d, 1.00e, 1.00f.

Original port of 1.00f by syahmixp.   Ported to 1.00e and 1.00d by waterwingz with help from philmoz, astrosalva and HankeyPoo.

CHDK-DE admins :  1.00f is slightly changed from your version - file capt_seq.c has a bug fix labelled fix 2011Jun01 and the stubs_entry_2.S file has been updated.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 05 / June / 2011, 04:02:16
Patch for S95 (all versions) CAM_STARTUP_CRASH_FILE_OPEN_FIX

added in changeset 1197 (http://tools.assembla.com/chdk/changeset/1197/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 05 / June / 2011, 05:13:28
Patch file for Beta release of A495 - firmware 1.00d, 1.00e, 1.00f.

added in changeset 1198 (http://tools.assembla.com/chdk/changeset/1198/trunk)

Thx waterwingz for the great job. I don't know, if a fi2 key (d4a) is available for the autobuild. Maybe we must commented out the a495 in makefile for the moment. We will see.  :)

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 05 / June / 2011, 05:24:32
Patch file for Beta release of A495 - firmware 1.00d, 1.00e, 1.00f.

added in changeset 1198 (http://tools.assembla.com/chdk/changeset/1198/trunk)

Thx waterwingz for the great job. I don't know, if a fi2 key (d4a) is available for the autobuild. Maybe we must commented out the a495 in makefile for the moment. We will see.  :)

msl

Changeset 1198 overwrites change to core/kbd.c from changeset 1196.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 05 / June / 2011, 05:44:45
Changeset 1198 overwrites change to core/kbd.c from changeset 1196.

Thx for info. Fixed in 1199.

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 05 / June / 2011, 05:56:37
SX30 firmware version 1.00n.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 05 / June / 2011, 06:40:57
SX30 firmware version 1.00n.

Thx phil, added in changeset 1200 (http://tools.assembla.com/chdk/changeset/1200/trunk).

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / June / 2011, 10:32:40
Changeset 1198 overwrites change to core/kbd.c from changeset 1196.
Thanks for catching that Phil.  It was certainly rude of me - my apology  to pixeldoc2000.

My procedure for submitting a patch is to get the code changes prepared and then grab the latest build directly from the svn server.  I fold in the changes,  make a patch file, jump over to the CHDK-Shell trunk directory and apply the changes to the latest build available there (same as what I got from the svn of coarse).  Then I make sure the result from the patching process still builds and if so,  I submit the patch file.

As most of what I have done has not affected any core files,  I neglected to merge a new line into kbd.c rather than simply replace it.  Won't make that mistake again.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / June / 2011, 18:03:08
This sounds complicated.

I suggest:
- do your work in an SVN working copy, Compile there as needed
- before creating the patch, do an svn update and resolve any conflicts (should be very rare), build and test.
- create the patch with tortoise "create patch" or svn diff.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / June / 2011, 18:51:56
This sounds complicated.

I suggest:
- do your work in an SVN working copy, Compile there as needed
- before creating the patch, do an svn update and resolve any conflicts (should be very rare), build and test.
- create the patch with tortoise "create patch" or svn diff.

Thanks - that would work too. But I can't figure out how to get CHDK-Shell to "recognize" the SVN trunk directory - it seems to like to play in its own trunk/trunkxxxx sandbox. Without CHDK-Shell, I would have to setup a build environment on each of the machines I use day to day ( three of them and counting...).  Not sure which is more work for the limited number of times I post a patch.





Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 07 / June / 2011, 04:41:35
SX130is firmware version 1.01d.

Plus some cleanup for 1.01c:
- changed aspect ratio stuff to X2 instead of 9/4 (http://chdk.setepontos.com/index.php?topic=6395.0 (http://chdk.setepontos.com/index.php?topic=6395.0))
- fixed some stubs and updated taskHook code (to remove string comparisons).
- forced EXMEM and loading CHDK in EXMEM in the makefile.inc (seems to work more reliably this way).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 08 / June / 2011, 03:51:31
SX130is firmware version 1.01d. Plus some cleanup for 1.01c

Thx for your work.

Added in changeset 1201 (http://tools.assembla.com/chdk/changeset/1201/trunk)

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 09 / June / 2011, 22:49:09
IXUS120-SD940 update to misc. stub_entry_2.S values based on philmoz new sigfinder and verified with testing or by comparing with other firmware versions to ensure a better match.

1.00e  MoveZoomLensWithPoint
1.01a  MoveZoomLensWithPoint
1.02c  GetFocusLensSubjectDistance
          GetImageFolder
          WriteSDCard
1.03b  -
1.03c  WriteSDCard

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 10 / June / 2011, 04:05:36
IXUS120-SD940 update to misc. stub_entry_2.S values

Thx waterwingz, added in changeset 1202 (http://tools.assembla.com/chdk/changeset/1202/trunk)

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 10 / June / 2011, 04:45:38
Patch for edge_overlay.c.

Thx Phil, added in changeset 1203 (http://tools.assembla.com/chdk/changeset/1203/trunk)

Sorry for the late reaction with this patch.

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / June / 2011, 18:34:53
Patch for 'propset4.h'
Updated values for PROPCASE_AV, PROPCASE_TV and PROPCASE_SV.
These property values are the ones that the firmware saves in the JPEG EXIF header and shows in the Canon OSD.
Note, the override values shown on screen and saved to the JPEG may be limited to the camera built in values if the CHDK overrides are outside the camera default range (e.g. shutter speed longer than 15 secs on G12 and SX30 gets shown and recorded as 15 secs in the JPEG).

Tested on G12 and SX30.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 11 / June / 2011, 03:47:08
Patch for 'propset4.h'

Thx, added in changeset 1204 (http://tools.assembla.com/chdk/changeset/1204/trunk)

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mrowl on 17 / June / 2011, 18:28:45
Hello Everyone,

I think this thread is appropriate for adding patches. I'm really a newbie but with the kind help of reyalp on the forum I could make A490 100f port work (see http://chdk.setepontos.com/index.php?topic=5051.msg67184#msg67184 (http://chdk.setepontos.com/index.php?topic=5051.msg67184#msg67184)). I'd like to see others using my work so I'd like to share the code. Unfortunately I've met with TortoiseSVN at first today so if my patch is not correct, please don't kill me. :-) Anyway, find it attached.

mrowl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 17 / June / 2011, 23:31:23
Hello Everyone,

I think this thread is appropriate for adding patches. I'm really a newbie but with the kind help of reyalp on the forum I could make A490 100f port work (see http://chdk.setepontos.com/index.php?topic=5051.msg67184#msg67184 (http://chdk.setepontos.com/index.php?topic=5051.msg67184#msg67184)). I'd like to see others using my work so I'd like to share the code. Unfortunately I've met with TortoiseSVN at first today so if my patch is not correct, please don't kill me. :-) Anyway, find it attached.

mrowl
Thanks, excellent work. Added in trunk changeset 1205 (http://tools.assembla.com/chdk/changeset/1205). Should appear on the autobuilds shortly.

edit: and chdkde changeset 686 (http://tools.assembla.com/chdkde/changeset/686)

Couple of minor things were missing:
- ZSTEP_TABLE_SIZE stuff from core/kbd.c (that ugly SOB needs to get moved into platform code one of these days...)  
I assumed this was 7, based on a495 and platform/a495/main/c fl_tbl
- platform/a490/Makefile
copied from d10, since they are all pretty much the same.

You should double check if there were any other changes in core/ that should have gone in. Shortcuts key settings in gui.c would is the other likely place that comes to mind.

Also, big thanks to msl for taking care of patches recently :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 18 / June / 2011, 16:28:06
IXUS120-SD940 : Patch file to correct vid_get_viewport_fb_d() address for all firmware versions.   Discovered after working through this stub address for several other cameras and matching that to the IXUS120-SD940 firmware.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 18 / June / 2011, 17:02:08
S95 Firmware 1.00i :  update to stubs_min.S file - corrected two addresses.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mrowl on 18 / June / 2011, 17:12:11
Quote from: reyalp
Couple of minor things were missing:
- ZSTEP_TABLE_SIZE stuff from core/kbd.c (that ugly SOB needs to get moved into platform code one of these days...) 
I assumed this was 7, based on a495 and platform/a495/main/c fl_tbl
- platform/a490/Makefile
copied from d10, since they are all pretty much the same.

You should double check if there were any other changes in core/ that should have gone in. Shortcuts key settings in gui.c would is the other likely place that comes to mind.
Thanks indeed. I forgot to take notes what files I have changed, sorry. ZSTEP_TABLE_SIZE is 7 apparently. I'll doublecheck all the files.

mrowl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 18 / June / 2011, 17:16:22
I'll doublecheck all the files.
If you have your stuff in a working copy already, you can just update and "check for modifications" in tortoise.

If your work is in regular files, not a working copy, you can just copy and past it on top of the working copy and then do the same.

edit:
Also, please check that the version in the autobuild actually works :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 18 / June / 2011, 17:20:25
IXUS120-SD940 : Patch file to correct vid_get_viewport_fb_d() address for all firmware versions.   Discovered after working through this stub address for several other cameras and matching that to the IXUS120-SD940 firmware.
Added, changeset 1207 (http://tools.assembla.com/chdk/changeset/1207)

S95 Firmware 1.00i :  update to stubs_min.S file - corrected two addresses.
Added, changeset 1208 (http://tools.assembla.com/chdk/changeset/1208)

edit:
and chdkde changeset 687 (http://tools.assembla.com/chdkde/changeset/687)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 18 / June / 2011, 18:16:58
@reyalp
@waterwingz
(from changeset 1208)
Quote
DEF(FlashParamsTable,0xFFC724C4)                      // @FFB0F34C
DEF(FlashParamsTable,0xFFC72B4)                               // @FFB0F34C

Isn't there a character missing in the bolded hex address ?

wim
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 18 / June / 2011, 18:23:43
@reyalp
@waterwingz
(from changeset 1208)
Quote
DEF(FlashParamsTable,0xFFC724C4)                      // @FFB0F34C
DEF(FlashParamsTable,0xFFC72B4)                               // @FFB0F34C

Isn't there a character missing in the bolded hex address ?

wim
Good catch, thanks. Looking for the correct one now.

edit:
I'm thinking this is 0xFFC724B4, checked in changeset 1209 (http://tools.assembla.com/chdk/changeset/1209) chdkde changeset 688 (http://tools.assembla.com/chdkde/changeset/688)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 18 / June / 2011, 18:56:00
Darn -  yes, it should have been 0xFFC724B4.  The address in the comment field is correct.

Something got lost moving from my laptop to home machine after a long road trip.  It was easier to retype one address than move between machines on a USB stick. My bad  :-[  Pebkac again.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 18 / June / 2011, 19:10:23
SX30 firmware version 1.00m.

There are no code changes between 1.00l and 1.00m in the firmware so this just updates the makefile to copy and rename the 1.00l firmware builds. I hope this is the correct way to do this.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 18 / June / 2011, 19:33:10
SX30 firmware version 1.00m.
Added, changeset 1210 (http://tools.assembla.com/chdk/changeset/1210)  chdkde changeset 689 (http://tools.assembla.com/chdkde/changeset/689)
Quote
I hope this is the correct way to do this.
Correct ? Probably not, but it's how we do it ;) You did have an extra -full in the batch-zip, which I took out.

At some point it would be nice to convert those monster blocks of copy/paste into a loop or something, with all the cameras/subs and beta status defined in one place. It seems like it could come from the directory tree, but you'd need a way of suppressing ones you didn't want in the autobuild.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 24 / June / 2011, 09:21:26
Beta release of IXUS200_SD980 firmware 1.01c

Original port for 1.00c by RaduP.  Port from there to 1.01c by philmoz & waterwingz.  Testing by simon96 and titbb.



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 24 / June / 2011, 21:33:19
G12 & SX30 minor patch
- stubs cleanup and address fixes.
- removed redundant entries from platform_camera.h
- changed CAM_BLACK_LEVEL in camera.h to a calculated value based on bits-per-pixel (CAM_BLACK_LEVEL and CAM_WHITE_LEVEL overrides can be removed from most platform_camera.h files)
- removed definition of O_RDONLY from generic/wrappers.c since stdlib.h is now included

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 25 / June / 2011, 03:14:45
Code cleanup in ubasic.c and script.c

Phil.

Edit: patch file removed. Updated patch in subsequent post.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 25 / June / 2011, 04:23:04
@philmoz

I took a look at your changes and I'd like to know why did you remove the refresh_physical_screen from stubs_min.S. Thanks.

EDIT: I see now that you're not using anywhere in code.  :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 25 / June / 2011, 04:31:47
@philmoz

I took a look at your changes and I'd like to know why did you remove the refresh_physical_screen from stubs_min.S. Thanks.

Do you mean 'enabled_refresh_physical_screen'?
It's not used on the G12 and SX30.
The screen refresh method that uses 'enabled_refresh_physical_screen' doesn't work on the G12.
I use ScreenLock and ScreenUnlock instead (see platform/g12/lib.c).
I found that the ScreenLock and ScreenUnlock also worked on the SX30 so I made them both the same.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 25 / June / 2011, 10:39:04
S95 firmware 1.00k release.

No negative feedback after 29 downloads of Beta version so I guess we are "good to go" with beta status.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / June / 2011, 19:46:34
Beta release of IXUS200_SD980 firmware 1.01c

Original port for 1.00c by RaduP.  Port from there to 1.01c by philmoz & waterwingz.  Testing by simon96 and titbb.
Added, chdk changeset 1212 (http://tools.assembla.com/chdk/log/trunk)
G12 & SX30 minor patch
- stubs cleanup and address fixes.
- removed redundant entries from platform_camera.h
- changed CAM_BLACK_LEVEL in camera.h to a calculated value based on bits-per-pixel (CAM_BLACK_LEVEL and CAM_WHITE_LEVEL overrides can be removed from most platform_camera.h files)
- removed definition of O_RDONLY from generic/wrappers.c since stdlib.h is now included
Added, chdk changeset 1213 (http://tools.assembla.com/chdk/changeset/1213)

S95 firmware 1.00k release.
Added, chdk changeset 1215 (http://tools.assembla.com/chdk/changeset/1215)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / June / 2011, 21:32:30
Code cleanup in ubasic.c and script.c
This looks like a nice memory saving (>1k in my build.)

How thoroughly has this been tested ? The short/int conversion concerns me slightly: for signed values the difference between casting and simply passing an int to a function that expects a short will be significant, even though they both use a full register. Most of the APEX96 values can legitimately be negative.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 25 / June / 2011, 21:57:37
Code cleanup in ubasic.c and script.c
This looks like a nice memory saving (>1k in my build.)

How thoroughly has this been tested ? The short/int conversion concerns me slightly: for signed values the difference between casting and simply passing an int to a function that expects a short will be significant, even though they both use a full register. Most of the APEX96 values can legitimately be negative.

Good point - I didn't test every function; but tested quite a few.
Let me retest the APEX96 stuff and make sure negative values work as expected.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / June / 2011, 22:12:20
If it is an issue, you can probably make the shooting* functions take and int and do any required casting there. The lua side probably won't need any adjustment if the prototypes match what the function actually expects.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 25 / June / 2011, 23:04:06
IXUS120-SD940 :  Updates to the stub_entry_2.S files for all firmware versions and stubs_min.S for 1.00e firmware.  Thanks to philmoz for the use of his new gensig2 software.

Also corrected modemap[] in shooting.c based on testing with actual camera.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / June / 2011, 23:44:38
IXUS120-SD940 :  Updates to the stub_entry_2.S files for all firmware versions and stubs_min.S for 1.00e firmware.  Thanks to philmoz for the use of his new gensig2 software.

Also corrected modemap[] in shooting.c based on testing with actual camera.
Added, chdk changeset 1216 (http://tools.assembla.com/chdk/changeset/1216)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / June / 2011, 00:04:51
If it is an issue, you can probably make the shooting* functions take and int and do any required casting there. The lua side probably won't need any adjustment if the prototypes match what the function actually expects.

Updated patch attached.
Added additional helper functions with correct signatures for the passed in function pointer.
Should avoid any casting / conversion issues.

Tested get_user_tv96 and set_user_tv96, and negative values handled correctly (both returned and as parameters).

Didn't want to change the shooting functions just yet - need to leave something to cleanup up for the next rainy winter weekend :)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 26 / June / 2011, 13:52:01
A495 firmware 1.00d, 1.00e, 1.00f

Updates to stubs_entry_2.S & stub_min.S for all versions.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / June / 2011, 18:34:21
IXUS200_SD980 fw 1.01C : fix for shooting_get_drive_mode() to allow bracketing with auto timer
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / June / 2011, 18:36:41
Trivial but overdue small cleanup for core/kbd.c.  (been meaning to submit this for a while)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 27 / June / 2011, 23:37:10
IXUS200_SD980 fw 1.01C : fix for shooting_get_drive_mode() to allow bracketing with auto timer
added, chdk changeset 1217 (http://tools.assembla.com/chdk/changeset/1217)

Not that this also made the same change for a495. I'm guessing that needs it as well, so I've left it in.

A495 firmware 1.00d, 1.00e, 1.00f

Updates to stubs_entry_2.S & stub_min.S for all versions.
added, chdk changeset 1218 (http://tools.assembla.com/chdk/changeset/1218)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / June / 2011, 23:49:05
Note that this also made the same change for a495. I'm guessing that needs it as well, so I've left it in.
Thanks - it seemed like a low risk guess given that the A480 has the same change.  And sorry to say, its not like anyone has actually reported playing with that yet.  If we get a complaint,  we can change it back.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / July / 2011, 05:21:02
G12 modemap patch:
- added additional video modes to platform/g12/shooting.c
- added video miniature mode definition to include/modelist.h
- convert MODE_IS_VIDEO monster macro to a function (include/platform.h & platform/generic/shooting.c).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 03 / July / 2011, 17:53:17
Hi.

I'd like to ask if it's possible to add the SX220 HS port to the trunk. I had quite a lot of test downloads and nobody complains too much about it. There are still some very small issues to fix that can be done later.

I have some additional questions:
- the sx220 port needs to be compiled with exmem_malloc and chdk_in_exmem. Can this be a problem?
- do I need to add the localbuildconf.inc file?
- do I need to add the BETA extension next to the camera name?

Thanks.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / July / 2011, 18:03:47
I have some additional questions:
- the sx220 port needs to be compiled with exmem_malloc and chdk_in_exmem. Can this be a problem?
- do I need to add the localbuildconf.inc file?
This will have to be done as a special case for the camera. I'd guess you could put it in the platform/sx220/sub/<version>/makefile.inc

The CHDKDE sx130 has
Code: [Select]
override OPT_EXMEM_MALLOC=1
override OPT_CHDK_IN_EXMEM=1
I guess this works...

You should not include a localbuildconf or modified buildconf.inc
Quote
- do I need to add the BETA extension next to the camera name?
If you add the batch build commands, that would be appreciated.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / July / 2011, 18:41:23

The CHDKDE sx130 has
Code: [Select]
override OPT_EXMEM_MALLOC=1
override OPT_CHDK_IN_EXMEM=1
I guess this works...


CHDK should have this as well, not just CHDKDE - I set it to force CHDK into EXMEM for the SX130 because of reported issues and memory limitations trying to work in low memory.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 04 / July / 2011, 03:28:30
I made a patch using TortoiseSVN. I think it should be ok. I needed to add some sx220 code to generic, core, and include files. Can somebody check if everything is ok? If something can be done differently I can modify it if needed. Thanks.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / July / 2011, 04:20:01
Enable JPEG quality override for A495. Also updated comment for this option in camera.h

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / July / 2011, 18:00:59
Updated patch attached.
Added additional helper functions with correct signatures for the passed in function pointer.
Should avoid any casting / conversion issues.

Tested get_user_tv96 and set_user_tv96, and negative values handled correctly (both returned and as parameters).
Added, changeset 1221 (http://tools.assembla.com/chdk/changeset/1221)
Trivial but overdue small cleanup for core/kbd.c.  (been meaning to submit this for a while)
Added (a while ago, forum was down) changeset 1219 (http://tools.assembla.com/chdk/changeset/1219)

edit:
G12 modemap patch:
- added additional video modes to platform/g12/shooting.c
- added video miniature mode definition to include/modelist.h
- convert MODE_IS_VIDEO monster macro to a function (include/platform.h & platform/generic/shooting.c).
Added, changeset 1222 (http://tools.assembla.com/chdk/changeset/1222)

edit:
Enable JPEG quality override for A495. Also updated comment for this option in camera.h
Added, changeset 1223 (http://tools.assembla.com/chdk/changeset/1223)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / July / 2011, 20:26:55
Trivial but overdue small cleanup for core/kbd.c.  (been meaning to submit this for a while)
Added (a while ago, forum was down) changeset 1219 (http://tools.assembla.com/chdk/changeset/1219)

Is this another one that really should be in camera.h & platform_camera.h ?

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / July / 2011, 20:47:44
Trivial but overdue small cleanup for core/kbd.c.  (been meaning to submit this for a while)
Added (a while ago, forum was down) changeset 1219 (http://tools.assembla.com/chdk/changeset/1219)
Is this another one that really should be in camera.h & platform_camera.h ?
Yes, something like that. See http://chdk.setepontos.com/index.php?topic=6528.0 (http://chdk.setepontos.com/index.php?topic=6528.0)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / July / 2011, 22:09:59
I made a patch using TortoiseSVN. I think it should be ok. I needed to add some sx220 code to generic, core, and include files. Can somebody check if everything is ok? If something can be done differently I can modify it if needed. Thanks.
Thanks.
Unfortunately, it appears that this patch is not made against the CHDK SVN repository. For an SVN patch to be useful, it must be from the same repository it is to be applied to. That means you take your source, put it in a working copy from https://tools.assembla.com/svn/chdk/trunk svn add the new files, and then make a patch. If you are copying whole files that started from an older version, you need to make sure you don't undo later changes in the trunk.

In the makefile, the _BETA files should be made with a move, not copy. Copy is for a firmware where two canon firmware versions use the same CHDK build. Follow the existing examples.

the comment on the modemap in shooting.c refers to the SX210 specs page. I can't tell if the rest was updated, or just copy/pasted. Please make sure that the list of modes in the comment, and the actual mode values are correct for your camera, and please do not copy/paste comments that do not apply to your camera.

I'm not going to add a bunch of platform specific ifdefs to the games. If you want to go through and make the games use the palette defines, I'm OK with that (this could be done as a separate patch later.) They can also have the wrong colors, I'm OK with that too, even if it makes them unplayable. I'm sure they already are on many cameras.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 05 / July / 2011, 05:15:32
No problem. I think I fixed it now. So, I removed the changes in the games and fixed the Makefile, I hope. I also removed AFScan from the port to keep the gui.c in the original state. I also removed the useless comment in sx220hs/shooting.c (the mode list is not copy/pasted), I also added some new modes to modelist.h.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 05 / July / 2011, 05:22:45
Minor patch - modemap update for SX30.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 07 / July / 2011, 08:43:50
Beta version for A1100 firmware 1.00c.

Converted from CHDKDE version.
Fixed stub addresses, updated values in platform_camera.h etc.
Tested by blackhole (http://chdk.setepontos.com/index.php?topic=4727.msg69830#msg69830 (http://chdk.setepontos.com/index.php?topic=4727.msg69830#msg69830)).

Note: manual booting (via firmware update) is not working, although I think I have the correct FI2 values. I don't have this camera to do more in depth testing of this feature.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / July / 2011, 18:16:37
Minor patch - modemap update for SX30.
Added, changeset 1227 (http://tools.assembla.com/chdk/changeset/1227)

Note, if the new generation finsig could find the canon modelist, that would be handy :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / July / 2011, 19:10:14
Minor patch - modemap update for SX30.
Added, changeset 1227 (http://tools.assembla.com/chdk/changeset/1227)

Note, if the new generation finsig could find the canon modelist, that would be handy :)

Thanks, any pointers on how to find the modelist. I took a look; but haven't found anything so far.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / July / 2011, 19:21:36
Minor patch - modemap update for SX30.
Added, changeset 1227 (http://tools.assembla.com/chdk/changeset/1227)

Note, if the new generation finsig could find the canon modelist, that would be handy :)

Thanks, any pointers on how to find the modelist. I took a look; but haven't found anything so far.
I find it starting with "AC:PTM_Init" and several layers of function calls. You can see this easily by going to one of the known table addresses (commented in many cameras modemaps), finding the function that references it and working backwards. Might be hard to automate unless you can match one of the deeper calls.

You might be able to find or sanity check it by looking for common mode values together as 16 bit ints.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / July / 2011, 20:32:50
Minor patch - modemap update for SX30.
Added, changeset 1227 (http://tools.assembla.com/chdk/changeset/1227)

Note, if the new generation finsig could find the canon modelist, that would be handy :)

Thanks, any pointers on how to find the modelist. I took a look; but haven't found anything so far.
I find it starting with "AC:PTM_Init" and several layers of function calls. You can see this easily by going to one of the known table addresses (commented in many cameras modemaps), finding the function that references it and working backwards. Might be hard to automate unless you can match one of the deeper calls.

You might be able to find or sanity check it by looking for common mode values together as 16 bit ints.

Thanks, I may be able to find that table ok; but do the mode numbers always mean the same thing for all cameras?
I thought they changed between cameras which is why the modemap table is needed (I read another thread which seemed to imply they were different)?

There's some values in the tables for G12 and SX30 - 8240 & 8241. Can't seem to find what these modes are for - they don't seem to be defined in any camera modemap table in CHDK. Have you come across these before?

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / July / 2011, 20:44:49
Thanks, I may be able to find that table ok; but do the mode numbers always mean the same thing for all cameras?
For recent cameras (everything but some very early vxworks ones like s2is) the number for common modes like P, M, Tv etc seem to be the same. Note that the "manual" mode of cameras without a true manual use the "P" mode number. I'm not sure if all the scene / special modes are the same, or whether the values get re-used for different things on different cameras.
Quote
I thought they changed between cameras which is why the modemap table is needed (I read another thread which seemed to imply they were different)?
Aside from the old cameras mentioned above, the modemap predates the discovery of the table. The table is useful for verifying that all the canon modes are accounted for.
Quote
There's some values in the tables for G12 and SX30 - 8240 & 8241. Can't seem to find what these modes are for - they don't seem to be defined in any camera modemap table in CHDK. Have you come across these before?
I think these correspond to C1 and C2, but these values aren't returned by the propcase we use for shooting mode. They are available in a different propcase if used.

Thread that covers most of this is http://chdk.setepontos.com/index.php?topic=3228.0 (http://chdk.setepontos.com/index.php?topic=3228.0)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / July / 2011, 21:23:31
Modemap update for G12 & SX30 (thx reyalp for the pointers to the firmware table).
- Added new modes for 'wink self timer' and 'face self timer'.
- Updated comments
- table order matches firmware (cosmetic change so I can compare them).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / July / 2011, 21:58:14
Patch to reduce size of compiled CHDK - saves approx 8.6K (on G12 & SX30).

- changed some struct values from int to short (conf.c, gui_menu.h, platform.h)
- gui code cleanup plus some helper functions in gui_draw
- changed palette display under Miscellaneous stuff menu to use the same UI as the color picker in Visual settings (better and consistent UI, plus removes a chunk of code)
- packed version of font_8x16_uni.h default font, plus new tool to create packed version (this is done during the build so if changes are need to the font they can be done in font_8x16_uni.h).
- Change 'strings' pointer table in lang.c to an offset table (halves table size).
- Changes lang.c to use one buffer for the strings instead of allocating a new buffer for each string,

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / July / 2011, 00:56:20
No problem. I think I fixed it now.
Thanks. Added in changeset 1230 (http://tools.assembla.com/chdk/changeset/1230)

Note that the autobuilds will not include FI2 files until I get the autobuild server admin to install the keys.

I noticed in generic/shooting.c _MoveIrisWithAv is used both in the same ifdef as SX30 and G12 in shooting_av_bracketing as well as in shooting_set_av96_direct with an ifdef just for sx220hs

This looks like it will get called 2x in the bracketing case. I'm wondering if all the cameras couldn't just do it in the shooting_set_av96_direct ? Or is this really only needed for bracketing (not script overrides) on the SX30 and G12 ?

Quote
I also removed AFScan from the port to keep the gui.c in the original state.
Some platform specific ifdefs are OK where they are really needed. I just don't want to add a bunch for cosmetic stuff like the games. Feel free to post patches against the trunk for any adjustments that are needed.

Regarding the modemap, I'd rather have new enum values for anything that doesn't correspond directly to an existing ones. Also, mode_is_video should be updated for any new video mode values.

Modemap update for G12 & SX30 (thx reyalp for the pointers to the firmware table).
- Added new modes for 'wink self timer' and 'face self timer'.
- Updated comments
- table order matches firmware (cosmetic change so I can compare them).
Added, changeset 1231 (http://tools.assembla.com/chdk/changeset/1231)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / July / 2011, 05:03:56
Note, if the new generation finsig could find the canon modelist, that would be handy :)

Added validation of the contents of 'modemap' from shooting.c in the latest version (http://chdk.setepontos.com/index.php?topic=6560.0 (http://chdk.setepontos.com/index.php?topic=6560.0)).

I checked across all the current modemap tables and it looks like the mode name / numbers aren't consistent - the same number can be used for different modes on different cameras.

The new code looks for modes in the firmware that aren't in the 'modemap' table, and for entries from 'modemap' that aren't in the firmware mode list. You'll still need to work out the mode names manually on each camera; but this should help identify gaps / errors in the current ports.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 10 / July / 2011, 06:02:50
Hi phil,

Re: #359, space_optimization.patch

Works great on ixus570_sd880 (100a) and S95 (100h); tested with r1232 / GCC 451
DISKBOOT.BIN size reduction for both cams ~ 8.1 kB.

thanks,

wim

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / July / 2011, 06:39:02
Hi phil,

Re: #359, space_optimization.patch

Works great on ixus570_sd880 (100a) and S95 (100h); tested with r1232 / GCC 451
DISKBOOT.BIN size reduction for both cams ~ 8.1 kB.

thanks,

wim



Thanks wim,

You might want to also look at my new stubs/address finder (http://chdk.setepontos.com/index.php?topic=6560.0 (http://chdk.setepontos.com/index.php?topic=6560.0)).
I noticed the latest version identifies a few problems with the modemap table (shooting.c) for the S95.
It also finds the addresses for strrchr, rand and srand so you could remove the S95 custom versions of these.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / July / 2011, 17:33:15
Beta version for A1100 firmware 1.00c.

Converted from CHDKDE version.
Fixed stub addresses, updated values in platform_camera.h etc.
Tested by blackhole (http://chdk.setepontos.com/index.php?topic=4727.msg69830#msg69830 (http://chdk.setepontos.com/index.php?topic=4727.msg69830#msg69830)).

Note: manual booting (via firmware update) is not working, although I think I have the correct FI2 values. I don't have this camera to do more in depth testing of this feature.
Added changeset 1233 (http://tools.assembla.com/chdk/changeset/1233). I've disabled FI2 generation in makefile.inc, so that people who download the autobuild won't get a non-working FI2.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / July / 2011, 18:09:08
Hi phil,

Re: #359, space_optimization.patch

Works great on ixus570_sd880 (100a) and S95 (100h); tested with r1232 / GCC 451
DISKBOOT.BIN size reduction for both cams ~ 8.1 kB.
Have either of you tested this with non-default languages ?

Regarding the patch:
1) As I've mentioned before, I'd rather have the pieces in separate patches. I know it's all reducing memory usage, but the lang, conf and miscellaneous gui drawing changes seem like are distinct, independent changes. Multiple, simpler patches lets me apply the ones I think are obviously safe, while taking more time on anything I have questions about.

2) It looks to me like all the lang strings are accessed from uncached memory. This doesn't seem like a good thing -- I guess it was this way before though.

3) It looks like there some unrelated changes snuck in: Palette for a1100 in gui_draw.h, removing defined (CAMERA_sx30) from an ifdef in gui.c.

In fact I don't understand what's going on with the bitmap palette, a1100 camera.h uses 2, while sx220hs already defined 9 (differently from a1100)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / July / 2011, 18:31:54

Hi phil,

Re: #359, space_optimization.patch

Works great on ixus570_sd880 (100a) and S95 (100h); tested with r1232 / GCC 451
DISKBOOT.BIN size reduction for both cams ~ 8.1 kB.
Have either of you tested this with non-default languages ?

Regarding the patch:
1) As I've mentioned before, I'd rather have the pieces in separate patches. I know it's all reducing memory usage, but the lang, conf and miscellaneous gui drawing changes seem like are distinct, independent changes. Multiple, simpler patches lets me apply the ones I think are obviously safe, while taking more time on anything I have questions about.

2) It looks to me like all the lang strings are accessed from uncached memory. This doesn't seem like a good thing -- I guess it was this way before though.

3) It looks like there some unrelated changes snuck in: Palette for a1100 in gui_draw.h, removing defined (CAMERA_sx30) from an ifdef in gui.c.

In fact I don't understand what's going on with the bitmap palette, a1100 camera.h uses 2, while sx220hs already defined 9 (differently from a1100)



Hi reyalp, I'll split it up into smaller pieces tonight and re-post. Some of the changes are dependent on the new functions in gui_draw.c & gui_draw.h and I didn't want to create a broken patch by missing something.

The changes should not affect non-default languages; but I did test by switching to other languages and doing comparisons of some of the menu display before and after. I did not see any issues.

The uncached memory was what the language code was using so I didn't change it.

The palette numbering was a mistake - I'm working on the A1100 which initially used palette 2; but in fact needs a new one. I changed it to 9 and was waiting till the A1100 beta got added to the build before posting a patch; but the sx220 got in first :) This should not have been included in the patch.

The change to gui.c was to remove an un-necessary check for CAMERA_s30 - I thought I'd already done this in a previous patch, sorry.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 10 / July / 2011, 18:35:33
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / July / 2011, 18:50:46
Hi reyalp, I'll split it up into smaller pieces tonight and re-post. Some of the changes are dependent on the new functions in gui_draw.c & gui_draw.h and I didn't want to create a broken patch by missing something.
No need, I think I can apply this one as is with your clarifications below. More of a reminder for a the future. I understand SVN doesn't make this particularly easy...

My problem is that I feel like I'm barely keeping up with the patches and still not really giving them an adequate level of code review and testing. Anything that can streamline the process is appreciated.

Quote
The uncached memory was what the language code was using so I didn't change it.
Fair enough :)

Quote
The palette numbering was a mistake - I'm working on the A1100 which initially used palette 2; but in fact needs a new one. I changed it to 9 and was waiting till the A1100 beta got added to the build before posting a patch; but the sx220 got in first :) This should not have been included in the patch.

The change to gui.c was to remove an un-necessary check for CAMERA_s30 - I thought I'd already done this in a previous patch, sorry.
Thanks for clearing that up.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / July / 2011, 18:58:26

I understand SVN doesn't make this particularly easy...


Time to switch to Mercurial  :D
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / July / 2011, 22:34:43
I've added the memory saving patch in changeset 1234 (http://tools.assembla.com/chdk/changeset/1234)

There's a couple things I'm not entirely happy with:
In gui_menu.h, making title a short means you can't stuff an actual string in there, you have to use a lang string. I think this is OK with the current code, but in other places it's assumed you can interchangeably use a string or lang id. Given that this is only for top level menu tiles, I'm not sure the saving is worth the confusion. Doing this for menu items would be a much bigger saving, but the string problem is bigger there (we actually use strings in a few places).

In gui_draw.c, the globals for xMin getting initialized as a side effect of draw_rectangle makes me cringe.

I understand SVN doesn't make this particularly easy...
Time to switch to Mercurial  :D
A topic for a different thread (this one, to be specific: http://chdk.setepontos.com/index.php?topic=2304.0 (http://chdk.setepontos.com/index.php?topic=2304.0) ), but I'm open to switching to a DVCS. It really would be a better fit for the CHDK development model, but there are issues...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / July / 2011, 23:02:50
Thanks again,

In gui_menu.h, making title a short means you can't stuff an actual string in there, you have to use a lang string. I think this is OK with the current code, but in other places it's assumed you can interchangeably use a string or lang id. Given that this is only for top level menu tiles, I'm not sure the saving is worth the confusion. Doing this for menu items would be a much bigger saving, but the string problem is bigger there (we actually use strings in a few places).

Probably right - I tried changing both but ran into the issue with the strings being stored instead of the lang id (now this really makes me cringe). Didn't see any cases of this being done at the menu level so I left that one in. Was going to fix menuitem as well (using special lang id codes for the string cases); but need more time to analyse the code.

Quote
In gui_draw.c, the globals for xMin getting initialized as a side effect of draw_rectangle makes me cringe.

Should have made these variables static so they are at least local to gui_draw.c. Not perhaps the most elegant code; but it does help keep the size down :)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / July / 2011, 23:26:40
Probably right - I tried changing both but ran into the issue with the strings being stored instead of the lang id (now this really makes me cringe). Didn't see any cases of this being done at the menu level so I left that one in. Was going to fix menuitem as well (using special lang id codes for the string cases); but need more time to analyse the code.
If you can't just stuff a string in there, I'm not sure what a special ID will gain you. It's quite convenient to be able to just throw in a string for development, rather than going through the whole lang system.
Quote
Should have made these variables static so they are at least local to gui_draw.c. Not perhaps the most elegant code; but it does help keep the size down :)
They are static, it just assumes draw_rectangle will be called before the other functions.

Freeing up memory is good, but there's a limit how much readability/maintainability I'm willing to sacrifice. I'd really rather go in the other direction...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / July / 2011, 23:38:01
Probably right - I tried changing both but ran into the issue with the strings being stored instead of the lang id (now this really makes me cringe). Didn't see any cases of this being done at the menu level so I left that one in. Was going to fix menuitem as well (using special lang id codes for the string cases); but need more time to analyse the code.
If you can't just stuff a string in there, I'm not sure what a special ID will gain you. It's quite convenient to be able to just throw in a string for development, rather than going through the whole lang system.

Good point - hadn't considered that aspect. Probably best to leave this as is then (for consistency I'd probably change the menu struct back to what it was?).

Quote
Quote
Should have made these variables static so they are at least local to gui_draw.c. Not perhaps the most elegant code; but it does help keep the size down :)
They are static, it just assumes draw_rectangle will be called before the other functions.

Freeing up memory is good, but there's a limit how much readability/maintainability I'm willing to sacrifice. I'd really rather go in the other direction...

I'll add some comments to the source (it's only the fill rectangle routine that needs draw_rectangle called first) :)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / July / 2011, 00:32:16

Have either of you tested this with non-default languages ?


Can you roll back the change to lib/lang/lang.c - the new version I posted doesn't work with the language files that don't contain translations for all of the strings.

Back to the drawing board  :(

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / July / 2011, 00:40:18

Have either of you tested this with non-default languages ?


Can you roll back the change to lib/lang/lang.c - the new version I posted doesn't work with the language files that don't contain translations for all of the strings.

Back to the drawing board  :(
Done, changeset  1236 (http://tools.assembla.com/chdk/changeset/1236)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 11 / July / 2011, 03:22:15
Following a report by maverick here (http://chdk.setepontos.com/index.php?topic=5641.msg70096#msg70096) and the following posts (#913 - 918) here is the requested patch.
This essentially resets CAM_JPEG_WIDTH, CAM_JPEG_HEIGHT, and the 4 CAM_ACTIVE_AREA
camera properties for S95 to the values used for S90 and G11, which use the same sensor.

According to maverick, this allows S95 generated DNGs to be opened in Photoshop CS5.

Note that I have no idea why this would be, this was just a lucky guess  :D

Patch generated by diffing modified trunk1236 with trunk1236

wim

[edit: This does not appear to improve DNGs in RawTherapee for me, see attached
"s95_cam_active_area_readme.txt" for  links to 2 DNGs for comparison]




Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / July / 2011, 08:25:40
Patch to update palette for A1100.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 11 / July / 2011, 08:33:24

I noticed in generic/shooting.c _MoveIrisWithAv is used both in the same ifdef as SX30 and G12 in shooting_av_bracketing as well as in shooting_set_av96_direct with an ifdef just for sx220hs

This looks like it will get called 2x in the bracketing case. I'm wondering if all the cameras couldn't just do it in the shooting_set_av96_direct ? Or is this really only needed for bracketing (not script overrides) on the SX30 and G12 ?

I contacted philmoz and he suggested to make a new define in camera.h. He tested the fix for both sx30 and g12.

I made some additional changes for sx220:
-added the adjustable ALT button code in core/gui.c and camera/kbd.c
-fixed and added two new modes in camera/shooting.c modelist
-added CAM_KEY_CLICK_DELAY 150 to platform_camera.h like the sx30 to fix the button clicks in ptp



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / July / 2011, 18:21:39
Back from vacation and trying to build the latest versions for some of the cameras I'm keeping an eye on.  

Getting this with the ones I have tried so far :

Code: [Select]
========== C:\CHDK\TRUNK\TRUNK1236\BIN\LOGS\ERR-IXUS120_SD940-103C.TXT ==========

C:\CHDK\gcc4\bin\gmake.exe[2]: *** No rule to make target `../../tools/font_8x16_pack.exe', needed by `font_8x16_uni_packed.h'.  Stop.
C:\CHDK\gcc4\bin\gmake.exe[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1

Straight download of trunk 1236 via CHDK-Shell-v332.

UPDATE :  same result with gcc3 or gcc4


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / July / 2011, 18:44:54
Back from vacation and trying to build the latest versions for some of the cameras I'm keeping an eye on.  

Getting this with the ones I have tried so far :

Code: [Select]
========== C:\CHDK\TRUNK\TRUNK1236\BIN\LOGS\ERR-IXUS120_SD940-103C.TXT ==========

C:\CHDK\gcc4\bin\gmake.exe[2]: *** No rule to make target `../../tools/font_8x16_pack.exe', needed by `font_8x16_uni_packed.h'.  Stop.
C:\CHDK\gcc4\bin\gmake.exe[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1

Straight download of trunk 1236 via CHDK-Shell-v332.


Check the Makefile in the tools directory - it should have the entries to build this tool.
The correct Makefile is in SVN so I'm not sure why CHDK-Shell isn't picking it up.

Phil.

Edit: Just tried CHDK-Shell v332 and trunk 1236 and it worked fine (tried G12 1.00c and Ixus120 1.03c).

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / July / 2011, 19:03:05
Back from vacation and trying to build the latest versions for some of the cameras I'm keeping an eye on.   

Getting this with the ones I have tried so far :

Code: [Select]
========== C:\CHDK\TRUNK\TRUNK1236\BIN\LOGS\ERR-IXUS120_SD940-103C.TXT ==========

C:\CHDK\gcc4\bin\gmake.exe[2]: *** No rule to make target `../../tools/font_8x16_pack.exe', needed by `font_8x16_uni_packed.h'.  Stop.
C:\CHDK\gcc4\bin\gmake.exe[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1

Straight download of trunk 1236 via CHDK-Shell-v332.


Check the Makefile in the tools directory - it should have the entries to build this tool.
The correct Makefile is in SVN so I'm not sure why CHDK-Shell isn't picking it up.

Phil.

Forgot to mention that I loaded your latest sig finder, if that matters.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / July / 2011, 19:08:00
Back from vacation and trying to build the latest versions for some of the cameras I'm keeping an eye on.  

Getting this with the ones I have tried so far :

Code: [Select]
========== C:\CHDK\TRUNK\TRUNK1236\BIN\LOGS\ERR-IXUS120_SD940-103C.TXT ==========

C:\CHDK\gcc4\bin\gmake.exe[2]: *** No rule to make target `../../tools/font_8x16_pack.exe', needed by `font_8x16_uni_packed.h'.  Stop.
C:\CHDK\gcc4\bin\gmake.exe[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1

Straight download of trunk 1236 via CHDK-Shell-v332.


Check the Makefile in the tools directory - it should have the entries to build this tool.
The correct Makefile is in SVN so I'm not sure why CHDK-Shell isn't picking it up.

Phil.

Forgot to mention that I loaded your latest sig finder, if that matters.




Ah that explains it - that would have replaced the tools/Makefile with one that doesn't have the new font_8x16_pack.exe stuff. You'll need to update the tools/Makefile to also include the rules for font_8x16_pack.exe.
(I'll update the NewSigZip.zip file with the correct Makefile tonight).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 12 / July / 2011, 08:55:23
Compiler throws a funny warning now  :D . Philmoz is a time traveler! Why would the compiler even check the time? Like everybody lives in the same time zone.
Code: [Select]
gmake.exe[1]: *** Warning: File `Makefile' has modification time in the future (1310489588 > 1310474842)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 12 / July / 2011, 10:02:04
Compiler throws a funny warning now  :D . Philmoz is a time traveler! Why would the compiler even check the time? Like everybody lives in the same time zone.
Code: [Select]
gmake.exe[1]: *** Warning: File `Makefile' has modification time in the future (1310489588 > 1310474842)
This happens after every update if you grab the update as soon as it comes out and live in time zones west of GMT.   Fixes itself in 24 hours and can safely be ignored.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 14 / July / 2011, 07:08:15
Following a report by maverick here (http://chdk.setepontos.com/index.php?topic=5641.msg70096#msg70096) and the following posts (#913 - 918) here is the requested patch.
This essentially resets CAM_JPEG_WIDTH, CAM_JPEG_HEIGHT, and the 4 CAM_ACTIVE_AREA
camera properties for S95 to the values used for S90 and G11, which use the same sensor.

According to maverick, this allows S95 generated DNGs to be opened in Photoshop CS5.

Note that I have no idea why this would be, this was just a lucky guess  :D

Patch generated by diffing modified trunk1236 with trunk1236
Patch to update palette for A1100.
I contacted philmoz and he suggested to make a new define in camera.h. He tested the fix for both sx30 and g12.

I made some additional changes for sx220:
-added the adjustable ALT button code in core/gui.c and camera/kbd.c
-fixed and added two new modes in camera/shooting.c modelist
-added CAM_KEY_CLICK_DELAY 150 to platform_camera.h like the sx30 to fix the button clicks in ptp

Added in changeset 1237 (http://tools.assembla.com/chdk/changeset/1237/trunk)

Thx goes to the contributors.

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / July / 2011, 05:24:18
Fix for a bug introduced with my recent space optimisation changes.
Fixes problem with mode conversion from Canon mode numbers to CHDK mode numbers not working correctly.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 15 / July / 2011, 05:43:33
Fix for a bug introduced with my recent space optimisation changes.

Thx, added in changset 1238 (http://tools.assembla.com/chdk/changeset/1238/trunk)

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / July / 2011, 20:00:30
SX130is firmware version 1.01f

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 17 / July / 2011, 03:38:11
SX130is firmware version 1.01f

Thx phil, added in changeset 1239 (http://tools.assembla.com/chdk/changeset/1239/trunk)

msl

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 17 / July / 2011, 19:13:12
Hi!

Attached a diff (against trunk rev. 1239) for the A410, contains the following:
- USB power sensing corrected (USB remote should work, tested with remote.bas)
(I threw away most of /platform/a410/kbd.c, used "#ifdef"s in /platform/generic/kbd.c instead)
- modemap filled with correct values
- changes noted to /platform/a410/notes.txt

(GNU patch chokes on notes.txt because of the line endings, but other tools may work correctly)

This is actually a re-post, from here:http://chdk.setepontos.com/index.php?topic=2597.msg70165#msg70165 (http://chdk.setepontos.com/index.php?topic=2597.msg70165#msg70165).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 18 / July / 2011, 04:11:06
Attached a diff (against trunk rev. 1239) for the A410, contains the following:
- USB power sensing corrected (USB remote should work, tested with remote.bas)
(I threw away most of /platform/a410/kbd.c, used "#ifdef"s in /platform/generic/kbd.c instead)
- modemap filled with correct values
- changes noted to /platform/a410/notes.txt

Thx, added in changeset 1240 (http://tools.assembla.com/chdk/changeset/1240/trunk).

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 18 / July / 2011, 06:24:47
Cleanup of 'capt_seq.c' for G12 (all firmware versions).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 18 / July / 2011, 06:32:37
Change to lib/lang/lang.c to use malloc/free instead of umalloc/ufree to store the language strings.

The umalloc function incurs an extra 64 bytes overhead per block allocated (thx reyalp) - there are over 450 strings allocated so this wastes ~30K of Canon heap memory.

Changing to malloc/free removes this memory overhead. Note you won't see any change in the free memory shown in the 'Miscellaneous stuff' / 'Show memory info' menu option - this shows the largest free block of memory available, not the total amount of memory available.

If using EXMEM this change also means the strings are stored in extended memory freeing up more of the Canon heap.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 19 / July / 2011, 07:32:32
Cleanup of 'capt_seq.c' for G12 (all firmware versions).
Added in changset 1241 (http://tools.assembla.com/chdk/changeset/1241/trunk).

Change to lib/lang/lang.c to use malloc/free instead of umalloc/ufree to store the language strings.
Added in changeset 1242 (http://tools.assembla.com/chdk/changeset/1242/trunk).


Thx for your work.

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 21 / July / 2011, 08:14:32
Patch for G12/SX30/IXUS 310/SX220.
Fixes AV override causing camera to crash if the shutter button half pressed repeatedly too quickly.

(Thx funnel for testing on SX220)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 21 / July / 2011, 08:48:58
Patch for G12/SX30/IXUS 310/SX220.
Fixes AV override causing camera to crash if the shutter button half pressed repeatedly too quickly.

Thx, added in changset 1243 (http://tools.assembla.com/chdk/changeset/1243/trunk).

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 21 / July / 2011, 16:01:26
Patch for S95, all firmware versions (thx maverick for testing and getting all the modemap values)
- updated stub addresses and added stubs entries or strrchr, rand and srand. removed custom S95 versions from code
- fixed get_flash_params_count
- changed display aspect ratio setting from 9/4 to x2 (http://chdk.setepontos.com/index.php?topic=6395.0 (http://chdk.setepontos.com/index.php?topic=6395.0))
- removed redundant values from platform_camera.h
- updated DNG active area values
- updated modemap
- fixed option to save RAW/DNG in same folder as JPEG

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 22 / July / 2011, 02:08:04
Patch for S95, all firmware versions (thx maverick for testing and getting all the modemap values)
- updated stub addresses and added stubs entries or strrchr, rand and srand. removed custom S95 versions from code
- fixed get_flash_params_count
- changed display aspect ratio setting from 9/4 to x2 (http://chdk.setepontos.com/index.php?topic=6395.0 (http://chdk.setepontos.com/index.php?topic=6395.0))
- removed redundant values from platform_camera.h
- updated DNG active area values
- updated modemap
- fixed option to save RAW/DNG in same folder as JPEG
Added, changeset 1244 (http://tools.assembla.com/chdk/changeset/1244).

Thanks msl for keeping up with the patches, real work has been keeping me very busy :(
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / July / 2011, 03:47:39
Patch to disable raw/dng saving in 'low light' mode on G12 & SX30 (can be enabled for other cameras using '#define CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE 1' in platform_camera.h).
The raw files in this mode are corrupted and not usable.

This patch also moves some common code (to determine if RAW/DNG saving is disabled), from raw.c and gui_osd.c into conf.c (seemed like a reasonable place to put it). I've also commented the code a bit.

Also tidied the #ifdef DNG_SUPPORT code blocks in raw_savefile and the gui_osd_draw_raw_info function.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 23 / July / 2011, 18:52:34
Patch to disable raw/dng saving in 'low light' mode on G12 & SX30 (can be enabled for other cameras using '#define CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE 1' in platform_camera.h).
The raw files in this mode are corrupted and not usable.
Added, changeset 1245 (http://tools.assembla.com/chdk/changeset/1245)

This probably applies to all cameras with a "low light" or "high ISO" mode, and also the quick shooting mode on some newer cameras.

On D10, ISO3200 sets PROPCASE_RESOLUTION 3,  which is the same as non low light M3... I have a suspicion the resolution values will vary by model and sensor, not only propset.

A long time ago, I wanted to associated flags with modemap values (so for a given camera, you could say X is a reduced res mode, Y uses the user shutter speed etc.)

It would be interesting to figure out the raw data format in these modes, assuming raw data is available, since it should give you a reduced resolution (~1/2 size), quick saving raw.

Bad pixel removal should also be disabled, since it would poke values outside of the raw buffer, and raw histogram will obviously return bogus results.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 25 / July / 2011, 05:20:55
This patch is for raw/dng saving on the SX220HS and IXUS 310HS (probably the SX230HS will need it as well).

There are two changes.

1. Add a new function to wrappers.c that checks if a directory exists before calling mkdir on it (mkdir_if_not_exist).

This is needed because repeatedly calling mkdir in raw_savefile in continuous shooting mode locks up the camera.

2. Add a simple run length compression for the badpixel.bin file.

The CMOS sensors appear to have groups of bad pixels in vertical lines up to 4-6 pixels tall. This change detects vertical runs of bad pixels and stores the run length (up to 8 pixels) in the top 3 bits of the y co-ordinate. It saves approx 45% on the file size. This is conditionally compiled code; but should be safe to use until Canon release a 48 megapixel P&S camera :)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / July / 2011, 22:59:00
This patch is for raw/dng saving on the SX220HS and IXUS 310HS (probably the SX230HS will need it as well).

Added this in changeset 1249.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 28 / July / 2011, 08:03:50
Patch for sx220 includes:

-new defs in platform_camera.c to disable raw in lowlight mode and compression of badpixel.bin
-shooting.c: now using the GetImageFolder function to get the target_dir_name.
-cleanup of boot.c. Removed dual partition support. New cameras support booting from fat32 partitions.
-capt_seq.c: moved capt_seq_hook_raw_here and added the short shutter press fix code.
-assigned more exmem memory in makefile.inc because the big badpixel.bin(made at ISO3200 181kb) caused lua scripts to throw a not enough memory error.
-stubs_entry_2.S comments cleanup.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / July / 2011, 04:27:53
Patch for sx220 includes:

Added in changeset 1251.

Edit: Changeset 1253 also adds support for the MakeSDCardBootable function in make_filesystem_bootable (to support making FAT32 cards bootable from the CHDK menu). Add CAM_DRYOS_2_3_R47 to platform_camera.h to enable this for the SX220.

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 29 / July / 2011, 20:41:37
Addition of philmoz CAM_DETECT_SCREEN_ERASE for the IXUS120_SD940.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / July / 2011, 20:53:44
Addition of philmoz CAM_DETECT_SCREEN_ERASE for the IXUS120_SD940.

Added in changeset 1255.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 29 / July / 2011, 20:58:03
Added in changeset 1255.

Wow - that is probably a record from time elapsed from submission of a patch to trunk updata.  Thanks!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 29 / July / 2011, 22:24:39
Hi!

Attached is a patch for the A410. It increases the movie time limit from 3 minutes to 1 hour in 320x240 and 640x480 modes.
The firmware function I changed here can be found in many VXWORKS cameras. There is a possibility that the usual 1 hour time limit could be lifted (but I've never tried that).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / July / 2011, 00:00:11
Hi!

Attached is a patch for the A410. It increases the movie time limit from 3 minutes to 1 hour in 320x240 and 640x480 modes.
The firmware function I changed here can be found in many VXWORKS cameras. There is a possibility that the usual 1 hour time limit could be lifted (but I've never tried that).


Added in changeset 1256.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 30 / July / 2011, 13:18:29
IXUS200-SD980 port for firmware 1.01D by gbit.

Implements CAM_DETECT_SCREEN_ERASE so firmware 1.01C will also pickup that fix.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / July / 2011, 18:49:05
IXUS200-SD980 port for firmware 1.01D by gbit.

Implements CAM_DETECT_SCREEN_ERASE so firmware 1.01C will also pickup that fix.

Added changeset 1257.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ultimA on 31 / July / 2011, 06:33:01
I've been porting some scripts to lua. get_display_mode() function is only accessible to ubasic, attached patch adds it to lua too.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 31 / July / 2011, 14:53:09
I've been porting some scripts to lua. get_display_mode() function is only accessible to ubasic, attached patch adds it to lua too.
Because there is no need for it in lua. Just use the propcase.lua, that's what it was meant for
props=require('propcase')
display_mode=get_prop(props.DISPLAY_MODE)

A lot of ubasic functions are just wrappers around propcase calls, which is pointless bloat in lua.

Rejected.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 31 / July / 2011, 19:34:16
IXUS100-SD780 :  adds support for firmware version 1.00b.  Also updates a few stubs for 1.00c and implements CAM_DETECT_SCREEN_ERASE for both versions.  Tested by voodoolady & dagokun (100B)  and  andrewhazelden (100C).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 01 / August / 2011, 05:59:33
IXUS100-SD780 :  adds support for firmware version 1.00b.  Also updates a few stubs for 1.00c and implements CAM_DETECT_SCREEN_ERASE for both versions.  Tested by voodoolady & dagokun (100B)  and  andrewhazelden (100C).

Added changeset 1259.
(Also included entry in makefile.inc).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / August / 2011, 22:02:41
Cleanup of debug_led()

I scanned the trunk for references to debug_led() after spending too long trying to figure out why the power LED for the port I am working on kept turning off.  The attached patch disables references to debug_led() in the core.  They render debug_led() useless for debugging new versions and are (IMHO) really sloppy coding practice.  Hey - C has had conditional compiles for 20+ years.

There are also references to debug_led() in each platform/xxx version but I'm not going to clean all of them up too.  Left as an exercise to each developer.



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 03 / August / 2011, 05:15:08
Patch for sx220 platform_camera.h.

Added CAM_DRYOS_2_3_R47 and CAM_DETECT_SCREEN_ERASE
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / August / 2011, 05:25:55
Cleanup of debug_led()

Patch for sx220 platform_camera.h.
Added CAM_DRYOS_2_3_R47 and CAM_DETECT_SCREEN_ERASE

Added in changeset 1262.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 06 / August / 2011, 07:08:43
Includes:
-fix in generic/shooting.c that caused Av bracketing to not calculate the lowest Av value http://chdk.setepontos.com/index.php?topic=6726.0 (http://chdk.setepontos.com/index.php?topic=6726.0)
-in generic/shooting.c disabled bracketing when camera in best image selection mode (MODE_SCN_BEST_IMAGE). In this mode the camera shoots 4 images and auto selects the best one.
-added new keys for sx220 to include/keyboard.h
-added new key "playback" for sx220 in adjustable alt button in gui.c
-key changes in sx220 kbd.c
-from sx220 platform_camera.h removed unneeded define entries and comments cleanup.
-in sx220 lib.c corrected the led_table.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 07 / August / 2011, 18:06:13
Attached is a patch for the A410

- subject distance override made possible by duplicating (and disabling an assert in) MoveFocusLensToDistance(). I'm not sure whether I chose the proper place for its declaration (I put it into /include/lolevel.h) or a proper name for it ( MoveFocusLensToDistanceA410() ).
- movie time limit fix (the standard, 60min one) was tested, I no longer call it experimental.
- included CAM_DETECT_SCREEN_ERASE
- typo fixed in /platform/a410/shooting.c

I didn't include any MFOn() MFOff() stuff. While it does make manual focus work better in these cameras (A410, 420, ...) by eliminating the unnecessary af-scan, it would be too much work for now to implement it. Its state would need to be properly tracked, if not, it causes more problems than it solves.

Oh, and about that assert: I strongly believe, that removing it won't cause any hardware trouble, everything seems to work just fine.

edit:
grammar fix
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 08 / August / 2011, 04:34:01
Includes:
-fix in generic/shooting.c that caused Av bracketing to not calculate the lowest Av value http://chdk.setepontos.com/index.php?topic=6726.0 (http://chdk.setepontos.com/index.php?topic=6726.0)
-in generic/shooting.c disabled bracketing when camera in best image selection mode (MODE_SCN_BEST_IMAGE). In this mode the camera shoots 4 images and auto selects the best one.
-added new keys for sx220 to include/keyboard.h
-added new key "playback" for sx220 in adjustable alt button in gui.c
-key changes in sx220 kbd.c
-from sx220 platform_camera.h removed unneeded define entries and comments cleanup.
-in sx220 lib.c corrected the led_table.

Added all but the first change to generic\shooting.c in changeset 1285.

My concern with the first update is that it changes the current behaviour which may cause unintended consequences (possibly in scripts).
Currently you select an amount to bracket by and if applying that amount to the Av value is out of range the bracketed value is not changed - your update causes it to use the largest aperture which amounts to a bracketed change of less than the requested amount.
Hope this makes sense, and I'm happy to be overruled by someone more knowledgable in this area.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 08 / August / 2011, 05:56:35
Currently you select an amount to bracket by and if applying that amount to the Av value is out of range the bracketed value is not changed - your update causes it to use the largest aperture which amounts to a bracketed change of less than the requested amount.

Makes sense. If I want 1/3EV changes in the last shot I would actually get an ~1/6EV (-14 in place of -32) which is not what I requested. But why would canon call it a f3.1 when is actually a f3.3? I'll try to compare the images in software if I can see the EV difference between the last images.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 08 / August / 2011, 08:04:29
edit: ignore the first post I wrote.

I made a test between f3.5 and f3.1 raw files and looks like it's true that even if it substracts just -14 and not -32 the difference between the two final images is 1/3EV (-32).

I tested by comparing:
-DNG f3.5 (0EV) vs DNG 3.1 (-0.33EV in photoshop) --->no noticable difference in brightness
-JPG f3.5 (0EV) vs JPG 3.1 (-0.33EV) --->no noticable difference in brightness

Of course philmoz you're right when bracketing with 1EV,2EV... the final image would not be the right EV someone requested.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 12 / August / 2011, 04:39:05
Attached is a patch for the A410

- subject distance override made possible by duplicating (and disabling an assert in) MoveFocusLensToDistance(). I'm not sure whether I chose the proper place for its declaration (I put it into /include/lolevel.h) or a proper name for it ( MoveFocusLensToDistanceA410() ).
- movie time limit fix (the standard, 60min one) was tested, I no longer call it experimental.
- included CAM_DETECT_SCREEN_ERASE
- typo fixed in /platform/a410/shooting.c

I didn't include any MFOn() MFOff() stuff. While it does make manual focus work better in these cameras (A410, 420, ...) by eliminating the unnecessary af-scan, it would be too much work for now to implement it. Its state would need to be properly tracked, if not, it causes more problems than it solves.

Oh, and about that assert: I strongly believe, that removing it won't cause any hardware trouble, everything seems to work just fine.

edit:
grammar fix

Added in changeset 1287.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 12 / August / 2011, 05:35:22
Added in changeset 1287.

I added missing focushack.c in changeset 1288

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 12 / August / 2011, 08:38:45
SX220 patch:
-fix for save raw file counter not being updated correctly
-fix for ISO overrides in capt_seq.c and shooting.c
-fix for jogdial task in boot.c and kbd.c

Thx to philmoz.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 12 / August / 2011, 09:05:56
Added in changeset 1287.

I added missing focushack.c in changeset 1288

msl

Sorry about that chief :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 12 / August / 2011, 09:11:24
SX220 patch:
-fix for save raw file counter not being updated correctly
-fix for ISO overrides in capt_seq.c and shooting.c
-fix for jogdial task in boot.c and kbd.c

Thx to philmoz.


Added in changeset 1290.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mipa87 on 19 / August / 2011, 14:30:26
Patch for a580:
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 21 / August / 2011, 17:13:39
New colormatrix for sx220hs.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 23 / August / 2011, 06:06:23
New colormatrix for sx220hs.

Thx, added in changeset 1304 (http://tools.assembla.com/chdk/changeset/1304/trunk)

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mipa87 on 23 / August / 2011, 09:43:57
A580 now fully working.

Firmware update method from camera works with this settings:
Code: [Select]
ifeq ($(KEYSYS), d3enc)
    FI2KEY=6F....71
    FI2IV =53....3D
endif
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 24 / August / 2011, 16:44:39
SX100IS 1.00c extra long exposures support.
Patch and explanation here: http://chdk.setepontos.com/index.php?topic=237.msg72276#msg72276 (http://chdk.setepontos.com/index.php?topic=237.msg72276#msg72276)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 25 / August / 2011, 06:43:23
A580 now fully working.
  • Extra long exposure feature supported.

Added in changeset 777 CHDK-DE (http://my-trac.assembla.com/chdkde/changeset/777).

Thx for your work.

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 25 / August / 2011, 16:26:06
Added new camera version SX220 HS 1.01b + removed a not needed line in camera/shooting.c ISOTable.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 26 / August / 2011, 05:39:04
Added new camera version SX220 HS 1.01b + removed a not needed line in camera/shooting.c ISOTable.

Thx for that.

Added in changeset 1305 (http://chdk.setepontos.com/index.php?topic=650.msg72311#msg72311).

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mipa87 on 26 / August / 2011, 12:27:22
A580 final (fixed stubs).

Can you add a580 to autobuild in CHDK and remove "alpha" status from download in CHDK-DE? thx
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / August / 2011, 23:07:35
A few additions to the comments in include/camera.h that help explain how to select some of the constants necessary for DNG creation.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 29 / August / 2011, 01:57:54
A few additions to the comments in include/camera.h that help explain how to select some of the constants necessary for DNG creation.
Added changeset 1307 (http://tools.assembla.com/chdk/changeset/1307/trunk)
I changed the wording of the jpeg ones slightly...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 29 / August / 2011, 02:17:52
A580 final (fixed stubs).

Can you add a580 to autobuild in CHDK and remove "alpha" status from download in CHDK-DE? thx
I added the patch to chdk trunk, changeset 1308 (http://tools.assembla.com/chdk/changeset/1308/trunk)

I had to make two small changes to get it to compile:
comment out the generic/lib.c  include in the platform lib.c, and the KEY_SHOOT_FULL_ONLY in kbd.c

The SHOOT_FULL_ONLY stuff hasn't been added to the trunk yet, but it probably should be.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: genie on 29 / August / 2011, 04:45:59
In the German forum SX230HS (firmware version 1.00c) was added to trunk.
Source: https://my-trac.assembla.com/chdkde/browser/trunk

Can this version be transferred directly to the trunk here or must a patch file be created?

If this can be transferred directly, please add it to the trunk. If not, i will create a patch file.

regards
genie
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mipa87 on 07 / September / 2011, 07:13:06
A580
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: taliesin on 09 / September / 2011, 20:38:00
Hey,

I have a patch against SVN 1324 which adds sx230hs for the 100c and the 101a firmwares.

It needs changes to /core/dng.c
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / September / 2011, 21:05:50
A580
  • Now is EXMEM supported
  • Manual Focus adjustments tested and works
  • + makefile

Added in changeset 1325.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / September / 2011, 21:09:10
Hey,

I have a patch against SVN 1324 which adds sx230hs for the 100c and the 101a firmwares.

It needs changes to /core/dng.c

I tried applying your patch to my local build, so I could commit the changes.
I use TortoiseSVN on Windows - unfortunately TortoiseSVN doesn't like the patch file.

If you can create a patch file that I can use with TortoiseSVN I can add this, otherwise it will need to wait for someone more familiar with it who can apply the patch.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: taliesin on 09 / September / 2011, 21:48:55
Hey,

I have a patch against SVN 1324 which adds sx230hs for the 100c and the 101a firmwares.

It needs changes to /core/dng.c

I tried applying your patch to my local build, so I could commit the changes.
I use TortoiseSVN on Windows - unfortunately TortoiseSVN doesn't like the patch file.

If you can create a patch file that I can use with TortoiseSVN I can add this, otherwise it will need to wait for someone more familiar with it who can apply the patch.

Phil.


See if this one works any better

Thanks

Taliesin
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / September / 2011, 22:10:12
Hey,

I have a patch against SVN 1324 which adds sx230hs for the 100c and the 101a firmwares.

It needs changes to /core/dng.c

I tried applying your patch to my local build, so I could commit the changes.
I use TortoiseSVN on Windows - unfortunately TortoiseSVN doesn't like the patch file.

If you can create a patch file that I can use with TortoiseSVN I can add this, otherwise it will need to wait for someone more familiar with it who can apply the patch.

Phil.


See if this one works any better

Thanks

Taliesin

Sorry, still no luck applying it with TortoiseSVN.
With help from reyalp I've managed to get the patches working.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: taliesin on 09 / September / 2011, 22:50:40
Hey,

I have a patch against SVN 1324 which adds sx230hs for the 100c and the 101a firmwares.

It needs changes to /core/dng.c

I tried applying your patch to my local build, so I could commit the changes.
I use TortoiseSVN on Windows - unfortunately TortoiseSVN doesn't like the patch file.

If you can create a patch file that I can use with TortoiseSVN I can add this, otherwise it will need to wait for someone more familiar with it who can apply the patch.

Phil.


See if this one works any better

Thanks

Taliesin

Sorry, still no luck applying it with TortoiseSVN.
With help from reyalp I've managed to get the patches working.

Phil.


Thanks,

is there something different I can do next time to make it work easier?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / September / 2011, 23:02:25
Hey,

I have a patch against SVN 1324 which adds sx230hs for the 100c and the 101a firmwares.

It needs changes to /core/dng.c

Added in changeset 1326.

I modified dng.c to get rid of some compiler warnings.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 10 / September / 2011, 13:56:53
G10 f/w 1.02a, 1.03b, 1.04a

Beta testing complete - port done.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: taliesin on 10 / September / 2011, 16:48:46

Patch for the new 101b firmware for the sx230hs, and porting accross some changes from sx220 into sx230

Thanks
Taliesin
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / September / 2011, 17:59:49
G10 f/w 1.02a, 1.03b, 1.04a

Beta testing complete - port done.

Added in changeset 1327.

(I left out the stubs_entry.S.orig files from the new signature finding testing phase.)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: taliesin on 10 / September / 2011, 18:09:07
G10 f/w 1.02a, 1.03b, 1.04a

Beta testing complete - port done.

Added in changeset 1327.

(I left out the stubs_entry.S.orig files from the new signature finding testing phase.)

Phil.


Thanks.. forgot about that that file was automatically created..
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / September / 2011, 18:44:32

Patch for the new 101b firmware for the sx230hs, and porting accross some changes from sx220 into sx230

Thanks
Taliesin

Added in changeset 1331.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / September / 2011, 08:54:28
G10 f/w 1.02a, 1.03b, 1.04a
Added in changeset 1327.
I noticed that reyalp had to do 54 fix-ups to the G10 svn properties in change set 1329

Code: [Select]
svn props for g10
Commit from user: reyalp

Was there something I should have done differently in the patch or original source files ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 11 / September / 2011, 09:43:07
I'm not sure whether I chose the proper place for its declaration (I put it into /include/lolevel.h) or a proper name for it ( MoveFocusLensToDistanceA410() ).
:-[
Attached is a cosmetic patch regarding A410. It removes the "global" declaration and use of MoveFocusLensToDistanceA410() as it seems to be unneeded. It's now only a local function for the port.



Oh, btw. Is there something wrong with this (http://chdk.setepontos.com/index.php?topic=237.msg72276#msg72276) patch for the SX100? If it gets accepted, I could do the same for the other firmware revision (the change should be trivial, but I will not be able to test that of course). Here (http://chdk.setepontos.com/index.php?topic=650.msg72277#msg72277) is my previous post.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / September / 2011, 13:06:03
Patch for IXUS120-SD940 (all firmware versions)

This patch corrects a major bug in capt_seq.c for all firmware versions.  The bug had been partially masked by commenting out one of the calls to the CHDK hooks.  This resulted in impaired USB_Remote functionality and possible crashes in some shooting modes.

This patch enables USB remote operation in "Synchable Remote" mode.  In this mode the camera does a "half shoot" on application of 5V on the USB port and a "full shoot" when the 5V is removed.

Patch has been tested with firmware 1.03c.   Changes to other firmware versions have been carefully made and should be okay.  ( If they are not right, any shooting operation while CHDK is loaded will crash so we should get immediate feedback of any bugs that I was not able to test for. )



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / September / 2011, 15:32:51
Was there something I should have done differently in the patch or original source files ?
No, the person committing the patch has to do it.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 11 / September / 2011, 17:31:59
A1100

       -added adjustable ALT button
       -enabled screen erase detect
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / September / 2011, 22:53:44
Patch for IXUS120-SD940 (all firmware versions)

This patch corrects a major bug in capt_seq.c for all firmware versions.  The bug had been partially masked by commenting out one of the calls to the CHDK hooks.  This resulted in impaired USB_Remote functionality and possible crashes in some shooting modes.

This patch enables USB remote operation in "Synchable Remote" mode.  In this mode the camera does a "half shoot" on application of 5V on the USB port and a "full shoot" when the 5V is removed.
Added changeset  1334 (http://tools.assembla.com/chdk/changeset/1334)

Attached is a cosmetic patch regarding A410. It removes the "global" declaration and use of MoveFocusLensToDistanceA410() as it seems to be unneeded. It's now only a local function for the port.
Added, changeset 1335 (http://tools.assembla.com/chdk/changeset/1335)
Quote
Oh, btw. Is there something wrong with this (http://chdk.setepontos.com/index.php?topic=237.msg72276#msg72276) patch for the SX100? If it gets accepted, I could do the same for the other firmware revision (the change should be trivial, but I will not be able to test that of course). Here (http://chdk.setepontos.com/index.php?topic=650.msg72277#msg72277) is my previous post.
I'm not clear if this is tested ?   If it is then it should be fine Looks like you do have that camera. On some cameras the second "taskhook" is only needed for some tasks, but in your case there is only one task started this way.

The way our ifdefs are set up, it is hard to have features like extra long exposure enabled for only one sub so you'd need to do both before we can put it in the trunk.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 12 / September / 2011, 20:43:05
I'm not clear if this is tested ?   If it is then it should be fine Looks like you do have that camera.
Yes, I have tested it on my 1.00c camera.
Quote
On some cameras the second "taskhook" is only needed for some tasks, but in your case there is only one task started this way.
Looking at some (earlier) discussions and also at some DryOS ports, it's still not clear to me, how this mechanism works. When I removed the modification of the 0x1934 location, the modified exp_drv_task() still managed to start. I have only tested this twice: first time with the camera started in playback mode, second time with the camera started with a long press on the on/off button. Both tests were succesful.
But, since most ports use two taskhook locations (with the override for exp_drv_task included in both), I decided to follow that practice.
Quote
The way our ifdefs are set up, it is hard to have features like extra long exposure enabled for only one sub so you'd need to do both before we can put it in the trunk.
Yeah, I forgot about that. So here's the patch for both fw revisions, also included the fix for the vanishing menus.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: snowsnapshots on 30 / September / 2011, 04:55:05
Hi, I ported the firmware version 100f to 100d, for the powershot a490, with the help of CHDK-PT.

Everything seems to be working fine...

I have attached a patch-file for the trunk. I think everything should be included. Could someone add this to the repository?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: snowsnapshots on 30 / September / 2011, 10:51:21
The patch in previous post is against trunk revision 1344
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / September / 2011, 19:23:43
I'm not clear if this is tested ?   If it is then it should be fine Looks like you do have that camera.
Yes, I have tested it on my 1.00c camera.
Quote
On some cameras the second "taskhook" is only needed for some tasks, but in your case there is only one task started this way.
Looking at some (earlier) discussions and also at some DryOS ports, it's still not clear to me, how this mechanism works. When I removed the modification of the 0x1934 location, the modified exp_drv_task() still managed to start. I have only tested this twice: first time with the camera started in playback mode, second time with the camera started with a long press on the on/off button. Both tests were succesful.
But, since most ports use two taskhook locations (with the override for exp_drv_task included in both), I decided to follow that practice.
Quote
The way our ifdefs are set up, it is hard to have features like extra long exposure enabled for only one sub so you'd need to do both before we can put it in the trunk.
Yeah, I forgot about that. So here's the patch for both fw revisions, also included the fix for the vanishing menus.

Added in changeset 1345.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / September / 2011, 19:26:58
Hi, I ported the firmware version 100f to 100d, for the powershot a490, with the help of CHDK-PT.

Everything seems to be working fine...

I have attached a patch-file for the trunk. I think everything should be included. Could someone add this to the repository?


The patch is missing the 'capt_seq.c' file.

I would also recommend verifying all the addresses that are reported as possibly incorrect in stubs_entry.S and correct if necessary (e.g. the levent_table and FlashParamsTable addresses in stubs_min.S).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 30 / September / 2011, 20:58:31
Here's a patch file to add get_config_value() and set_config_value() to Lua and uBASIC.  Its taken directly from CHDK-DE.

This is in response to this request http://chdk.setepontos.com/index.php?topic=6429.msg73673#msg73673 (http://chdk.setepontos.com/index.php?topic=6429.msg73673#msg73673). 

It actually seems like a good idea but reyalp may have some history as to why this was not added in the past.

If its accepted,  I'll update the wiki as best I can.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 01 / October / 2011, 01:26:24
A patch to add four really simple scripts (Lua and uBasic versions so 8 files total) to the install files. These scripts implement the most common functions people want from CHDK (shoot with delay, intervalometer, motion detect, HDR).   Lots of room for people to experiment and improve.  What I was looking for was the most basic way to do the core CHDK scripted functions - curiously those are not included in the standard CHDK build.

The scripts are written to be generic -  nothing specific to a particular camera model.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 01 / October / 2011, 07:28:22
Here's a patch file to add get_config_value() and set_config_value() to Lua and uBASIC.  Its taken directly from CHDK-DE.

This is in response to this request http://chdk.setepontos.com/index.php?topic=6429.msg73673#msg73673 (http://chdk.setepontos.com/index.php?topic=6429.msg73673#msg73673). 

It actually seems like a good idea but reyalp may have some history as to why this was not added in the past.

If its accepted,  I'll update the wiki as best I can.



A patch to add four really simple scripts (Lua and uBasic versions so 8 files total) to the install files. These scripts implement the most common functions people want from CHDK (shoot with delay, intervalometer, motion detect, HDR).   Lots of room for people to experiment and improve.  What I was looking for was the most basic way to do the core CHDK scripted functions - curiously those are not included in the standard CHDK build.

The scripts are written to be generic -  nothing specific to a particular camera model.


Both added in changeset 1348.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: snowsnapshots on 03 / October / 2011, 05:14:56
Hi Phil,

Here is the patch with capt_seq included. Sorry for that. I don't know how to check/correct the addresses in stubs_entry.S, but so far, things seem to be working.
If someone can explain how to correct the addresses, assuming little foreknowledge, I can do that, but I have little time the next two weeks...


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 03 / October / 2011, 19:47:44
If someone can explain how to correct the addresses, assuming little foreknowledge, I can do that, but I have little time the next two weeks...
If you read through the stubs_entry.S file,  you will see that it flags where things it found do not match some of the values you have found in shooting.c,  stubs_min.S, lib.c, kbd.c, platform_camera.h and stubs_entry_2.S.   The values in stub_entry.S are probably correct so you need to be really sure why the values you put into those other files do not match.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / October / 2011, 00:28:06
Patch file to add outslider's editor to the CHDK/SCRIPTS directory under subdirectory EDITOR.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Glomeris on 06 / October / 2011, 11:38:48
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 07 / October / 2011, 05:33:56
@Glomeris
Delete (or rename) your CHDK config file on the SD card ( \CHDK\cchdk.cfg ).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 07 / October / 2011, 20:09:46
Hi Phil,

Here is the patch with capt_seq included. Sorry for that. I don't know how to check/correct the addresses in stubs_entry.S, but so far, things seem to be working.
If someone can explain how to correct the addresses, assuming little foreknowledge, I can do that, but I have little time the next two weeks...




Added in changeset 1353.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 07 / October / 2011, 20:12:10
Patch file to add outslider's editor to the CHDK/SCRIPTS directory under subdirectory EDITOR.


Added in changeset 1354.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Glomeris on 08 / October / 2011, 15:47:03
@Glomeris
Delete (or rename) your CHDK config file on the SD card ( \CHDK\cchdk.cfg ).



Hi fe50. I did not realize that build 1352 set my camera "Autostart" "on"; I just set that to "off". Done this, A470 1.00E build 1352 works as use to do previous builds. Sorry, next time I'll ask before shooting...

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 09 / October / 2011, 10:28:40
Hi! I've ownloaded the lastest (1359) release from autobuild for sx130is firmware C, but the EDITOR directory is empty... I looked also in a few other cameras builds and always it's empty. Any reason or a mistake?

If it's a mistake I suggest to wait untill this evening I'll post a new vrsion of editor with file_browser() command used and then apply another, working patch.

Greetings;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 09 / October / 2011, 16:32:24
Ok, I made a new version of editor (http://chdk.setepontos.com/index.php?topic=6465.0 (http://chdk.setepontos.com/index.php?topic=6465.0)). But I'm not really sure, how to make a patch. When somebody find a piece of time could do this;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / October / 2011, 17:30:34
Hi! I've ownloaded the lastest (1359) release from autobuild for sx130is firmware C, but the EDITOR directory is empty... I looked also in a few other cameras builds and always it's empty. Any reason or a mistake?

If it's a mistake I suggest to wait untill this evening I'll post a new vrsion of editor with file_browser() command used and then apply another, working patch.

Greetings;)

Forgot to update the Makefile rules to include the editor directory in the .zip files.
Will fix this tonight and include the latest version of the script..

Phil.

Edit:- New version and makefile fix in changset 1361.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 16 / October / 2011, 18:35:51
Patch file to enable colored icons on IXUS120-SD940.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 16 / October / 2011, 19:04:56
Patch to fix one of the "simple" scripts recently added.   As a "C" programmer, I need to learn that in Lua,  a zero value does not evaluate to the same thing as "false".  Don't know how I missed that in the testing - probably because the uBasic version worked so I missed it when translating to Lua.  My bad.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 17 / October / 2011, 03:18:29
Patch file to enable colored icons on IXUS120-SD940.


Patch to fix one of the "simple" scripts recently added.   As a "C" programmer, I need to learn that in Lua,  a zero value does not evaluate to the same thing as "false".  Don't know how I missed that in the testing - probably because the uBasic version worked so I missed it when translating to Lua.  My bad.



Both added in changeset 1370.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ERR99 on 17 / October / 2011, 18:01:32
Hello,

so finally i found some time to rebase my port for the A3000IS to the current trunk and create a diff file.
So please add this port for the A3000IS (FW Versions 1.00b, c and d) to the trunk.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 19 / October / 2011, 04:42:59
Hello,

so finally i found some time to rebase my port for the A3000IS to the current trunk and create a diff file.
So please add this port for the A3000IS (FW Versions 1.00b, c and d) to the trunk.


Added in changeset 1372.

I've also added the camera to the auto-build as a BETA version.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 22 / October / 2011, 21:55:44
IXUS1000-SD4500 :   firmware 1.00d & 1.00f

Gets it off my hard drive and available for tweaking prior to inclusion in autobuild.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / October / 2011, 00:06:50
IXUS1000-SD4500 :   firmware 1.00d & 1.00f
  • based on Bernd R's port.   
  • stubs_entry.S updated with latest sigfinder results.
  • camera_list.csv marked as SKIP_AUTOBUILD
  • NOT TESTED

Gets it off my hard drive and available for tweaking prior to inclusion in autobuild.

Added in changeset 1382.

(Note: the included camera_list.csv patch is missing commas on many of the lines - there should be five entries on each line.)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / October / 2011, 02:14:24
(Note: the included camera_list.csv patch is missing commas on many of the lines - there should be five entries on each line.)
Yup - I wondered about that.  I opened the camera_list.csv with a slightly older version of Excel and then saved it after adding the IXUS1000.  I noticed a lot of "changes" in the patch file that really were not changes.  Which makes me think using .CSV as a file format might be a source of problems if people edit it with spreadsheet software rather then text editors ?
 
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / October / 2011, 02:18:08
(Note: the included camera_list.csv patch is missing commas on many of the lines - there should be five entries on each line.)
Yup - I wondered about that.  I opened the camera_list.csv with a slightly older version of Excel and then saved it after adding the IXUS1000.  I noticed a lot of "changes" in the patch file that really were not changes.  Which makes me think using .CSV as a file format might be a source of problems if people edit it with spreadsheet software rather then text editors ?
 

It's an easy file format to process - so long as anyone committing changes to SVN is careful it should be OK.

It's certainly a lot easier to update and add new versions to though :)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / October / 2011, 02:26:50
It's an easy file format to process - so long as anyone committing changes to SVN is careful it should be OK.

It's certainly a lot easier to update and add new versions to though :)
I'm with you there - the six or so separate places in Makefile for a new port took patience to find.   Still,  it will be interesting to see what the various spreadsheet programs out there do to the CSV file format ....
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 26 / October / 2011, 19:19:42
Correction to English .lng file to match a default menu value in the embedded in core files.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / October / 2011, 03:35:26
Correction to English .lng file to match a default menu value in the embedded in core files.


Added in changeset 1388.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 01 / November / 2011, 04:55:07
1) Language library optimization. It save 2.5kb of chdk size always and about 15kb of heap if no language file loaded.
Second attachment contain simple tool (source and executable) to convert gui_lang.c and/or apply to it any .lng file (to avoid load .lng file and so extend saving to native language).

2) Also small fix done in russian.lng
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / November / 2011, 21:10:21
Patch for G10,  G11 & G12 - all firmware versions -  that enables the adjustable ALT button option.  ALT button can be changed from the default PRINT button to the AE_Lock/Microphone,  DISP or Jump/Metering button.

Tested on the G10. Should work on G11 as is.  Code change on G12 probably warrants a little testing (philmoz?).



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / November / 2011, 21:36:29
Patch for G10,  G11 & G12 - all firmware versions -  that enables the adjustable ALT button option.  ALT button can be changed from the default PRINT button to the AE_Lock/Microphone,  DISP or Jump/Metering button.

Tested on the G10. Should work on G11 as is.  Code change on G12 probably warrants a little testing (philmoz?).


I'll test and submit it tonight.

One suggestion - the 'alt_mode_key_mask' variable is not needed and the 'kbd_set_alt_mode_key_mask' function can actually be empty.
The variable is set; but never used, on any of these cameras.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / November / 2011, 22:23:45
One suggestion - the 'alt_mode_key_mask' variable is not needed and the 'kbd_set_alt_mode_key_mask' function can actually be empty.
The variable is set; but never used, on any of these cameras.
Yup - a few minutes of clicking with grepWin now tells me the same thing. Not sure I want to go cleanup the 44 files that reference it though.  Maybe when I get the rest of kdb.c straighened out,  I'll add the changes at the same time ?

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / November / 2011, 03:04:36
Patch for G10,  G11 & G12 - all firmware versions -  that enables the adjustable ALT button option.  ALT button can be changed from the default PRINT button to the AE_Lock/Microphone,  DISP or Jump/Metering button.

Tested on the G10. Should work on G11 as is.  Code change on G12 probably warrants a little testing (philmoz?).


Added in changeset 1392.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / November / 2011, 04:15:04
1) Language library optimization. It save 2.5kb of chdk size always and about 15kb of heap if no language file loaded.
Second attachment contain simple tool (source and executable) to convert gui_lang.c and/or apply to it any .lng file (to avoid load .lng file and so extend saving to native language).

2) Also small fix done in russian.lng

Added in changeset 1393.

I have changed the layout slightly to keep the string numbers at the start of each line in gui_lang.c
This better matches the layout in the .lng files.
I also added some comments for anyone updating the language strings in the future.

Generating a custom 'gui_lang_default' variable from a .lng file is a nice idea.
It would be good if this were integrated into the build as an option. It might be easier to do if 'gui_lang_default' were moved to a .h file that was included in gui_lang.c. The convertor program would then only need to re-build the .h file instead of the entire gui_lang.c file.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 04 / November / 2011, 05:02:52
Its even better.
I also would like to integrate language choice to building process, but I don't know how. I do prepare all required components and ask you to integrate them into ChdkShell.

I see one more benefit of this: now developer shouldn't care about consistency build-in language list with english.lng. String list in header file will be created automatically even for english language.
But I propose to keep this new .h file (though it will be created automatically on build) in repository for non-windows hosted developers and for autobuild-server.

Below are two files:
* patch.zip - consist patch (separate strings to different .h file, add missed strings to english.lng )
* make_gui_lang.zip - consist source and compiled executable of convertor, which make strings header file for any language

How to use this convertor:
make_gui_lang.exe path_to_english.lng [path_to_secondary.lng] > path_to_trunk/core/gui_lang_str.h

Please fill free to change remarks in gui_lang.c, because english is not my strongest point.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / November / 2011, 05:23:38
Its even better.
I also would like to integrate language choice to building process, but I don't know how. I do prepare all required components and ask you to integrate them into ChdkShell.

I see one more benefit of this: now developer shouldn't care about consistency build-in language list with english.lng. String list in header file will be created automatically even for english language.
But I propose to keep this new .h file (though it will be created automatically on build) in repository for non-windows hosted developers and for autobuild-server.

Below are two files:
* patch.zip - consist patch (separate strings to different .h file, add missed strings to english.lng )
* make_gui_lang.zip - consist source and compiled executable of convertor, which make strings header file for any language

How to use this convertor:
make_gui_lang.exe path_to_english.lng [path_to_secondary.lng] > path_to_trunk/core/gui_lang_str.h

Please fill free to change remarks in gui_lang.c, because english is not my strongest point.

First step is that the 'make_gui_lang' program used to generate the .h file needs to be compilable using GCC.
Look at the current programs and Makefile in the Tools directory.
I tried compiling your program with GCC; but it failed.
All of the current tools are C not C++, so the makefile rules may also need to be adjusted.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 04 / November / 2011, 10:23:23
Ok. In attachment new version of convertor.
It succesfully was compiled in tools and work ok
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 04 / November / 2011, 13:44:48
Another small improvement:

- set_console_autoredraw functionality is extended. If value =-1 that mean do not display value on the screen
- print_screen functionality is extended. If negative value provided, logfile will be not cleared but appended.

Cheap extension to even more control. Useful for fastening of any dumps for example.
And especially extend ubasic control. Because it is very limited in any file operations.

Massive ubasic speed optimization come soon... So memory-careful language going to be more useful.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / November / 2011, 00:41:01
Another small improvement:
Improvements are good.  Even better is somebody adding new stuff to the code. Welcome onboard !!

Quote
Massive ubasic speed optimization come soon... So memory-careful language going to be more useful.
Hmmm ... I'm assuming english is not your native language?   No problem if it is not.  The word "massive" might be more than you intend with your comment  though ?   "Good" or "nice" are better words uniess you have a way to increase script execution speed to ten times faster or more ?

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 05 / November / 2011, 00:52:37
Another small improvement:

- set_console_autoredraw functionality is extended. If value =-1 that mean do not display value on the screen
- print_screen functionality is extended. If negative value provided, logfile will be not cleared but appended.

Cheap extension to even more control. Useful for fastening of any dumps for example.
And especially extend ubasic control. Because it is very limited in any file operations.

Massive ubasic speed optimization come soon... So memory-careful language going to be more useful.

Added in changeset 1394 (also added some comments to the code).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / November / 2011, 01:13:09
Added in changeset 1394 (also added some comments to the code).
wiki updated  set_console_autoredraw() (http://chdk.wikia.com/wiki/Script_commands#set_console_autoredraw)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 05 / November / 2011, 01:51:51
Ok. In attachment new version of convertor.
It succesfully was compiled in tools and work ok

Thanks for that.
I've integrated it into the build process - defaults to english; but can be overridden in buildconf.inc or localbuildconf.inc.

Added in changeset 1395.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 05 / November / 2011, 02:54:47
Added in changeset 1394 (also added some comments to the code).

Sorry. I did miss one line during preparation workspace to diff. So print_screen extension work not as expected.
Below patch for that
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 05 / November / 2011, 03:39:17
Added in changeset 1394 (also added some comments to the code).

Sorry. I did miss one line during preparation workspace to diff. So print_screen extension work not as expected.
Below patch for that

Added in changeset 1396.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: acseven on 06 / November / 2011, 11:22:22
uBASIC speed optimizations was split into another topic:
http://chdk.setepontos.com/index.php?topic=7060.msg75292#top (http://chdk.setepontos.com/index.php?topic=7060.msg75292#top)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 07 / November / 2011, 19:59:56
Colored icons for sx130is - colors tuned as best possible (I guess).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 09 / November / 2011, 04:17:15
Another big CHDK enhancement.

Existed CHDK AutoISO greatly improve regular automode. But it could be even better.
Why I improve AutoISO - I want to get nice shoot on all range of scenes (daylight, indoor, night scenes) without any readjustment. In most cases I have no time to adjust, or I am lazy about it, or my wife take a shoot and she would like to know nothing about adjusting.

How AutoISO works in current CHDK in simple words:
  - Canon make his decision based on his firmware logic
  - CHDK try to adopt ISO to minISO with locked brightness. If result Tv is more than TVthreshold, then try to keep Tv on this threshold with increasing ISO (but not more than MaxISO)
  So we have three phases on Tv:
    * Tv adjusted to MinISO (until TVmin)
    * Tv is locked to TVmin and ISO is adjusted until required ISO< MaxISO
    * Tv adjusted to MaxISO


What is done by this change:
   * Indoor Phase.
     If for ISO=ISOMax and Tv is more than TVmin, then not change only Tv but change slowly both Tv and ISO to reach TvMin2/ISOMax2.
     Example usage: I think that 1/125 is nice enough Tv for all cases and ISO=200 is nice ISO on my S95. This limits are good for daylight but they are bad for twilight/indoor.
         At same time I don't wont decrease Tv to 1/45 or ISO to 500 if I could avoid this. But this limits are still useful for me for mid-light condition.
         So I set ISOMax:TvMin to 200:1/125, also set ISOMax2:Tv2 to 500:1/45 and then if camera can't limit both values inside first range (good 200:1/125) will increase slightly both ISO and Tv.
         As result we got acceptable (for personal choose) both ISO and Tv. Surely this will not help in night scenes, when ISO will be locked as max acceptable 500 and compensated by Tv.
     This phase could be turned off in CHDK menu. In this case AutoISO mechanizm will work exactly as in previous version CHDK (except separated new "Overexposure correction" feature)

   * Day overexposure compensation
     On daylight (below ISOmax1) if more than X% of pixels are overexposed exposition (by zebra) will be changed on Y.
     Goal of this enhancement:
      a) Many camera has tendency to overexpose shots. This should be prevented
      b) better shots of cloudy days. Shadows could be easily restored from RAW while too bright image can't.
     Why daylight only: In my experiments in night time situation of high contrast scene (light sources and dark most image) is quite often and in this case such autocorrection often could decrease result image quality
     This feature could be turned off in CHDK menu. Type of correction (daylight-only or overall correction is adjustable in CHDK sources by #define OVEREXP_COMPENSATE_OVERALL)

     Attention: In opposition to main AutoISO mechanizm (adapt expo-pair but keep brightness), this feature WILL change brightness.
     Known failure: a) This feature could react on direct sun shooting. This could be unexpected by photographer.
                    b) Also this feature could negate premeditated too high expo-correction (with big overexposed areas).
     For my taste shoots which are fixed by this feature is better then without in most cases. Just do not set too high correction value. Or if you don't like this you could turn this feature off from menu.

   * Marketing ISO
     For me it is entangleous to set values in real ISO. I suspect that for most other peoples also.
     I easily know what is the quality of marketing ISO500 (because I see marketing value correspondence to result image often). And I don't want to calculate each time what real ISO it is.
     On my S95 correspondence is not exactly but quite linear, so it could be easily calculated by CHDK with acceptable error.
     This feature is adjustable in sources by #define USE_REAL_AUTOISO

There are two patches in attachment. First one is ready to include into CHDK branch.
Second file contain same logic, but it also contain debug logging into A/CHDK/BOOKS information for each shot which made with AutoISO feature. So you can investigate translation from marketing values, is Indoor Phase or Overexp correction features do their process (and details how they do this).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / November / 2011, 23:41:49
Colored icons for sx130is - colors tuned as best possible (I guess).

Added in changeset 1402.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 10 / November / 2011, 03:56:37
Pretty simple bugfix.

Fixed problem:
If try to open text reader "Miscelanous - Text File Reader - Open New File..." and then press "menu" in file selector, clear screen is displayed and then I can't do power off (lens keep retracted), can't see any CHDK screen etc. Only removing battery help.
Because I often use text reader (to read debug info) it was extremely annoying bug.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / November / 2011, 15:33:10
Pretty simple bugfix.

Fixed problem:
If try to open text reader "Miscelanous - Text File Reader - Open New File..." and then press "menu" in file selector, clear screen is displayed and then I can't do power off (lens keep retracted), can't see any CHDK screen etc. Only removing battery help.
Because I often use text reader (to read debug info) it was extremely annoying bug.

Added in changeset 1405.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 10 / November / 2011, 15:58:41
One more small bugfix.

I do separate it from my big ubasic enhancement package by waterwingz request.

CHDK will hangup and then shutdown with retracted lens on some scripts (like Omni-Intervalometer) because wrong UnknownStatement processing. Below are two extremely simple examples when my S95 will hangup.

Code: [Select]
get_tv k

Code: [Select]
@title hang2a

  print "Grab property to LOG_".a
  print_screen a
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / November / 2011, 16:29:20
One more small bugfix.

I do separate it from my big ubasic enhancement package by waterwingz request.

CHDK will hangup and then shutdown with retracted lens on some scripts (like Omni-Intervalometer) because wrong UnknownStatement processing. Below are two extremely simple examples when my S95 will hangup.

Code: [Select]
get_tv k

Code: [Select]
@title hang2a

  print "Grab property to LOG_".a
  print_screen a

Added in changeset 1406.

Thanks for all these fixes - nice to have another active developer on the team :)

I haven't had time to look closely at the other ubasic and auto ISO changes. These will take more time to review and understand; but I haven't forgotten about them.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 10 / November / 2011, 17:54:34
I would like do not make conflict with my own big requests, so only small piece of planed interface changes below...
All the more small steps are integrated quickly.

1. Add comments to some data structure. Such comments are always helpfull and save time.
2. In my opinion CHDK interface require to be significatelly improved. One of issue is displaying many things when they have no sense. Small step to fix that - filemanager do not display some Raw operation when it surely anymore.
3. Another usability issue is non-intuitive control key sometimes. I was very surprised when found that to cancel filemanager popup menu I have to press 'Left'. I add much more reasonable 'Menu'.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / November / 2011, 18:57:39
I would like do not make conflict with my own big requests, so only small piece of planed interface changes below...
All the more small steps are integrated quickly.

1. Add comments to some data structure. Such comments are always helpfull and save time.
2. In my opinion CHDK interface require to be significatelly improved. One of issue is displaying many things when they have no sense. Small step to fix that - filemanager do not display some Raw operation when it surely anymore.
3. Another usability issue is non-intuitive control key sometimes. I was very surprised when found that to cancel filemanager popup menu I have to press 'Left'. I add much more reasonable 'Menu'.

Added in changeset 1407.

One suggestion, to maintain formatting compatibility with the current code can you set your editor to insert spaces instead of tabs and set the tab size to 4.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 12 / November / 2011, 11:00:20
Patch for IXUS65_SD630 to allow the use of alternate ALT button per http://chdk.setepontos.com/index.php?topic=7088 (http://chdk.setepontos.com/index.php?topic=7088)


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 12 / November / 2011, 17:07:09
Patch for IXUS65_SD630 to allow the use of alternate ALT button per http://chdk.setepontos.com/index.php?topic=7088 (http://chdk.setepontos.com/index.php?topic=7088)




Added in changeset 1411.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: sgtrum on 13 / November / 2011, 12:04:59
Patch to add sx150is 1.00a alpha port.  Patch created based on trunk rev 1414.


sgtrum
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 13 / November / 2011, 15:46:09
Patch to add sx150is 1.00a alpha port.  Patch created based on trunk rev 1414.


sgtrum

Added in changeset 1415.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 15 / November / 2011, 05:38:58
While big changes are on hold, try to go on with small interface improvements.

What patch contain:
1. Forgotten change to make item#3 of  1407changeset workable
2. Text reader become default action of filemanager (before filemanager just quit)
3. We return from text reader to filemanager, instead of menu. Much easier to press Menu once more, then select text reader again and browse through directory hierarcy in case if select wrong or would like to read something more (for me this is especially useful, because during development a lot of debug log files created and I don't wont remove card from camera to read it comfortable).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 15 / November / 2011, 07:54:23
Another small patch. It improve useful tool "incrementor".
We could change incrementor step using zoom (and on some camera disp) to rapid change current menu item value.

What is done:
1. Refresh on-screen correctly
2. Resolved collision with ERASE_GUARD
3. Use incrementor for enums (useful for Tv override for example + unificate chdk behaviour)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 16 / November / 2011, 15:49:19
While big changes are on hold, try to go on with small interface improvements.

What patch contain:
1. Forgotten change to make item#3 of  1407changeset workable
2. Text reader become default action of filemanager (before filemanager just quit)
3. We return from text reader to filemanager, instead of menu. Much easier to press Menu once more, then select text reader again and browse through directory hierarcy in case if select wrong or would like to read something more (for me this is especially useful, because during development a lot of debug log files created and I don't wont remove card from camera to read it comfortable).

Not sure about this one.
Some of my concerns are:

- Inconsistent U/I. If you enter the text reader from the 'Open New File', then when you leave you are put back in the file selector. When you enter the text reader from the 'Open Last Opened File', then when you leave you are back at the menu. The behaviour when leaving the text reader should be consistent.

- Having text reader specific code buried in the file selector is not a good practice (I know there is a lot of this in CHDK; but we should try and avoid adding more).

An alternative solution would be to use the 'conf.reader_file' string to set the starting folder in the file selector when you 'Open New File' in the text reader menu. At the moment it always defaults to A/CHDK/BOOKS?
Another improvement may be to pass the entire 'conf.reader_file' value and have the file selector automatically open the folder and highlight the previously used file (if it exists).

Phil.

Also, as suggested earlier, it would really help if you set your editor to insert spaces instead of tabs and set the tab size to 4, not 8.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 17 / November / 2011, 01:31:00
Not sure about this one.
Some of my concerns are:

- Inconsistent U/I. If you enter the text reader from the 'Open New File', then when you leave you are put back in the file selector. When you enter the text reader from the 'Open Last Opened File', then when you leave you are back at the menu. The behaviour when leaving the text reader should be consistent.
Consistence for me is that "Menu" works like Escape/Back. If we open through file selector - we go to it back, if we open directly from menu - we return back directly to menu.

Another thing which I implement - it will be possible in future to call scripts (such as editor) directly from fileselector. And no changes in script required. Script will call fselector inside, selector just immidiatelly will return selected file (because flagged that selector is already active). And on exit we again get back to file selector. But this will require some modification of script processing. I do plan it anyway on the way to my goal.

Quote
- Having text reader specific code buried in the file selector is not a good practice (I know there is a lot of this in CHDK; but we should try and avoid adding more).
What exactly piece of code do you mean? If you talking about two lines, where I add make default action, then it easily could be moved, Just do not call without parameter.
I just assign probably useful action for each case when action could be not specified (looks like this is one point for now)

Quote
Also, as suggested earlier, it would really help if you set your editor to insert spaces instead of tabs and set the tab size to 4, not 8.
I did. And I checked before sending. But probably something miss. Sorry.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 17 / November / 2011, 02:15:01
As interested in things related to an editor - it would be good, if context menu in file browser had an 'edit' item. It could be for example active for .txt, .lua and .bas files or for all files. I would find this very usefull. I edit scripts directly on-camera so often, so nowadays I need to press func, select an editor, then run it, select file to edit, edit this file and again press func to select apropriate script.

Having an 'edit' item in menu would simplify this procedure a liitle bit.

If file browser had more such usefull things it would be nice to have some shortcut to run it without going to go into menu. For example the 'erase' key is now useless and it could call file browser when in ALT mode (such as Func calls scripts menu).

Forgive me for the offtopic, it should be probably talked in some specific thread.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / November / 2011, 10:15:46
Patch for the G10 to fix issues with the set_zoom() command in LUA and uBASIC scripts.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / November / 2011, 19:24:26
Patch for the G10 to fix issues with the set_zoom() command in LUA and uBASIC scripts.
Added, changeset  1419 (http://tools.assembla.com/chdk/changeset/1419/trunk)
Note that the patch added redundant PROPCASE_DIGITAL_ZOOM_STATE and PROPCASE_DIGITAL_ZOOM_POSITION defines. The numeric values were the same, so I just put the comments on the existing defines.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / November / 2011, 19:41:17
Note that the patch added redundant PROPCASE_DIGITAL_ZOOM_STATE and PROPCASE_DIGITAL_ZOOM_POSITION defines. The numeric values were the same, so I just put the comments on the existing defines.
Thanks - I hate it when that happens.  I actually checked out each prop_case on the camera to make sure they were the right ones for propcase2.  Didn't notice the ones that were already defined I guess.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 21 / November / 2011, 22:37:41
Patch for all versions of IXUS120_SD940 to fix fl_tbl[] in main.c.   Entered actual values from exif data and corrected table length (now has 10 rather than 11 elements). 

Also changed stub for  SetScriptMode in all versions to reflect value recommended by new sig finder.

(Note: does not correct recent issue reported in forum thread http://chdk.setepontos.com/index.php?topic=7071 (http://chdk.setepontos.com/index.php?topic=7071) )
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 22 / November / 2011, 00:38:57
Patch for all versions of IXUS120_SD940 to fix fl_tbl[] in main.c.   Entered actual values from exif data and corrected table length (now has 10 rather than 11 elements). 

Also changed stub for  SetScriptMode in all versions to reflect value recommended by new sig finder.
Added, changeset 1421 (https://tools.assembla.com/chdk/changeset/1421) (broken link, assembla trac seems to be messed up...)

You might want to check the ZSETP_TABLE_SIZE / nTxtbl stuff in core/kbd.c for this camera, I'd guess it should be the same as ixus870
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 22 / November / 2011, 05:31:15
@reyalp
Quote
broken link, assembla trac seems to be messed up...

According to www.downforeveryoneorjustme.com/ (http://www.downforeveryoneorjustme.com), tools.assembla.com (http://tools.assembla.com) is down.
Seems to have happened after the release of rev. 1420

wim





 

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 22 / November / 2011, 08:42:55
Seems like almost all project on this site disappeared. Hopefully temporary... The only 'working' site on http://tools.assembla.com/ (http://tools.assembla.com/) i have found is http://tools.assembla.com/dai/ (http://tools.assembla.com/dai/) so the server is not really down but has some problems with serving sites.

I was searching for some kind of informations about this on Google but have not found anything. http://assembla.com/ (http://assembla.com/) works...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 22 / November / 2011, 09:15:35
Andy Singleton on Mon, Nov 21, 2011 @ 12:37 PM wrote on http://blog.assembla.com/ (http://blog.assembla.com/)
Quote
We are planning a release tomorrow 22 November, at 07:00 UTC.  We will make some changes to the database, so the server team has asked me to tell you that there may be up to 10 minutes downtime.  I will post notes about enhancements tomorrow.
Guess something went wrong ...

wim
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 22 / November / 2011, 09:48:20
This link is now ok: http://trac.assembla.com/chdk/browser/trunk (http://trac.assembla.com/chdk/browser/trunk)

This link is wrong: http://tools.assembla.com/chdk/browser/trunk (http://tools.assembla.com/chdk/browser/trunk)

Last checkin by reyalp: http://trac.assembla.com/chdk/changeset/1421/trunk (http://trac.assembla.com/chdk/changeset/1421/trunk)

I don't know if this is new, but CHDK-DE has been for some time this adress structure: http://trac.assembla.com/chdkde/browser/trunk (http://trac.assembla.com/chdkde/browser/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 22 / November / 2011, 10:08:54
You might want to check the ZSETP_TABLE_SIZE / nTxtbl stuff in core/kbd.c for this camera, I'd guess it should be the same as ixus870
I actually did take a look at that but decided not to change it just yet.   

I now have several hours invested in reformatting and commenting the USB remote code.  Documentation of how the code is supposed to work does not appear to exist (there is some SDM specific stuff to provide clues but its different code).   I even bought a Ricoh CA-1 online to do some testing.  Guess what - it doesn't work reliably with my cameras - but if you pound long enough on the button you can eventually get the shutter to fire.  And as several sections of that code are actually unreachable, I'm not even sure how much of  it actually works.  So  I'm going to wait until I have it figured out before changing anything related to ZSTEP_TABLE_SIZE and nTxtbl[]. 

I'd be willing to bet that most of the cameras listed in the first #ifdef of core/kbd.c were simply put there to get it to compile and are wrong.  Apparently remote zoom via USB is not a much used feature in CHDK (SDM may be different).

I plan to start a new forum thread on this shortly to discuss what the current code does,  who is using what and what we want to do with it.   So far, the best feedback I've had is from reyalp -  "Nuke it from orbit".


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 22 / November / 2011, 11:10:32
So far, the best feedback I've had is from reyalp -  "Nuke it from orbit".
  :P

Apparently remote zoom via USB is not a much used feature in CHDK (SDM may be different).
Remote zoom and features like this can (and IMO also should) be done completely from the script side, without any special code.
With the pulse length values from get_usb_power it's easy to handle different actions in a script, a typical application is a uC based "remote" unit like this one (http://forum.chdk-treff.de/viewtopic.php?t=649)...
There could be some pre-defined pulse schemes coded directly in the CHDK sources, but i'd prefer to publish script samples, e.g. for the Ricoh remote...

We should also make sure that all builds in CHDK & CHDKDE behaves the same way...

FWIW - i'm using the USB remote feature with the SX20, SD860 & SD400 with simple power-only remote and with some PICAXE based circuits...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 22 / November / 2011, 11:25:21
Remote zoom and features like this can (and IMO also should) be done completely from the script side, without any special code.
I tend to agree with the exception that having a simple "press to focus, release to shoot" mechanism that does not need a script seems to make sense for many users. Also, the CA1 and sync delay features would be hard to implement in a script - the timing is too tight.

Quote
We should also make sure that all builds in CHDK & CHDKDE behaves the same way...
Agreed.  But  I'll get a separate thread for this started shortly - let's not discuss it here.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / November / 2011, 15:37:10
Another small patch. It improve useful tool "incrementor".
We could change incrementor step using zoom (and on some camera disp) to rapid change current menu item value.

What is done:
1. Refresh on-screen correctly
2. Resolved collision with ERASE_GUARD
3. Use incrementor for enums (useful for Tv override for example + unificate chdk behaviour)

Thanks for this - I hadn't noticed the conflict with the screen erase detect.

I've added this as changeset 1422 with a small change - I moved the incrementor display into the menu title bar at the right end and moved the menu name to the left instead of centered. Also changed the displayed value for 1000 to 1K and 10000 to 10K to shorten the display.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / November / 2011, 21:42:26
While big changes are on hold, try to go on with small interface improvements.

What patch contain:
1. Forgotten change to make item#3 of  1407changeset workable
2. Text reader become default action of filemanager (before filemanager just quit)
3. We return from text reader to filemanager, instead of menu. Much easier to press Menu once more, then select text reader again and browse through directory hierarcy in case if select wrong or would like to read something more (for me this is especially useful, because during development a lot of debug log files created and I don't wont remove card from camera to read it comfortable).

Before implementing this, I've updated the file selector logic to be able to pass in the previous file name and it will then open with that file selected in the list (changeset 1423).

When you select 'Open New File' you will now be in the directory of the last read file with that file pre-selected.

Personally I still think that exiting the text reader should always take you back to the same place regardless of how you entered; but I'm open to it working either way. Perhaps a configuration option to allow you to exit the text reader to either the menu or file selector could be used.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 22 / November / 2011, 21:52:04
Personally I still think that exiting the text reader should always take you back to the same place regardless of how you entered; but I'm open to it working either way. Perhaps a configuration option to allow you to exit the text reader to either the menu or file selector could be used.

Gee phil - while you're at it,  how about fixing the "<- Back" menu item in the Script menu so that it works when you enter that menu via the Func/Set key rather than the Main Menu. :-X

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / November / 2011, 21:59:33

Gee phil - while you're at it,  how about fixing the "<- Back" menu item in the Script menu so that it works when you enter that menu via the Func/Set key rather than the Main Menu. :-X


Where should it go 'back' to?

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 22 / November / 2011, 22:01:21
Where should it go 'back' to?
The blank <ALT> screen it "came" from ?  Much like the second time you press the Menu key in <ALT> mode.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / November / 2011, 23:17:53
Where should it go 'back' to?
The blank <ALT> screen it "came" from ?  Much like the second time you press the Menu key in <ALT> mode.

Simple solution is in the gui_menu_back() function (gui_menu.c), if there is no parent menu to go back to then exit to <ALT> mode.

This has the side effect that the 'Disp' button will now exit from the main menu back to <ALT> mode as well (Disp is a shortcut for the 'Back' menu option).

Is this a reasonable solution?

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / November / 2011, 00:45:14
Is this a reasonable solution?
Sounds good to me.  Its obviously really not a big deal - just a minor annoyance that came to mind when you were commenting on the correct way to leave the file viewer.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 24 / November / 2011, 09:32:38
No real changes.
1. Just well documenting script.c module before its upcoming improvement
2. Minor renames ( conf.ubasic_vars -> conf.script_vars) to match name to usage.

Also some changes are produced because tab to space replacing.
Title: [Invalid]Please integrate first CHDK port for ixus220_elph300hs
Post by: tommi2water on 26 / November / 2011, 06:30:33
Update:
A new request for integration has been posted below.
--------------------------------------------------------------------------------------

I've set this request to OnHold until we have reached a better stage than only Alpha.  :D
As soon as I'm able to provide an improved version I will create a new request in this thread.

--------------------------------------------------------------------------------------
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 26 / November / 2011, 08:56:48
A while ago I complained about the memory dump debug function, here: http://chdk.setepontos.com/index.php?topic=7067.msg75696#msg75696 (http://chdk.setepontos.com/index.php?topic=7067.msg75696#msg75696) (also see reyalp's answer).

Attached is a patch which aims to correct it.

Another possibility to fix write() with NULL as source address would be this:

write(fd, (void*)0 | CAM_UNCACHED_BIT, 0x1900);

I'd also like to note that on at least the Ixus30/40 models, these addresses only work when specified as uncached. It's just a note, I don't think it will affect anyone else than me :)

CAM_RAM_SIZE_IN_MB would have to be corrected for cameras which have more or less RAM than 32MB - but that's only up to the interested developers.

I hope this is not unpolite, didn't want to open a thread for this.
Title: Please integrate first CHDK port for ixus220_elph300hs
Post by: tommi2water on 28 / November / 2011, 10:33:58
Dear Developers,

this is my request to add a first Beta version of CHDK port for ixus220_elph300hs camera with firmware version 1.00c/1.01a/1.01c (related thread: http://chdk.setepontos.com/index.php?topic=6341 (http://chdk.setepontos.com/index.php?topic=6341)).

I cleaned up my code and moved it to trunk revision 1432, built and tested it for firmware 1.00c. Binaries for firmware versions 1.01a and 1.01c have been tested by other developers and are also working fine for this first version (http://chdk.setepontos.com/index.php?topic=6341.210 (http://chdk.setepontos.com/index.php?topic=6341.210)).

SVN Patch (File: ixus220_elph300hs_20111128.zip) is attached to this post.
Update: If not yet integrated, please integrate Patch_ixus220_elph300hs_20111128_01.zip (instead of ixus220_elph300hs_20111128.zip). It contains one additional small change for each of the three firmware versions. Thank you!  :)

This first port of ixus220_elph300hs is based on trunk1432 of CHDK.

changes have been made to the following files/folders:
Code: [Select]
/core/gui.c // add support for ixus220_elph300hs
/core/kbd.c // add support for ixus220_elph300hs
/camera_list.csv // add BETA Status entry for ixus220_elph300hs
/loader/ // add new folder "ixus220_elph300hs" with loader files for ixus220_elph300hs
/platform/ // add new folder "ixus220_elph300hs" with platform files for ixus220_elph300hs Firmware 1.00c/1.01a/1.01c

Can you please integrate the patch into the subversion repository on assembla?

Firmware 1.00c for camera ixus220_elph300hs was taken from here:
http://www.box.com/shared/tscho3m30j/4/55272271/669226134 (http://www.box.com/shared/tscho3m30j/4/55272271/669226134)

Firmware 1.01a for camera ixus220_elph300hs was taken from here:
http://www.box.com/shared/tscho3m30j/4/55272271/881231820 (http://www.box.com/shared/tscho3m30j/4/55272271/881231820)

Firmware 1.01c for camera ixus220_elph300hs was taken from here:
http://www.box.com/shared/tscho3m30j/4/55272271/1165249041 (http://www.box.com/shared/tscho3m30j/4/55272271/1165249041)


Thanks in advance and best regards,
Tommi
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / November / 2011, 03:27:56
No real changes.
1. Just well documenting script.c module before its upcoming improvement
2. Minor renames ( conf.ubasic_vars -> conf.script_vars) to match name to usage.

Also some changes are produced because tab to space replacing.

Added in changeset 1437.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / November / 2011, 03:56:27
A while ago I complained about the memory dump debug function, here: http://chdk.setepontos.com/index.php?topic=7067.msg75696#msg75696 (http://chdk.setepontos.com/index.php?topic=7067.msg75696#msg75696) (also see reyalp's answer).

Attached is a patch which aims to correct it.

Another possibility to fix write() with NULL as source address would be this:

write(fd, (void*)0 | CAM_UNCACHED_BIT, 0x1900);

I'd also like to note that on at least the Ixus30/40 models, these addresses only work when specified as uncached. It's just a note, I don't think it will affect anyone else than me :)

CAM_RAM_SIZE_IN_MB would have to be corrected for cameras which have more or less RAM than 32MB - but that's only up to the interested developers.

I hope this is not unpolite, didn't want to open a thread for this.

Can I suggest a simpler approach:
Code: [Select]
        long val0 = *((long*)(0|CAM_UNCACHED_BIT));
        write(fd, &val0, 4);
        write(fd, (void*)4, MAXRAMADDR-3);   // MAXRAMADDR is last valid RAM location

No additional #defines in camera.h and the correct RAM size is already defined for many cameras.

Note: This requires an update to makefile.inc to change the default value of MAXRAMADDR from 0x200000 to 0x1FFFFFF (this will make it consistent with other usage).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / November / 2011, 04:08:29
Dear Developers,

this is my request to add a first Beta version of CHDK port for ixus220_elph300hs camera with firmware version 1.00c/1.01a/1.01c (related thread: http://chdk.setepontos.com/index.php?topic=6341 (http://chdk.setepontos.com/index.php?topic=6341)).


Added in changeset 1438.

Excellent effort by everyone involved!

Given the newness of the port and the open issues reported on the porting thread, I've added this as an ALPHA version for now.

Also I noticed the stubs_entry.S file is reporting a lot of errors in the modemap table for each firmware version.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tommi2water on 29 / November / 2011, 10:12:30
Thank you for integrating, Phil. Makes me feel good to know that our first version is now in a secure place.  :)

Then I can cleanup all old stuff from my harddisk and get current version from SVN for further activities.
Title: shooting.c.patch for subversion integration for ixus220_elph300hs platform
Post by: tommi2water on 30 / November / 2011, 14:24:01
Also I noticed the stubs_entry.S file is reporting a lot of errors in the modemap table for each firmware version.

Modemap table issues fixed by finding camera values via debug output. Values put into shooting.c file.

attached: shooting.c.patch for subversion integration for ixus220_elph300hs platform
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 30 / November / 2011, 15:06:11
Can I suggest a simpler approach:
Code: [Select]
        long val0 = *((long*)(0|CAM_UNCACHED_BIT));
        write(fd, &val0, 4);
        write(fd, (void*)4, MAXRAMADDR-3);   // MAXRAMADDR is last valid RAM location

No additional #defines in camera.h and the correct RAM size is already defined for many cameras.
Thanks, I haven't looked into makefile.inc, that's why I have missed this already existing #define.
Quote
Note: This requires an update to makefile.inc to change the default value of MAXRAMADDR from 0x200000 to 0x1FFFFFF (this will make it consistent with other usage).
I have attached a new patch with your suggested changes. The patch also defines MAXRAMADDR for two cameras that only have 16MB of RAM. I have tested this new version: it works on the A410, Ixus65, SX100IS.

I'd also like to request a "promotion" to beta for my A410 port. I got feedback (more or less) from 4 different users and the port doesn't currently have unsolved bugs I know about. I've developed it using the 1.00f firmware, two people reported success using it with their 1.00e revision camera. Patch also attached. Porting thread is here: http://chdk.setepontos.com/index.php?topic=2597.0 (http://chdk.setepontos.com/index.php?topic=2597.0)

Edit
@philmoz: Thanks.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / November / 2011, 21:55:35
Also I noticed the stubs_entry.S file is reporting a lot of errors in the modemap table for each firmware version.

Modemap table issues fixed by finding camera values via debug output. Values put into shooting.c file.

attached: shooting.c.patch for subversion integration for ixus220_elph300hs platform


Added in changeset 1440 (plus the IXUS 310 fix as well).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / November / 2011, 22:18:29
Can I suggest a simpler approach:
Code: [Select]
        long val0 = *((long*)(0|CAM_UNCACHED_BIT));
        write(fd, &val0, 4);
        write(fd, (void*)4, MAXRAMADDR-3);   // MAXRAMADDR is last valid RAM location

No additional #defines in camera.h and the correct RAM size is already defined for many cameras.
Thanks, I haven't looked into makefile.inc, that's why I have missed this already existing #define.
Quote
Note: This requires an update to makefile.inc to change the default value of MAXRAMADDR from 0x200000 to 0x1FFFFFF (this will make it consistent with other usage).
I have attached a new patch with your suggested changes. The patch also defines MAXRAMADDR for two cameras that only have 16MB of RAM. I have tested this new version: it works on the A410, Ixus65, SX100IS.

I'd also like to request a "promotion" to beta for my A410 port. I got feedback (more or less) from 4 different users and the port doesn't currently have unsolved bugs I know about. I've developed it using the 1.00f firmware, two people reported success using it with their 1.00e revision camera. Patch also attached. Porting thread is here: http://chdk.setepontos.com/index.php?topic=2597.0 (http://chdk.setepontos.com/index.php?topic=2597.0)

Added in changeset 1441.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: jstanley0 on 01 / December / 2011, 22:26:07
Attached a patch that fixes viewport dimensions for the IXUS 220 / ELPH 300 HS, and thus allows zebras and edge detection to work.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 01 / December / 2011, 23:36:49
Attached a patch that fixes viewport dimensions for the IXUS 220 / ELPH 300 HS, and thus allows zebras and edge detection to work.

Added in changeset 1443.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 02 / December / 2011, 17:29:16
Patch with infrastructure to call script.

1. Increase isolation of mpopup from fileselector. Different modules should have weak dependencies. In future popup could be used not only in fileselector.
2. Extend script.c with infrastructure to temporary scripts call. When I say "temporary script call" I mean that now it easy to call script from CHDK without any influence onto scripting config settings.
3. First integration sample to use that: integration lua script "editor" into fileselector (popup menu).
NOTE: To use this feature place editor script with version 2.5 or higher as "A/CHDK/SCRIPTS/EDITOR.LUA"

What else tasks could be extended by such scripts?
- Any modules linked with menu items. Sample: quick call of existed preconfigured script for photo needs, Additional modules like calendar, calculator. This will be used in future "extended user menu"
- Additional tasks in fileselector.
- Additional tasks required onscreen-keyboard. Such as rename file. Base on engine from editor script for that.

Of course scripts are limited by speed and features, but this will be solved by binary module system. This is enough for many possible needs.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 02 / December / 2011, 18:04:55
I haven't tried your patch yet, but I think that A/CHDK/SCRIPTS/EDITOR/ is a better place for the editor than directly in A/CHDK/SCRIPTS/ (that's only my opinion at the moment).

Also - I understand that now one can run editor directly from file selector for selected file? But editor script always run its own file browser instance - isn't this a conflict?

I believe that when one navigates in a file selector and use "edit" option for a selected file, the path to this file should be sent somehow to the script (as a parameter?). If that's true and I would know what's the name of this parameter I can modify the Edi to read this parameter and not run its own browser.

Also - other parameters could be sent into the script - such as user-defined newline encoding, console layout and so on...

---edit---

BTW - I'm going to work on on-camera grid editor, but have not enough time now. I need to finish my lua drawing first which are required. I guess, that this editor could be also run from file selector.

Runing special scripts from an file browser is a great idea, this could add new possibilities with low memory costs - all these stuff will stay on SD card as scripts and modules, not in the binary.

Text editor, calculator, calendar, games... doesn't this change the camera into the iPhone? :D
In iPhone the 'phone' function is only a minor feature. In CHDK-camera the shooting becomes minor function...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / December / 2011, 18:55:30
I haven't tried your patch yet, but I think that A/CHDK/SCRIPTS/EDITOR/ is a better place for the editor than directly in A/CHDK/SCRIPTS/ (that's only my opinion at the moment).
FYI - it seems there are issues with path length on some cameras. The simple scripts in A/CHDK/SCRIPTS/4pack/Lua do not run on some cameras unless copied to A/CHDK/SCRIPTS.  Your proposed editor path might be an issue too.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: jstanley0 on 02 / December / 2011, 22:33:48
Attached a patch that fixes the location of focus_busy and zoom_busy on ixus220/elph300, and thus fixes the ISO override crash.  (tested on 1.01a; probably the same across firmwares, since variables on either side didn't move)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / December / 2011, 23:41:33
Attached a patch that fixes the location of focus_busy and zoom_busy on ixus220/elph300, and thus fixes the ISO override crash.  (tested on 1.01a; probably the same across firmwares, since variables on either side didn't move)

Added in changeset 1445.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 03 / December / 2011, 02:05:02
Also - I understand that now one can run editor directly from file selector for selected file? But editor script always run its own file browser instance - isn't this a conflict?

No conflict exist. No changes are required.
Fselector doesn't exit internally when call editor, and so when LUA asks for file - selected file immediately returned. When script closed we return to fileselector back.
This solution have some limitation: default parameters used only, only one file could be selected (any fselect call from LUA return same file). This could be resolved, but for now this is enough.

BTW - I'm going to work on on-camera grid editor, but have not enough time now. I need to finish my lua drawing first which are required. I guess, that this editor could be also run from file selector.
Yes sure.
But pay attention to fact that current implementation of popup have hard limitation on num of possible variants of item: only 15 possible cases allowed and up to 10 visible at same time (to match into screen).
Title: ixus220_elph300hs_stubs_entry_cleanup.patch
Post by: tommi2water on 03 / December / 2011, 04:54:11
I cleaned up stubs_entry2.S files and of course this results in new generated versions of stubs_entry.S files.

Please find attached a patch with new versions of stubs_entry2.S and stubs_entry.S for firmware versions 100c, 101a and 101c for ixus220_elph300hs.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / December / 2011, 05:09:20
I cleaned up stubs_entry2.S files and of course this results in new generated versions of stubs_entry.S files.

Please find attached a patch with new versions of stubs_entry2.S and stubs_entry.S for firmware versions 100c, 101a and 101c for ixus220_elph300hs.


Added in changeset 1446.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tommi2water on 03 / December / 2011, 06:13:35
I cleaned up stubs_entry2.S files and of course this results in new generated versions of stubs_entry.S files.
...

Oh, additional changes I did for 100c I missed to do for 101a and 101c before providing patch. :(

Therefore please find attached another patch with missing change for 101a and 101c firmware. :)

Thanks to CHDKLover from german CHDK Forum for the hint!
Title: ixus220_elph300hs_remove_jogdial.patch
Post by: tommi2water on 03 / December / 2011, 09:01:59
Removed unnecessary functions/variable for JogDial from lib.c and kbd.c.

Please find attached the patch.



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / December / 2011, 16:21:56
I cleaned up stubs_entry2.S files and of course this results in new generated versions of stubs_entry.S files.
...

Oh, additional changes I did for 100c I missed to do for 101a and 101c before providing patch. :(

Therefore please find attached another patch with missing change for 101a and 101c firmware. :)

Thanks to CHDKLover from german CHDK Forum for the hint!

Removed unnecessary functions/variable for JogDial from lib.c and kbd.c.

Please find attached the patch.


Both added in changeset 1447.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 03 / December / 2011, 17:15:54
Here's a patch which makes drawing function available from Lua. More described here:
http://chdk.setepontos.com/index.php?topic=7097.0 (http://chdk.setepontos.com/index.php?topic=7097.0)

The zip contains also drawings.lua module which is going to be placed in LUALIB directory (I don't know how to add new file to the code through .patch file). This module enhances drawing from lua so it is intended to be added if patch will be applied.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / December / 2011, 17:35:56
Here's a patch which makes drawing function available from Lua. More described here:
http://chdk.setepontos.com/index.php?topic=7097.0 (http://chdk.setepontos.com/index.php?topic=7097.0)

The zip contains also drawings.lua module which is going to be placed in LUALIB directory (I don't know how to add new file to the code through .patch file). This module enhances drawing from lua so it is intended to be added if patch will be applied.

Can I suggest a small(ish) change.
Instead of using palette values for colors (which will make the scripts less portable), define a color map table in CHDK and use 'script' color values in your module.

In gui_draw.h there are defines for a limited set of colors for each camera - while the colors may not always be correct they are at least all there.

Define a table like
    unsigned char script_colors[] = { COLOR_TRANSPARENT, COLOR_BLACK, COLOR_WHITE, ... };
then your scripts can use the indexes into this array as portable color values.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 03 / December / 2011, 18:00:41
@philmoz - CHDK colors for drawing are good idea, I will follow it and prepate this. Nevertheless I believe that it would be good to give a user also possibility to use hex values. Maybe as: draw.colors_mode("chdk") which would be default and draw.colors_mode("hex") which would give the user possibility to use hex values directly (not portable).

The second way would be usefull for example for grid editor since grids are displayed by using hexs.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: vnd on 04 / December / 2011, 05:28:29
Remote trigger Ricoh CA-1 currently does not work with CHDK - the emulated half-press is released after 1s.
This is a fix ported from SDM.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 04 / December / 2011, 10:05:30
@Philmoz
I tried, but this is not a simple task. Defines are different in play and rec mode, I found that my sx130 defines are not really correct (as COLOR_SOMETHING, only COLO_HISTO... are ok). The whole thing about colors is so scary! Maybe it's time to start a project for new implementation of colors? All colors should have defines of play and rec values to be used. I guess that there's no other way.

At the moment I could use histogram values, which are defined for all cameras.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: jstanley0 on 04 / December / 2011, 10:07:48
Patch to enable manual focus (in AF lock mode) on IXUS220/ELPH 300 HS.  Can be enabled in other models via #define CAM_CAN_SD_OVER_IN_AF_LOCK 1 in platform_camera.h (assuming PROPCASE_AF_LOCK is defined for the model).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / December / 2011, 12:02:22
Remote trigger Ricoh CA-1 currently does not work with CHDK - the emulated half-press is released after 1s.
This is a fix ported from SDM.
Tested on my G10 and SD940.  The CA-1 works much better now - although it still refocuses between the half-press and full-press.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: jstanley0 on 04 / December / 2011, 20:38:01
From the ELPH 300 HS porting thread:


I changed the while loop to look like the SX30 etc. one:

Code: [Select]
while (zoom_busy) msleep(10);
... which fixed the problem for the IXUS 220 (allowing me to zoom all the way out in the lua script with no hang), and I suspect might fix the S95 too, although I can't test that.


This fix has been confirmed to work for the S95 as well; but I haven't got around to fixing the code.

Adding the msleep(10) to the default case loop should also be done in my opinion (infinite loops are not a good practice in my opinion).

Phil.

I've attached a diff that does this, which you can merge if you'd like.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 05 / December / 2011, 05:09:51
Remote trigger Ricoh CA-1 currently does not work with CHDK - the emulated half-press is released after 1s.
This is a fix ported from SDM.

Patch to enable manual focus (in AF lock mode) on IXUS220/ELPH 300 HS.  Can be enabled in other models via #define CAM_CAN_SD_OVER_IN_AF_LOCK 1 in platform_camera.h (assuming PROPCASE_AF_LOCK is defined for the model).

From the ELPH 300 HS porting thread:


I changed the while loop to look like the SX30 etc. one:

Code: [Select]
while (zoom_busy) msleep(10);
... which fixed the problem for the IXUS 220 (allowing me to zoom all the way out in the lua script with no hang), and I suspect might fix the S95 too, although I can't test that.


This fix has been confirmed to work for the S95 as well; but I haven't got around to fixing the code.

Adding the msleep(10) to the default case loop should also be done in my opinion (infinite loops are not a good practice in my opinion).

Phil.

I've attached a diff that does this, which you can merge if you'd like.

Added in changeset 1457.

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: jstanley0 on 05 / December / 2011, 07:56:58
Make the IXUS220 use the _PT_MoveOpticalZoomAt() path instead of _MoveZoomLensWithPoint(), since the latter does not notify the JPEG engine of the new focal length, causing incorrect lens distortion correction to be applied.

Example of the problem here (http://chdk.setepontos.com/index.php?topic=6341.msg77405#msg77405).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / December / 2011, 22:16:41
Patch to allow icon visibility to track the DISP key in playback mode (CHDK already has this option in shooting mode).

Forum thread : http://chdk.setepontos.com/index.php?topic=7201 (http://chdk.setepontos.com/index.php?topic=7201)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 06 / December / 2011, 18:38:45
@philmoz

I followed your suggestions, but I had to use almost only histogram-colors values, since they are defined for all cameras both in rec and play mode. Other colors as grey, yellow and others are not and might be confusing. So this is the best way I can implement this stuff. I hope that it doesn't add any mess to the CHDK and gives a few new possibilities. So - here's a zip with all these things.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: tsvstar on 07 / December / 2011, 01:28:29
Can you explain the steps to cause this in more detail please - I can't get the current editor or file selector to hangup in build 1457.

1. Set UserMenu=OnDire
2. Go to Alt mode
3. Run editor script and select file
4. Press ALT to go to None mode
5. Press ALT again. You go to User Menu but no one button works
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepa
Post by: philmoz on 07 / December / 2011, 03:34:01
Can you explain the steps to cause this in more detail please - I can't get the current editor or file selector to hangup in build 1457.

1. Set UserMenu=OnDire
2. Go to Alt mode
3. Run editor script and select file
4. Press ALT to go to None mode
5. Press ALT again. You go to User Menu but no one button works

Thanks for that - looks like it affects any script, not just the editor.
I've made a change in changeset 1459 that stops the user menu from being opened if a script was running.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: tsvstar on 09 / December / 2011, 08:46:34
In attachment fix for get_config_value()/set_config_value() for LUA.
It incorrectly works with fields different from simple int/color: OSD_pos, int array, strings.

Reason: 1)using of wrong defines when process values; 2) plain CONF list.

Test script:
Code: [Select]
print_screen(2)
show_osd=get_config_value(1);
conf_batt_volts_max=get_config_value(8);
ubasic_vars_table=get_config_value(5);
histo_pos1,histo_pos2=get_config_value(21);
conf_reader_file=get_config_value(38);

print("show_osd="..show_osd);
print(";conf_batt_volts_max="..conf_batt_volts_max);
print(";histo="..histo_pos1..","..histo_pos2);
print("conf_reader_file="..conf_reader_file);
print("ubasic_v"..ubasic_vars_table[1]);
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / December / 2011, 16:26:25
In attachment fix for get_config_value()/set_config_value() for LUA.
It incorrectly works with fields different from simple int/color: OSD_pos, int array, strings.

Reason: 1)using of wrong defines when process values; 2) plain CONF list.


Added in changeset 1462.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 12 / December / 2011, 21:04:19
Patch to allow the CHDK OSD to track the state of the DISP key (so they are basically only visible when the Canon icons are also visible). 

This already works in shooting mode - this patch enables it in playback and review modes.  It is controlled from the OSD menu items "Hide In ?" and "Show OSD in Review Mode".  Requires an update to each cameras platform_camera.h file to identify the two param values that give the DISP key status in those modes.

Code: [Select]
#define PARAM_CAMERA_NAME     4   // parameter number for GetParameterData
#define PARAM_DISPLAY_MODE1  57  // param number for LCD display mode when camera in playback
#define PARAM_DISPLAY_MODE2  58  // param number for LCD display mode when camera in record view hold mode

Discussion here : http://chdk.setepontos.com/index.php?topic=7201 (http://chdk.setepontos.com/index.php?topic=7201)

Reviewed with philmoz.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 13 / December / 2011, 00:10:57
Patch to move the scripts from the /CHDK/SCRIPTS/4Pack/lua & /CHDK/SCRIPTS/4Pack/uBasic directory to /CHDK/SCRIPTS.  This is suggested for two reasons.

1) DryOS R39 and later seem to have a path/file length limit of 32 characters so the current location causes every script but lua/hdr.lua to not load when selected.
2) The default /CHDK/SCRIPTS directory currently has no scripts in it (other than default.bas).  This change give new users some simple but useful scripts to try the first time they select the "Load Script from File ... " menu item.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / December / 2011, 02:39:22
Patch to allow the CHDK OSD to track the state of the DISP key (so they are basically only visible when the Canon icons are also visible). 


Patch to move the scripts from the /CHDK/SCRIPTS/4Pack/lua & /CHDK/SCRIPTS/4Pack/uBasic directory to /CHDK/SCRIPTS.


Added in changesets 1484 & 1485.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 21 / December / 2011, 17:44:06
Adds :

Code: [Select]
#define SCREEN_COLOR        0x15
to palette 2 in gui_draw.h
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 21 / December / 2011, 21:26:20
Adds :

Code: [Select]
#define SCREEN_COLOR        0x15
to palette 2 in gui_draw.h

Added in changeset 1496.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / January / 2012, 08:44:03
Simple one line patch to fix a long standing major bug for the IXUX120_SD940 firmware version 1.00e.

Recommended for both the release-1_0  branch and the main (unstable) trunk.

 Not sure how we are supposed to do that now so I'm posting it like this.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / January / 2012, 15:53:29
Simple one line patch to fix a long standing major bug for the IXUX120_SD940 firmware version 1.00e.

Recommended for both the release-1_0  branch and the main (unstable) trunk.

 Not sure how we are supposed to do that now so I'm posting it like this.
For bug fixes like this, just post a patch for one branch or the other, after it's applied to one we can merge over to the other as needed. If a fix impacts an area that has changed radically, then two equivalent patches might be needed, but most platform specific stuff should be pretty clear.

edit:
Added in release-1_0 changeset 1524 (http://trac.assembla.com/chdk/changeset/1524/branches/release-1_0) and trunk changeset 1525 (http://trac.assembla.com/chdk/changeset/1525/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / January / 2012, 21:53:30
Another little fix - this time the USB_MASK bit for the IXUS220 as per recent discussion on the forum.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / January / 2012, 23:05:33
Another little fix - this time the USB_MASK bit for the IXUS220 as per recent discussion on the forum.
Added release-1_0 changeset 1528 (http://trac.assembla.com/chdk/changeset/1528/branches/release-1_0) , trunk changeset 1529 (http://trac.assembla.com/chdk/changeset/1529/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Dave1116 on 07 / January / 2012, 12:13:00
I notice there is a new modules folder? in reyalp-flt.  Is this going to be usable shortly in the future
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Dave1116 on 07 / January / 2012, 12:14:35
I tried using the test draw lua but the files had to be in lualib for the draw test to work

Dave1116



a1100is,  sd1200is
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 07 / January / 2012, 16:40:32
I tried using the test draw lua but the files had to be in lualib for the draw test to work

I believe this is not the best place for this request. Could you post more descriptions in this thread:
http://chdk.setepontos.com/index.php?topic=7097.0 (http://chdk.setepontos.com/index.php?topic=7097.0)

Can you post the script you have used?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: stefantalpalaru on 08 / January / 2012, 12:41:18
Please add to trunk the IXUS 220HS 1.01G port described here:
http://chdk.setepontos.com/index.php?topic=6341.msg79508#msg79508 (http://chdk.setepontos.com/index.php?topic=6341.msg79508#msg79508)
along with the necessary line in camera_list.csv
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / January / 2012, 19:47:14
Please add to trunk the IXUS 220HS 1.01G port described here:
http://chdk.setepontos.com/index.php?topic=6341.msg79508#msg79508 (http://chdk.setepontos.com/index.php?topic=6341.msg79508#msg79508)
along with the necessary line in camera_list.csv
I think that the preferred method to submit a port here is to provide a patch file against the current svn.  Typically people use TortoiseSVN for compatability with the dev's systems.  You should probable also indicate if the port is to be considered alpha or beta status (somewhat arbitrary based on the amount of testing by different peope) and if it should be included in the autobuild server build for public use.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: stefantalpalaru on 09 / January / 2012, 05:34:53
Since this is a new firmware port, all the files are new. A patch would bring no extra info.
All the ports for this camera are alpha, so this is alpha too.

TortoiseSVN is just a GUI for SVN that only runs on Windows. I doubt that using it is somehow required.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 09 / January / 2012, 06:23:48
Since this is a new firmware port, all the files are new. A patch would bring no extra info.
All the ports for this camera are alpha, so this is alpha too.

TortoiseSVN is just a GUI for SVN that only runs on Windows. I doubt that using it is somehow required.

Make a patch file and all is good. ;)

For the maintainers it's easier when you provide a patch file. There are many ways to create patch files. Here is a comparison of svn clients: http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients (http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients)

Attached is a patch file against branch release1.0 - untested.

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 10 / January / 2012, 18:13:36
When I introduced my Lua drawings Phil said that it would be good to have the function that provides colors for lua a available for other parts of CHDK. Now I had some time so I decided to move color function and color array from luascript.c to gui_draw.c. This is the first change suggested in below patch.

Second change is to define several new #defines to make color usage more comfortable. I hope in future we could replace COLOR_XXX with these new COLOR_UNI_XXX.

I did it mostly because on my SX130IS COLOR_RED is not red and there is no way to define correct red in both rec and play mode. The same for green. Above functions allows us to do so in future.

I know, that for now it makes some mess since it adds new defines and we have more and more of them. But I believe that the next step should be to rename COLOR_ICON/HISTO_XXX_REC/PLY to simply COLOR_UNI_REC/PLY, put them on universal_colotr[] array and use in code only COLOR_UNI_XXX. It would give you mostly correct color on most of cameras! And would be much more simple.

This patch contains also minor changes in SX130 icon colors (for my pleasure:) ).

All suggestions would be welcome! If this will be more discussed I'll start separated thread.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / January / 2012, 18:48:40
When I introduced my Lua drawings Phil said that it would be good to have the function that provides colors for lua a available for other parts of CHDK. Now I had some time so I decided to move color function and color array from luascript.c to gui_draw.c. This is the first change suggested in below patch.

Second change is to define several new #defines to make color usage more comfortable. I hope in future we could replace COLOR_XXX with these new COLOR_UNI_XXX.

I did it mostly because on my SX130IS COLOR_RED is not red and there is no way to define correct red in both rec and play mode. The same for green. Above functions allows us to do so in future.

I know, that for now it makes some mess since it adds new defines and we have more and more of them. But I believe that the next step should be to rename COLOR_ICON/HISTO_XXX_REC/PLY to simply COLOR_UNI_REC/PLY, put them on universal_colotr[] array and use in code only COLOR_UNI_XXX. It would give you mostly correct color on most of cameras! And would be much more simple.

This patch contains also minor changes in SX130 icon colors (for my pleasure:) ).

All suggestions would be welcome! If this will be more discussed I'll start separated thread.

The problem with this approach is you now have two meanings for the color values numbered 0 - 17.

Color values are stored in the config file that can be overridden by the end user - these store two values (background and foreground color) as two bytes packed into a 16 bit value.

How will the system know whether a color value from 0 - 17 is a 'uni' color or a real palette color when it is loaded from the config file?

I think the CHDK 'uni' colors need to be values > 255; but this requires more changes in the CHDK code (increasing the color size from 8 to 16 bits will cause problems in the config files, plus all the hard wired code that assumes a color is stored in a byte).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 10 / January / 2012, 19:34:25
There is no two meaning. 0-17 values are just entries in an array. When they are put into uni_colors it just returns 0-255 usual value.

In compare about what we have now - there is a default color scheme (in the meaning - all things have their default colors). So for example for selected item is COLOR_RED which in one camera might mean 0xA0. But user can change it to whatevet 0-255 value, but then he's only responsible of which color he will have in which mode...

After this change default value would be COLOR_UNI_RED which in source would mean 'uni_color(3)', where value is predefined for each palette (like COLOR_RED now). And user can change it in whatever he want, just like now.

Remember, that all draw_xxx functions will still see 0-255 values. Is no matter, wheter this is predefined as COLOR_RED or it's returned by COLOR_UNI_RED which means the same as uni_color(3) :) The difference is that the value is not hard-written by preprocessor but it's run-time calculated.

However, I understand that some problems with config might appear. And this way I think that config should have 0-255 values as now.

Maybe it's better idea to try to work on this a little bit more and present version that can use config. I hope I'll do this in a way that will be compatible with current CCHDK.CONF. (However to not afraid of breaking the compatibility was one of the advantages of separate unstable 1.1 branch :))

Current patch does not break any compatibility (but I understand that if nothing will be done in future is a little bit useless...).

When I'll have some more results I'll start a separated thread. Or if you like to add some more suggestions or possible solutions please do this. I'm open to all discussions and like to just a little bit clean up complicated colors system in CHDK.

PS. Note that having this function we would not have to export all color defines for modules as it's now, but only uni_color() function!

EDIT

I made a small but important mistake in first sentence. There was written 'There is now two...' and should be 'There is no two...' - Now is correct...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / January / 2012, 19:57:00
There is no two meaning. 0-17 values are just entries in an array. When they are put into uni_colors it just returns 0-255 usual value.


An example of what I mean - in the current conf.c file the color config values are initialised from the COLOR_xxx values. You would not be able to initialise them from the COLOR_UNI_xxx values because the system has no way to know when the config file is loaded what type of color value it was.

One enhancement I am looking at is allowing modules to have their own config files, for example many of the zebra config files are only used by the zebra code in the module - having a zebra config file for these would simplify the core CHDK. However this would require the ability to initialise colors with constant values.

I suggest moving this to a new topic.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 13 / January / 2012, 20:59:37
Patch file to add mk11174's   A3300 1.00a    port as ALPHA build marked "SKIP_AUTOBUILD".

Captures this early release in the svn without releasing to the general public.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / January / 2012, 12:30:08
First patch file for v2 USB remote code.  Submitted now to prep the main dev trunk for pending changes.  Will not break existing builds.

This patch adds a #define REMOTE_SYNC_STATUS_LED variable to all platform_camera.h files.

If the release-1_0  camera blinked an LED in the routine wait_until_remote_button_is_released()  that LED's address will be used in v2 USB remote code to indicate the same thing.   This decouples the USB remote code from the debug_led() routine used in v1.

The variable is commented out if no LED blink was used in the original code.  It is available for implementation if requested.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / January / 2012, 16:37:05
Since this is a new firmware port, all the files are new. A patch would bring no extra info.
All the ports for this camera are alpha, so this is alpha too.

TortoiseSVN is just a GUI for SVN that only runs on Windows. I doubt that using it is somehow required.

Make a patch file and all is good. ;)

For the maintainers it's easier when you provide a patch file. There are many ways to create patch files. Here is a comparison of svn clients: http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients (http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients)

Attached is a patch file against branch release1.0 - untested.

msl

Added to release-1.0 (changeset 1547) and trunk (changeset 1548).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / January / 2012, 17:05:43
Patch file to add mk11174's   A3300 1.00a    port as ALPHA build marked "SKIP_AUTOBUILD".

Captures this early release in the svn without releasing to the general public.


Added to release-1.0 (changset 1551) and trunk (changeset 1552).

Trunk includes minor update to platform_camera.h and lib.c for new bitmap/screen size handling.

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / January / 2012, 19:25:49
First patch file for v2 USB remote code.  Submitted now to prep the main dev trunk for pending changes.  Will not break existing builds.

This patch adds a #define REMOTE_SYNC_STATUS_LED variable to all platform_camera.h files.

If the release-1_0  camera blinked an LED in the routine wait_until_remote_button_is_released()  that LED's address will be used in v2 USB remote code to indicate the same thing.   This decouples the USB remote code from the debug_led() routine used in v1.

The variable is commented out if no LED blink was used in the original code.  It is available for implementation if requested.
Added, trunk changeset 1555 (http://trac.assembla.com/chdk/changeset/1555/trunk).

I'm not entirely happy with putting this in camera.h, but doing it more cleanly probably requires a bigger cleanup of LED usage. Shouldn't be too hard to batch search/replace if we do that, so adding it for now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: velvethammer42 on 15 / January / 2012, 14:57:01
Patch file to add ixus230_elph310hs 1.00b  port as ALPHA build marked "SKIP_AUTOBUILD".

Captures this early release in the svn without releasing to the general public.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 15 / January / 2012, 21:00:26
Submitted for review - second patch file to complete new USB remote code first release.

Release notes at :  http://chdk.setepontos.com/index.php?topic=7127.msg79948#msg79948 (http://chdk.setepontos.com/index.php?topic=7127.msg79948#msg79948)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / January / 2012, 22:08:24
Patch file to add ixus230_elph310hs 1.00b  port as ALPHA build marked "SKIP_AUTOBUILD".

Captures this early release in the svn without releasing to the general public.

Added to the release-1.0 branch in changeset 1566, and main trunk in changeset 1567.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / January / 2012, 01:48:22
Submitted for review - second patch file to complete new USB remote code first release.

Release notes at :  http://chdk.setepontos.com/index.php?topic=7127.msg79948#msg79948 (http://chdk.setepontos.com/index.php?topic=7127.msg79948#msg79948)
Added, changeset 1568 (http://trac.assembla.com/chdk/changeset/1568/trunk). Further discussion in the above thread.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Lebeau on 16 / January / 2012, 15:19:21
Bonjour,

I am in progress to deliver new code for DNG, RAW, Motion detection and shot histogram.

First, I start with some C optimizations and minor corrections to test the delivery process.

Here is a patch file generated from CHDK shell's source tool "Diff" comparing with 1572 trunk.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 16 / January / 2012, 17:48:29
Small changes related to lang - new entries in polish.lng (and a few fixes).

Also - added RMDIR define to be used in fselect.c (for file deletion) and MORE used instead of hardcoded string. LANG_ITEMS incremented. This is for trunk, could be used in reyalp-flt also.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 16 / January / 2012, 20:06:56
Patch for the dev trunk to update the  ixus230 for the new USB remote functionality.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / January / 2012, 22:47:20
Patch for the dev trunk to update the  ixus230 for the new USB remote functionality.
Added, changeset 1573 (http://trac.assembla.com/chdk/changeset/1573)

Small changes related to lang - new entries in polish.lng (and a few fixes).

Also - added RMDIR define to be used in fselect.c (for file deletion) and MORE used instead of hardcoded string. LANG_ITEMS incremented. This is for trunk, could be used in reyalp-flt also.
Added, changeset 1574 (http://trac.assembla.com/chdk/changeset/1574)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / January / 2012, 23:23:50
I am in progress to deliver new code for DNG, RAW, Motion detection and shot histogram.
If you want to make significant changes, I'd suggest a thread to discuss them before posting here. Also, as I've mentioned before, I really prefer that unrelated changes be submitted in individual patches. If the changes are non-trivial, I will probably insist on this.
Quote
First, I start with some C optimizations and minor corrections to test the delivery process.
Did you check if these optimizations improve performance or binary size ?

I had a bit of a look through it, and most of the changes look like they will be insignificant.

Changing the for loops is unnecessary, modern compilers plenty smart to generate good code in the normal version:
Code: [Select]
0014b3cc <foo_old>:
  14b3cc: b510      push {r4, lr}
  14b3ce: 2400      movs r4, #0
  14b3d0: 1c20      adds r0, r4, #0
  14b3d2: 3401      adds r4, #1
  14b3d4: f7ff fff2 bl 14b3bc <bar>
  14b3d8: 2c0a      cmp r4, #10
  14b3da: d1f9      bne.n 14b3d0 <foo_old+0x4>
  14b3dc: bc10      pop {r4}
  14b3de: bc01      pop {r0}
  14b3e0: 4700      bx r0

0014b3e2 <foo_new>:
  14b3e2: b510      push {r4, lr}
  14b3e4: 240a      movs r4, #10
  14b3e6: 3c01      subs r4, #1
  14b3e8: 1c20      adds r0, r4, #0
  14b3ea: f7ff ffe7 bl 14b3bc <bar>
  14b3ee: 2c00      cmp r4, #0
  14b3f0: d1f9      bne.n 14b3e6 <foo_new+0x4>
  14b3f2: bc10      pop {r4}
  14b3f4: bc01      pop {r0}
  14b3f6: 4700      bx r0
One of these is for(i=0;i<10;i++) and the other is for(i=10;i--;)
Notice they are the exact same number of instructions, and the instructions are equivalent. In the old days, this might have been worthwhile...

Even if there was a marginal improvement, I'd rather not spend my time reviewing and apply stuff that doesn't make any significant difference. If it makes the code clearer or better structured, I'm certainly for that. If doing it in a lot of places makes the binary noticeably smaller, I could go for that too.

Also, the patch has a bunch of unrelated whitespace changes, which makes it a bit harder to follow. These are mostly from trailing whitespace which I'd be happy remove, but preferable in it's own changeset.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 17 / January / 2012, 00:55:58
Bonjour,

I am in progress to deliver new code for DNG, RAW, Motion detection and shot histogram.

First, I start with some C optimizations and minor corrections to test the delivery process.

Here is a patch file generated from CHDK shell's source tool "Diff" comparing with 1572 trunk.


In addition to reyalp's comments let me also add that your change of:
        for (i = num_stacks - 1; i >= 0; --i)
to:
        for (i = num_stacks; i--; )

is, in my opinion, poor programming practice and style.

In the first version it is obvious and transparent what the start and end conditions of the loop are.

In your version it appears at first glance that the starting value of 'i' in the loop is 'num_stacks', when in fact it is 'num_stacks-1'. The end condition also needs to be thought about to work out when the loop will exit.

The parts of the for loop syntax are start value, end condition, and value increment.

Having the end condition change the loop value as a side effect is not intuitive (and would fail code review in any development group I have worked in).

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 17 / January / 2012, 22:26:18
I've made some changes to the A430 port.
Most of the work was done like almost half a year ago, and it now conflicts(*) with waterwingz's work in the trunk.
This post (http://chdk.setepontos.com/index.php?topic=3785.msg80082#msg80082) explains the problems, I hope.
About testing: in the linked thread, I tried to convince Gerhard34 to do some testing, the results are incomplete at the moment.
The changes are:
- histogram, zebra display now correct for replay mode
- raw numbering fixed
- optical data copied from A460 (same 4x zoom optics), updated
- modemap corrected
- some corrections in capt_seq.c
- * most of kbd.c thrown out, the generic one is used
- usb sensing identified, working (for usb remote)
- other small fixes
- promotion to beta status
- * some initialization in the generic kbd.c (it proved to be enough for the A410, A430 for the ptp-script issue)

Patch in the above linked post, don't know whether this can be accepted now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / January / 2012, 00:14:38
fix to allow USB V2 remote debug display to not crash the dev trunk build  ( adds a startup delay to allow things to settle before hammering the LCD display).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / January / 2012, 00:32:41
fix to allow USB V2 remote debug display to not crash the dev trunk build  ( adds a startup delay to allow things to settle before hammering the LCD display).
Added, trunk changeset 1578 (http://trac.assembla.com/chdk/changeset/1578/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / January / 2012, 20:03:10
Update 3 to USB V2 remote code. 

1) Moves pulse counting into the core usb_remote_key() function that is hooked into my_kbd_read_keys().
2) Adds a usb remote mode for playback that scrolls displayed picture on one pulse, reverses direction on 2 pulses, sets direction left on 3 pulses,  sets direction right on 4 pulses.
3) Some small code cleanups (more needed).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / January / 2012, 22:36:04
My last patch post (above) did not "take" for some reason ??  So I did an svn revert & update, reapplied my original file and created a new patch file.  Changes are the same as listed above.  Let's hope it works this time.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / January / 2012, 22:52:58
My last patch post (above) did not "take" for some reason ??  So I did an svn revert & update, reapplied my original file and created a new patch file.  Changes are the same as listed above.  Let's hope it works this time.
Added changeset 1585 (http://trac.assembla.com/chdk/changeset/1585/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / January / 2012, 21:44:10
Patch #5 for USB remote V2.  Changes are :

1) Deleted stubs for future logic control modules that will probably never be implemented (gentWIRE, Script)
2) Changed script function get_usb_power for both Lua and uBasic to take a parameter 0 - 3.
    0 = return pulse width of most recent USB power-on time
    1 = return current USB state  ( 0=disconnected,  1=5V )
    2 = return buffered mark / space time of last eight switch activations ( one per call)
    3 = return pulse count of switch activations > 100 mSec  ( 500 mSec timeout )
    Change is backward compatible. 
    Note that previously uBasic supported mode 0 only,  Lua supported 0 or 1.
3) Cleaned up some unneeded parameter passing and commented out lines.
4) Fixed a typo that would not allow debug mode to build.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 21 / January / 2012, 02:58:38
Patch #5 for USB remote V2.
Added, changeset 1593 (http://trac.assembla.com/chdk/changeset/1593/trunk)
Quote
    Change is backward compatible. 
I think ubasic is not quite backward compatible.
b=get_usb_power
would be equivalent to mode 0, but now it's a syntax error unless you explicitly give it a number. To make the number optional, you'd have to do something like wait_click_statement()

(the TOKENIZER_ELSE is odd, but I guess it's so you can do if foo else ... ?)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 21 / January / 2012, 12:31:42


I think ubasic is not quite backward compatible.  b=get_usb_power would be equivalent to mode 0, but now it's a syntax error unless you explicitly give it a number.
Darn - tested that case for Lua,  missed it when testing uBasic.  Thanks for checking that for me.

Patch #6 for USB remote V2.  Changes are :

1) Modified get_usb_power for uBasic -  now act as if passed parameter = 0 if none is specified.
2) Deleted unnecessary input modules P.Width and P.Count. Values are maintained by usb_remote_key().
3) Changed code in remote_key() to only calculate USB remote information when conf.remote is true. (Can still get USB state though).
4) General clean-up of some hard coded constants using enums.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 21 / January / 2012, 19:26:38
Patch #6 for USB remote V2.
Added, trunk changeset 1596 (http://trac.assembla.com/chdk/changeset/1596/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 22 / January / 2012, 10:57:13
A possible solution to the problem with the A495 keyboard. This was merged 2 days ago into CHDK-DE, a tester in the German forum reported a preliminary success (no 100% report yet).
Bug fixed (it was experienced with CHDK-DE): camera crashed on startup when any script was set to autostart.
The four buttons really seem to be inverted. Idle value of physw_status[2] has already been reported here: http://chdk.setepontos.com/index.php?topic=5570.msg56110#msg56110 (http://chdk.setepontos.com/index.php?topic=5570.msg56110#msg56110) .

As the A490's kbd.c is identical, this change may also be useful there.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / January / 2012, 03:20:10
A possible solution to the problem with the A495 keyboard. This was merged 2 days ago into CHDK-DE, a tester in the German forum reported a preliminary success (no 100% report yet).
Bug fixed (it was experienced with CHDK-DE): camera crashed on startup when any script was set to autostart.
The four buttons really seem to be inverted. Idle value of physw_status[2] has already been reported here: http://chdk.setepontos.com/index.php?topic=5570.msg56110#msg56110 (http://chdk.setepontos.com/index.php?topic=5570.msg56110#msg56110) .

As the A490's kbd.c is identical, this change may also be useful there.


Thanks, very elegant solution.

Applied in changeset 1604 for both A495 and A490.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mk11174 on 27 / January / 2012, 13:36:21
Hi, I would like to apply this patch to the stable release-1 0 to update my a3300 port.

This is my first time doing this, but I think I did it correctly.

After creating my patch I reverted the release back so I could test the patch and everything went fine.

Thanks

Updated patch file with fixed hook raw address, and active area values, thanks to Phil!!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / January / 2012, 21:31:57
Patch #7 for USB Remote V2.   Changes are :

1) New & improved Ricoh CA-1 input module provided by vnd (http://chdk.setepontos.com/index.php?action=profile;u=15952).
2) High speed remote status debugging code provided by vnd (http://chdk.setepontos.com/index.php?action=profile;u=15952).  Available but currently disabled in this patch.
3) Modified pulse counting code so that logic modules get an identical but seperate pulse count from that provide to Lua and uBasic scripts. Avoids a potential race condition when scripts poll for pulse counts and logic modules are also using that value.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / January / 2012, 21:47:03
Hi, I would like to apply this patch to the stable release-1 0 to update my a3300 port.

This is my first time doing this, but I think I did it correctly.

After creating my patch I reverted the release back so I could test the patch and everything went fine.

Thanks

Updated patch file with fixed hook raw address, and active area values, thanks to Phil!!

Added in changeset 1617 to release-1.0 branch.

(Will do the main trunk soon.)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / January / 2012, 21:51:58
Patch #7 for USB Remote V2.   Changes are :

1) New & improved Ricoh CA-1 input module provided by vnd (http://chdk.setepontos.com/index.php?action=profile;u=15952).
2) High speed remote status debugging code provided by vnd (http://chdk.setepontos.com/index.php?action=profile;u=15952).  Available but currently disabled in this patch.
3) Modified pulse counting code so that logic modules get an identical but seperate pulse count from that provide to Lua and uBasic scripts. Avoids a potential race condition when scripts poll for pulse counts and logic modules are also using that value.


Added in changset 1618.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 29 / January / 2012, 22:51:06
A470 update for release 1.0
- extra long exposures implemented (all 3 fw revisions, tested on 1.02c)
- fixed the dark frame subtraction setting, bug mentioned here: http://chdk.setepontos.com/index.php?topic=3368.msg39071#msg39071 (http://chdk.setepontos.com/index.php?topic=3368.msg39071#msg39071) for all 3 revisions
- flash params table and params count fixed (I've verified the addresses manually, so all 3 rev. should be ok)
- defined CAM_STARTUP_CRASH_FILE_OPEN_FIX (previously camera crashed when "refresh" was issued in chdkptp GUI)
- also defined CAM_DETECT_SCREEN_ERASE
- strange check removed from kbd.c
- multiple corrections for 1.02c according to stubs_entry.S (can't be sure it would be ok for the other 2)
- debug code removed from capt_seq.c

A question: finsig_dryos reports different addresses for "rename" and "write". Is there a way to test which function is the correct one?


I would like to update the A430 too (I posted a patch here a while ago). If there's anything I should do differently, just tell me.

Thx.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / January / 2012, 00:19:09
A470 update for release 1.0
Thanks. Added in stable changeset 1625 (http://trac.assembla.com/chdk/changeset/1625/branches/release-1_0) and trunk changeset 1626 (http://trac.assembla.com/chdk/changeset/1626/trunk)
Quote
- multiple corrections for 1.02c according to stubs_entry.S (can't be sure it would be ok for the other 2)
If the sig finder values are correct on your cam then I'd say that's good enough to apply them to the other subs.
Quote
A question: finsig_dryos reports different addresses for "rename" and "write". Is there a way to test which function is the correct one?
If they work, then they are probably not wrong. The others might also work.

Quote
I would like to update the A430 too (I posted a patch here a while ago). If there's anything I should do differently, just tell me.
If we ignored a patch without comment, it probably just means we got distracted and missed it. Feel free to remind us. If you can update it for the current tree, that would make it easier to apply.

edit:
I added the patch from here http://chdk.setepontos.com/index.php?topic=3785.msg80082#msg80082 (http://chdk.setepontos.com/index.php?topic=3785.msg80082#msg80082) to the release branch in changeset 1627 (http://trac.assembla.com/chdk/changeset/1627/branches/release-1_0)

edit:
and trunk changeset 1628 (http://trac.assembla.com/chdk/changeset/1628/trunk). The kbd.c conflict seemed pretty straightforward, but it would be good if you can check. I just used the added a430 to the same ifdefs it used in the stable version of generic/kbd.c and used the a430/kbd.c from the release branch.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / January / 2012, 04:05:02
A question: finsig_dryos reports different addresses for "rename" and "write". Is there a way to test which function is the correct one?

The 'rename' and 'write' firmware functions aren't actually used anymore so it doesn't really matter.
There are a bunch of functions in the signature find process that aren't needed, just haven't found time to clean them up.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 30 / January / 2012, 21:07:35
@reyalp
Thanks, tested quickly both cameras, with success (trunk, 1.0).

@philmoz
Now I see, should have looked before. I thought CAM_STARTUP_CRASH_FILE_OPEN_FIX affected the whole set of (open, close, read, write, ...), but apparently it only affects open().
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mk11174 on 04 / February / 2012, 04:44:38
I would like to submit this patch for stable release 1_0 to add firmware 100c to my a3300 port. Thanks.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / February / 2012, 20:43:29
I would like to submit this patch for stable release 1_0 to add firmware 100c to my a3300 port. Thanks.

Added in changeset 1638.

Note, all A3300 versions are now included in the autobuild server (to align with CHDK-DE).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / February / 2012, 19:48:54
I've been experimenting with working only in Linux on CHDK.   So I took the liberty of using mland's  A800-100.c port to exercise the linux svn commands.   I've attached a patch file for the latest build for trunk rev 1650 - the dev trunk.  Its not a Windows TortoiseSVN file so I will be curious to see if its useful ?

http://chdk.setepontos.com/index.php?topic=7409.msg81169;topicseen#msg81169 (http://chdk.setepontos.com/index.php?topic=7409.msg81169;topicseen#msg81169)

The only change that I made from his zip file was to change the case of the sub directory from 100C to 100c.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / February / 2012, 12:28:35
Update for USB remote code in dev trunk.

1) Implements CHDK-DE feature that allows the current script to start based on a USB remote press (with addition of menu item to allow enable / disable of feature).

2) Adds a link from Remote Menu to Bracketing in Continuous Mode menu ( user convenience when using USB remote's continuous mode ).

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / February / 2012, 15:06:38
Update for USB remote code in dev trunk.
Added, changeset 1682 (http://trac.assembla.com/chdk/changeset/1682/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 23 / February / 2012, 19:26:29
The following is a cumulative patch for the ixus220hs / elph300hs.

- Should Could fix the USB-related E41 error, as reported by c10ud here (http://chdk.setepontos.com/index.php?topic=6341.msg81752#msg81752). It was probably caused by a typo in boot.c . (I had to hunt down the difference in the diff c10ud has provided but he deserves the credit for his work.) The patch restores a constant to its original value.

- Also fixes a problem for 1.01g that made movie recording impossible. It was a typo again, the patch restores a function address to its original value. This was tested by Fischauge in the German forum here (http://forum.chdk-treff.de/viewtopic.php?f=3&t=2657&p=24715#p24715).

edit: I'm no longer sure about the above fixing E41 as the Ixus220 and Ixus230 kbd.c's are a bit questionable at places...
Nevertheless, the patch does fix actual mistakes.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 24 / February / 2012, 05:38:55
The following is a cumulative patch for the ixus220hs / elph300hs.

- Should Could fix the USB-related E41 error, as reported by c10ud here (http://chdk.setepontos.com/index.php?topic=6341.msg81752#msg81752). It was probably caused by a typo in boot.c . (I had to hunt down the difference in the diff c10ud has provided but he deserves the credit for his work.) The patch restores a constant to its original value.

- Also fixes a problem for 1.01g that made movie recording impossible. It was a typo again, the patch restores a function address to its original value. This was tested by Fischauge in the German forum here (http://forum.chdk-treff.de/viewtopic.php?f=3&t=2657&p=24715#p24715).

edit: I'm no longer sure about the above fixing E41 as the Ixus220 and Ixus230 kbd.c's are a bit questionable at places...
Nevertheless, the patch does fix actual mistakes.

Added in revision 1688.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 24 / February / 2012, 19:27:50
Patch file 9 for USB remote v2 update.  Allows cameras with separate video button to activate filming via USB remote.

Thanks to msl for making this happen.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 24 / February / 2012, 20:24:08
Patch file 9 for USB remote v2 update.  Allows cameras with separate video button to activate filming via USB remote.

Thanks to msl for making this happen.

Added in revision 1694.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 25 / February / 2012, 13:06:40
Okay - here's another orphan camera that should go into the svn as an alpha - the sx210is.

Based on the latest code in the forum <link here> (http://chdk.setepontos.com/index.php?topic=5045.msg69449#msg69449), I got these to build against both trunks and have posted the executables to the porting thread to see if someone will test them.

There as a couple of funky things with this port.   

It wanted to create a propset5 but from the quick look I took,  it seemed that was mostly because it started as propset3 and changes were made that seemed to result in something a lot like propset4.  So I just changed it to use propset4.

I changed the stubs_entry_2.S file to not override addresses found by the new sig finder.  However,  there is something goofy going on with boot.c - several  ROM subroutine addresses were added manually to stubs_entry_2.S because they were not picked up during the compile process.  Some sort of address range issues ?

There are a few stubs_entry.S suggestions for different DEF() values.  Also,  several of the mode map values show up in stubs_entry.S as "not in current modemap".

Other than that, its a pristine port :)

Update : Deleted patch file for dev trunk as user testing says it does not run.  Updated patch for stable trunk to use propset3 rather than propset4 based on user testing.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / February / 2012, 15:37:42
It wanted to create a propset5 but from the quick look I took,  it seemed that was mostly because it started as propset3 and changes were made that seemed to result in something a lot like propset4.  So I just changed it to use propset4.
Being a dryos R43 camera, I'd expect it to be a propset3, but I suppose it's possible Canon changed mid stream (or the other R43 cams are wrong...)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 25 / February / 2012, 19:49:19
Fixes and enhancements for the A1000.
Tested on 1.00b by Nando in the German forum here (http://forum.chdk-treff.de/viewtopic.php?f=7&t=2645&p=24728#p24728).
My only real work on this was finding
enabled_refresh_physical_screen
and enabling
CAM_STARTUP_CRASH_FILE_OPEN_FIX (because of the startup failure)
all other values were already found by finsig_dryos.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 26 / February / 2012, 08:57:02
Hello!

Might I ask to unlock math.sqrt() function in Lua? I found it usefull in calculations between tv_96 and shutter time. Currently I have to do an ugly walk around... It requires changes in /lub/lua/lmathlib.c:


Forgive me that I don't attach patch, but I'm using mobile Internet and I've reached the limit for this month, so my Internet speed is to slooooow to attach anything... Even opening forum is a pain:)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / February / 2012, 15:01:32
Hello!

Might I ask to unlock math.sqrt() function in Lua?
Since lua numbers are integers in CHDK, I'm not sure how useful or correct this will be.

The tv96 etc values are APEX*96. I'd suggest doing all your exposure calculations in these units. See http://dougkerr.net/Pumpkin/#APEX (http://dougkerr.net/Pumpkin/#APEX) for an excellent description of APEX.

I think someone already wrote a pure lua library for conversions, but I haven't managed to find it. This would be a good candidate for a standard library if we can find or rewrite it.

http://chdk.setepontos.com/index.php?topic=5176.msg50316#msg50316 (http://chdk.setepontos.com/index.php?topic=5176.msg50316#msg50316) may be useful.

Note that we could expose apex2us (apex*96 to microseconds) in lua quite easily.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 08 / March / 2012, 23:10:45
Ixus220hs/Elph300hs: hiker_jon's confirmed addresses turned into a patch - affects recreview_hold and vid_get_viewport_fb_d(). See his posts from here on: http://chdk.setepontos.com/index.php?topic=6341.msg80886#msg80886 (http://chdk.setepontos.com/index.php?topic=6341.msg80886#msg80886)

I would also like to ask something: I tried to help imtheguy in the same thread by implementing dark frame subtraction control. I tried two possible locations for capt_seq_hook_set_nr, but reportedly neither works properly (stops working after some time  ???). Has anybody experienced something like this on a recent camera? CaptSeqTask's code seems correct, I don't know what could go wrong...

And finally: the patch in my previous post here hasn't been committed yet (A1000).
Thx.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / March / 2012, 01:10:08
Ixus220hs/Elph300hs: hiker_jon's confirmed addresses turned into a patch - affects recreview_hold and vid_get_viewport_fb_d().
release  changeset 1717 (http://trac.assembla.com/chdk/changeset/1717/branches/release-1_0)
Quote
And finally: the patch in my previous post here hasn't been committed yet (A1000).
release changeset 1716 (http://trac.assembla.com/chdk/changeset/1716/branches/release-1_0). Thanks for the reminder.

Both merged into trunk in changeset 1718 (http://trac.assembla.com/chdk/changeset/1718/trunk)
Quote
I would also like to ask something: I tried to help imtheguy in the same thread by implementing dark frame subtraction control. I tried two possible locations for capt_seq_hook_set_nr, but reportedly neither works properly (stops working after some time  ???). Has anybody experienced something like this on a recent camera? CaptSeqTask's code seems correct, I don't know what could go wrong...
No idea, the described behavior is very strange.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / March / 2012, 03:42:53
I've been experimenting with working only in Linux on CHDK.   So I took the liberty of using mland's  A800-100.c port to exercise the linux svn commands.   I've attached a patch file for the latest build for trunk rev 1650 - the dev trunk.  Its not a Windows TortoiseSVN file so I will be curious to see if its useful ?

http://chdk.setepontos.com/index.php?topic=7409.msg81169;topicseen#msg81169 (http://chdk.setepontos.com/index.php?topic=7409.msg81169;topicseen#msg81169)

The only change that I made from his zip file was to change the case of the sub directory from 100C to 100c.
Thanks.

Added to trunk, changeset 1723 (http://trac.assembla.com/chdk/changeset/1723/trunk). I'll look at doing the release branch later.

I only give this a brief look through, but I didn't see anything horribly wrong.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / March / 2012, 04:07:05
Okay - here's another orphan camera that should go into the svn as an alpha - the sx210is.

Based on the latest code in the forum <link here> (http://chdk.setepontos.com/index.php?topic=5045.msg69449#msg69449), I got these to build against both trunks and have posted the executables to the porting thread to see if someone will test them.

There as a couple of funky things with this port.   

It wanted to create a propset5 but from the quick look I took,  it seemed that was mostly because it started as propset3 and changes were made that seemed to result in something a lot like propset4.  So I just changed it to use propset4.

I changed the stubs_entry_2.S file to not override addresses found by the new sig finder.  However,  there is something goofy going on with boot.c - several  ROM subroutine addresses were added manually to stubs_entry_2.S because they were not picked up during the compile process.  Some sort of address range issues ?

There are a few stubs_entry.S suggestions for different DEF() values.  Also,  several of the mode map values show up in stubs_entry.S as "not in current modemap".

Other than that, its a pristine port :)

Update : Deleted patch file for dev trunk as user testing says it does not run.  Updated patch for stable trunk to use propset3 rather than propset4 based on user testing.

Added to release-1.0 in revision 1725.

Not sure what you want to do about the trunk version?

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / March / 2012, 06:45:51
Not sure what you want to do about the trunk version?
Give me a couple of days to see if I can "fix" the trunk version and get somebody to test it.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 11 / March / 2012, 11:52:25
I have a recommendation for the SX210 code: the camera's zoom lever has two speed steps, but only one of those is masked. I think this leads to undesired sideeffects.
So, in its platform kbd.c I'd change
Code: [Select]
#define KEYS_MASK1 (0x000FFC05)into
Code: [Select]
#define KEYS_MASK1 (0x000FFC0F)(for details, see the declaration of keymap[])

I have ported two of the ancient cameras (Ixus30, A420) a while ago, but haven't "forced" them into svn yet (lack of useful feedback). If there's interest, I could update their code and post here.
Is there a guide, what should be changed in a release 1.0 port for inclusion into trunk?

And another question: recently someone posted an updated S80 port. I don't see the source anywhere. Can someone politely ask for it :) ? (Yes, I could try myself, but I'm not always able to express myself clear enough, and don't even have that camera.)


Update: according to this (http://chdk.setepontos.com/index.php?topic=5045.msg82907#msg82907) post, the zoom lever does not interfere in ALT mode on the SX210.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / March / 2012, 12:14:34
I have a recommendation for the SX210 code: the camera's zoom lever has two speed steps, but only one of those is masked. I think this leads to undesired sideeffects.
So, in its platform kbd.c I'd change
Code: [Select]
#define KEYS_MASK1 (0x000FFC05)into
Code: [Select]
#define KEYS_MASK1 (0x000FFC0F)(for details, see the declaration of keymap[])
Is this tested ?  If so,  I could submit a patch (or you can - see below).

Quote
I have ported two of the ancient cameras (Ixus30, A420) a while ago, but haven't "forced" them into svn yet (lack of useful feedback). If there's interest, I could update their code and post here.
You might add a note about it here :
http://chdk.setepontos.com/index.php?topic=7716.msg81803#msg81803 (http://chdk.setepontos.com/index.php?topic=7716.msg81803#msg81803)

Quote
Is there a guide, what should be changed in a release 1.0 port for inclusion into trunk?
Generally,  if you can get it to build and it works,  then a patch file for the svn is the preferred method for submission.  If you are using Windows,  tortoise svn works really well here.  There are gui tools for linux as well but the command line is pretty simple.   What you need to do is  "svn co" (or checkout) the current stable trunk,  make the changes for the new camera ( one at a time preferrably),  make sure it builds and then use tortoise of the command line to make a patch file.

If you just want to zip your trunk and send it to me on box.net,  I'll do that for you when I get a moment.

Update :  I just realized you were really asking about converting a stable version to a dev / unstable version. Sorry.  :-[  I have not seen a guide.  AFAIK, there is one big thing and a couple of small things that change.  The small things are easy to pick up by just building it and fixing the errors.  The big thing is the platform/kbd.c file.  I can help there or you can puzzle it out by looking at other new kbd.c files from similiar cameras.

Quote
And another question: recently someone posted an updated S80 port. I don't see the source anywhere. Can someone politely ask for it :) ? (Yes, I could try myself, but I'm not always able to express myself clear enough, and don't even have that camera.)
Link ?


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / March / 2012, 12:56:22
Another new port - the A2100 fw 1.001a - by ac.n1bs.  Hopefully will not also become an orphan port.

Patch file for dev trunk made from this link :

http://chdk.setepontos.com/index.php?topic=7433.msg81924#msg81924 (http://chdk.setepontos.com/index.php?topic=7433.msg81924#msg81924)

Loads and runs  -  boot.c,  capt_seq.c completed - movie_rec.c stubbed out.  Modemap needs work.

Update :  added patch file for stable trunk (untested) - details about changes made in notes.txt file
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / March / 2012, 17:11:21
Updates for A800 - stable and dev versions.

1) Dev version change is to allow CHDK to exist in EXMEM (low memory problems without that).
2) Stable version is the dev version "back ported" to stable-1_0 trunk and tested by Qanthelas.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 11 / March / 2012, 17:29:03
Quote
I have a recommendation for the SX210 code
Is this tested ?
No. I did a similar fix for the SX200 recently (it caused even crashes there). I have found confirmation about the "two speed" zoom via a web search AND the kbd.c lines also suggest the same. I'll post a question about this in the porting thread.
Quote
or you can puzzle it out by looking at other new kbd.c files
I think I'll do that.
Will post about this into the "orphan" thread.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / March / 2012, 18:52:24
Another new port - the A2100 fw 1.001a - by ac.n1bs.  Hopefully will not also become an orphan port.

Patch file for dev trunk made from this link :

http://chdk.setepontos.com/index.php?topic=7433.msg81924#msg81924 (http://chdk.setepontos.com/index.php?topic=7433.msg81924#msg81924)

Loads and runs  -  boot.c,  capt_seq.c completed - movie_rec.c stubbed out.  Modemap needs work.

Update :  added patch file for stable trunk (untested) - details about changes made in notes.txt file
Updates for A800 - stable and dev versions.

1) Dev version change is to allow CHDK to exist in EXMEM (low memory problems without that).
2) Stable version is the dev version "back ported" to stable-1_0 trunk and tested by Qanthelas.


Added in revision 1726 (release-1.0) and 1727 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / March / 2012, 22:14:40
Its a slow news day around here today so here's something I've been meaning to do for a while : remove the Beta designation from the IXUS120 / SD940.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 15 / March / 2012, 19:54:46
A420 for both trunk and release 1.0
I decided to designate it "alpha" because:
- I'm the only one who tested it (the "beta" releases have been downloaded 50+ times)
- Got a weird crash while testing it (photo overrides) with the reyalp-ptp-live branch (romlog seems to indicate a kernel crash involving spytask). Couldn't reproduce it...
Otherwise it should be as functional as the A430 port.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / March / 2012, 00:32:08
Its a slow news day around here today so here's something I've been meaning to do for a while : remove the Beta designation from the IXUS120 / SD940.
Done, 1732 and 1733
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / March / 2012, 00:47:29
A420 for both trunk and release 1.0
I decided to designate it "alpha" because:
- I'm the only one who tested it (the "beta" releases have been downloaded 50+ times)
- Got a weird crash while testing it (photo overrides) with the reyalp-ptp-live branch (romlog seems to indicate a kernel crash involving spytask). Couldn't reproduce it...
Otherwise it should be as functional as the A430 port.
Thanks. Added in 1734,1735 and 1736.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 16 / March / 2012, 14:34:50
@reyalp: thx.

Small correction for the SX210IS, as reported by new123456 here (http://chdk.setepontos.com/index.php?topic=5045.msg65652#msg65652). This model has 14x zoom. Maybe that's the reason behind this flood  http://chdk.setepontos.com/index.php?topic=5045.msg82868#msg82868 (http://chdk.setepontos.com/index.php?topic=5045.msg82868#msg82868)  :)

Code: [Select]
Index: platform/sx210is/main.c
===================================================================
--- platform/sx210is/main.c (revision 1737)
+++ platform/sx210is/main.c (working copy)
@@ -41,7 +41,7 @@
   {  62,  16200},
   {  78,  22300},
   { 102,  35900},
-  { 125,  60000},
+  { 125,  70000},
 };
 #define NUM_FL (sizeof(fl_tbl)/sizeof(fl_tbl[0]))

And a small correction for SX10 1.00c: http://chdk.setepontos.com/index.php?topic=7831.msg82906#msg82906 (http://chdk.setepontos.com/index.php?topic=7831.msg82906#msg82906)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 16 / March / 2012, 22:33:37
@reyalp: thx.

Small correction for the SX210IS, as reported by new123456 here (http://chdk.setepontos.com/index.php?topic=5045.msg65652#msg65652). This model has 14x zoom. Maybe that's the reason behind this flood  http://chdk.setepontos.com/index.php?topic=5045.msg82868#msg82868 (http://chdk.setepontos.com/index.php?topic=5045.msg82868#msg82868)  :)

Code: [Select]
Index: platform/sx210is/main.c
===================================================================
--- platform/sx210is/main.c (revision 1737)
+++ platform/sx210is/main.c (working copy)
@@ -41,7 +41,7 @@
   {  62,  16200},
   {  78,  22300},
   { 102,  35900},
-  { 125,  60000},
+  { 125,  70000},
 };
 #define NUM_FL (sizeof(fl_tbl)/sizeof(fl_tbl[0]))

And a small correction for SX10 1.00c: http://chdk.setepontos.com/index.php?topic=7831.msg82906#msg82906 (http://chdk.setepontos.com/index.php?topic=7831.msg82906#msg82906)

Fixed these in revision 1739.

I added DNG_LENS_INFO for the SX210 so the signature finder will find the focus len table in the firmware, then used that in the main.c code.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 18 / March / 2012, 12:14:42
Croatian language for development and stable trunk.

Patches by waterwingz.
 
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 18 / March / 2012, 18:24:50
Croatian language for development and stable trunk.
Patches by waterwingz.
Done, #1749 (http://trac.assembla.com/chdk/changeset/1749/) and #1750 (http://trac.assembla.com/chdk/changeset/1750/).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 18 / March / 2012, 19:05:36
Change Summary : default motion detection scripts now loop back after each picture is taken.

By popular demand (well, at least two newbie questions ...)   I've modified the simple motion detection scripts to loop back and take pictures every time motion is detected.   Not sure if the two extra lines in each script might be considered bloat but I suggest we take that chance.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 22 / March / 2012, 22:53:50
Added.

FWIW, for stuff like this that's pretty much the same for both branches, it's fine to just post one patch. Applying it to one and then merging to the other keeps the history of what is both trees clearer, and is no more work. Where the affected code is actually significantly different (e.g. the usb remote/kbd stuff) having independent patches is useful.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 22 / March / 2012, 23:01:50
FWIW, for stuff like this that's pretty much the same for both branches, it's fine to just post one patch. Applying it to one and then merging to the other keeps the history of what is both trees clearer, and is no more work. Where the affected code is actually significantly different (e.g. the usb remote/kbd stuff) having independent patches is useful.
Wondered about that.  Especially as the two patch files turn out to be identical in my last post  :D

Is it better to post for the stable branch and let you merge to the other or visa-versa ?

Also, I guess ports to new cameras kind of sit on the side of needing both patch files ?



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 22 / March / 2012, 23:14:16
Is it better to post for the stable branch and let you merge to the other or visa-versa ?
Doesn't really matter, whichever one is most convenient for you.
Quote
Also, I guess ports to new cameras kind of sit on the side of needing both patch files ?
I guess so. Maybe you could split it up, so there was one common set of changes, plus a patch to clean up one or the other. Since the platform kbd.c files are new, you could just include both the files, and the rest should be pretty manageable. Don't know if any of this is worth the effort.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 22 / March / 2012, 23:18:10
Don't know if any of this is worth the effort.
I kind of thought the stable branch would freeze after it was forked off.  But the CHDK-DE and new cam stuff keeps creeping back in.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Bernd R on 27 / March / 2012, 06:26:41
Here is patch for ixus 1000 that enable real auto ISO and focus overwrite in AF lock. Please add to chdk source
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mwvent82 on 27 / March / 2012, 18:12:09
Patch to add IXUS 1000 102B firmware, please add to source

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 29 / March / 2012, 00:13:00
Small change to enable iris support on the Ixus200/SD980. Tested by hamfent: http://chdk.setepontos.com/index.php?topic=4335.msg83262#msg83262 (http://chdk.setepontos.com/index.php?topic=4335.msg83262#msg83262)

Code: [Select]
Index: platform/ixus200_sd980/platform_camera.h
===================================================================
--- platform/ixus200_sd980/platform_camera.h (revision 1773)
+++ platform/ixus200_sd980/platform_camera.h (working copy)
@@ -34,7 +34,6 @@
     #define CAM_VIDEO_QUALITY_ONLY          1
     #define CAM_BRACKETING                  1
     #undef  CAM_VIDEO_CONTROL
-    #undef  CAM_HAS_IRIS_DIAPHRAGM
     #define CAM_MULTIPART                   1
     #define CAM_HAS_JOGDIAL                 1
     #undef  CAM_USE_ZOOM_FOR_MF
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 29 / March / 2012, 07:05:17
Hi devs,

There appears to be a problem with trunk 1772

Hi dvip !

Although there's still many things out of whack in CHDK-Shell, this one definitely is an error in trunk 1772.

Try changing (in /CHDK/Makefile)
Quote
   cp $(topdir)/CHDK/$(LOGO) $(topdir)/CHDK/DATA/$(LOGO)
to
Quote
   mkdir -p  $(topdir)CHDK/DATA
   cp $(topdir)CHDK/$(LOGO) $(topdir)CHDK/DATA/$(LOGO)

Actually, this is 2 errors:
1) no '/' needed after $(topdir)
2) trying to write to a non-existant dir /CHDK/DATA

hope that helps,

wim

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / March / 2012, 03:51:43
Hi devs,

There appears to be a problem with trunk 1772


Should be fixed in revision 1774.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / March / 2012, 04:49:09
Patch to add IXUS 1000 102B firmware, please add to source



We need the firmware dump before committing to SVN (to make sure it all compiles correctly).
Can you provide a link to the firmware please.

Also this appears to be a patch for the main development (unstable) trunk, not the stable release-1.0 branch - is this correct?

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / March / 2012, 04:53:14
Here is patch for ixus 1000 that enable real auto ISO and focus overwrite in AF lock. Please add to chdk source

I've added the CAM_USE_ZOOM_FOR_MF and CAM_CAN_SD_OVER_IN_AF_LOCK change in revision 1775.

I've left the USE_REAL_AUTOISO and OVEREXP_COMPENSATE_OVERALL change out for two reasons:
- this would make the IXUS 1000 inconsistent with all other cameras and may result in confusion
- I think these should be run-time configuration settings for all cameras not compile time options

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / March / 2012, 05:04:51
Small change to enable iris support on the Ixus200/SD980. Tested by hamfent: http://chdk.setepontos.com/index.php?topic=4335.msg83262#msg83262 (http://chdk.setepontos.com/index.php?topic=4335.msg83262#msg83262)

Code: [Select]
Index: platform/ixus200_sd980/platform_camera.h
===================================================================
--- platform/ixus200_sd980/platform_camera.h (revision 1773)
+++ platform/ixus200_sd980/platform_camera.h (working copy)
@@ -34,7 +34,6 @@
     #define CAM_VIDEO_QUALITY_ONLY          1
     #define CAM_BRACKETING                  1
     #undef  CAM_VIDEO_CONTROL
-    #undef  CAM_HAS_IRIS_DIAPHRAGM
     #define CAM_MULTIPART                   1
     #define CAM_HAS_JOGDIAL                 1
     #undef  CAM_USE_ZOOM_FOR_MF

Added in revision 1777.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mwvent82 on 01 / April / 2012, 16:56:06
Patch to add IXUS 1000 102B firmware, please add to source



We need the firmware dump before committing to SVN (to make sure it all compiles correctly).
Can you provide a link to the firmware please.

Also this appears to be a patch for the main development (unstable) trunk, not the stable release-1.0 branch - is this correct?

Phil.

Hi Phil

Apologies, I haven't contributed here before so wasn't too sure of the process

Have popped the FW dump here
http://wattz.dyndns.org/chdk/IXUS1000_SD4500_102B.BIN (http://wattz.dyndns.org/chdk/IXUS1000_SD4500_102B.BIN)

This seems stable to me, I would like to add it to that if possible so others with my FW can benefit from CHDK as I have :D - I've zipped the contents of trunk\platform\ixus1000_sd4500\sub\102b here if its easier then using the .patch file
http://wattz.dyndns.org/chdk/102b.zip (http://wattz.dyndns.org/chdk/102b.zip)

Hope this is ok?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 02 / April / 2012, 01:24:56
Added the
  • IXUS 1000 / SD4500 1.02B
full 8MB dump (dumped with cBasic udumper) by mwvent82 from this forum post (http://chdk.setepontos.com/index.php?topic=650.msg83646#msg83646) to the box.net/chdk (http://www.box.net/chdk) repository.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 04 / April / 2012, 06:14:35
Patch for sx220 mentioned here http://chdk.setepontos.com/index.php?topic=6397.msg83320#msg83320 (http://chdk.setepontos.com/index.php?topic=6397.msg83320#msg83320). I didn't have a single crash related to that since.
Also a cleanup of stubs_min.S and a kbd.c key fix that caused unintentional key presses when rotating the jogdial really fast.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 04 / April / 2012, 13:32:42
chdk for s100: firmware versions 100d, 100e, 101a.
porting thread: http://chdk.setepontos.com/index.php?topic=7887.0 (http://chdk.setepontos.com/index.php?topic=7887.0)

There's still some todo (see platform/s100/notes.txt and/or any unknown bug that might come up as usual in software) but i think the build is ready for alpha or beta (i didn't test everything) :)

the attached patch is against svn-trunk
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / April / 2012, 19:09:36
Patch to add IXUS 1000 102B firmware, please add to source



We need the firmware dump before committing to SVN (to make sure it all compiles correctly).
Can you provide a link to the firmware please.

Also this appears to be a patch for the main development (unstable) trunk, not the stable release-1.0 branch - is this correct?

Phil.

Hi Phil

Apologies, I haven't contributed here before so wasn't too sure of the process

Have popped the FW dump here
http://wattz.dyndns.org/chdk/IXUS1000_SD4500_102B.BIN (http://wattz.dyndns.org/chdk/IXUS1000_SD4500_102B.BIN)

This seems stable to me, I would like to add it to that if possible so others with my FW can benefit from CHDK as I have :D - I've zipped the contents of trunk\platform\ixus1000_sd4500\sub\102b here if its easier then using the .patch file
http://wattz.dyndns.org/chdk/102b.zip (http://wattz.dyndns.org/chdk/102b.zip)

Hope this is ok?

Added in revision 1789.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / April / 2012, 19:13:48
Patch for sx220 mentioned here http://chdk.setepontos.com/index.php?topic=6397.msg83320#msg83320 (http://chdk.setepontos.com/index.php?topic=6397.msg83320#msg83320). I didn't have a single crash related to that since.
Also a cleanup of stubs_min.S and a kbd.c key fix that caused unintentional key presses when rotating the jogdial really fast.

Added in revision 1790 (trunk) and 1791 (release-1.0).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / April / 2012, 19:54:58
chdk for s100: firmware versions 100d, 100e, 101a.
porting thread: http://chdk.setepontos.com/index.php?topic=7887.0 (http://chdk.setepontos.com/index.php?topic=7887.0)

There's still some todo (see platform/s100/notes.txt and/or any unknown bug that might come up as usual in software) but i think the build is ready for alpha or beta (i didn't test everything) :)

the attached patch is against svn-trunk

Added in revision 1792 (as ALPHA versions).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / April / 2012, 21:10:19
Small patch to IXUS120_SD940 for both stable and dev versions.

Patch adds #undef CAM_HAS_ERASE_BUTTON to platform_camera.h so that User Menu editing works properly.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / April / 2012, 21:41:30
adds A800 1.00B f/w version. Also affects 1.00c version with directory where RAW/DNG files are stored.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / April / 2012, 06:45:42
Small patch to IXUS120_SD940 for both stable and dev versions.

Patch adds #undef CAM_HAS_ERASE_BUTTON to platform_camera.h so that User Menu editing works properly.

adds A800 1.00B f/w version. Also affects 1.00c version with directory where RAW/DNG files are stored.



Both added in revision 1793 (release-1.0) and 1794 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 23 / April / 2012, 17:10:40
A small patch to enable CAM_STARTUP_CRASH_FILE_OPEN_FIX for the G11, based on this report: http://chdk.setepontos.com/index.php?topic=8024.msg84630#msg84630 (http://chdk.setepontos.com/index.php?topic=8024.msg84630#msg84630) .
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 24 / April / 2012, 15:39:48
One line has to be changed in polish.lng. There was a bug with no-existing 'revision' line. Entry 107 should be as follow:

Code: [Select]
107 "Wersja CHDK: %s %s\nPoprawka:    %s\nData:        %s\nCzas:        %s\nAparat:      %s\nWersja FW:   %s\nKompilator:  %s"

BTW - the Revision entry shows value of '0' - what does this entry stand for?

EDIT: I'm talking about trunk version of CHDK, if this makes difference ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 24 / April / 2012, 17:55:40
A small patch to enable CAM_STARTUP_CRASH_FILE_OPEN_FIX for the G11, based on this report: http://chdk.setepontos.com/index.php?topic=8024.msg84630#msg84630 (http://chdk.setepontos.com/index.php?topic=8024.msg84630#msg84630) .

Added in revision 1825 (release-1.0) and 1826 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 24 / April / 2012, 18:01:36
One line has to be changed in polish.lng. There was a bug with no-existing 'revision' line. Entry 107 should be as follow:

Code: [Select]
107 "Wersja CHDK: %s %s\nPoprawka:    %s\nData:        %s\nCzas:        %s\nAparat:      %s\nWersja FW:   %s\nKompilator:  %s"

BTW - the Revision entry shows value of '0' - what does this entry stand for?

EDIT: I'm talking about trunk version of CHDK, if this makes difference ;)

Added in revision 1827.

The revision value is extracted from SVN. If you use CHDK-Shell or are building in a non-SVN directory it will be set to 0.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 26 / April / 2012, 10:54:03
chdk for ixus105_sd1300 firmware 100d only. see attachment for the patch.

This is completely untested since i do not own the camera anymore.

I ported the code from SDM (since Microfunguy ported it from my first chdk port and tested it extensively) to current chdk-trunk so it doesn't get lost and maybe it helps others (e.g. ixus107 port).

Since it compiles correctly and i trust finsig i added it as ALPHA, but feel free to remove it if you are not ok with it.

greets

edit: updated patch with platform_camera.h which i forgot in previous commit
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: funnel on 28 / April / 2012, 17:19:35
Added CAM_HAS_MOVIE_DIGEST_MODE to platform_camera.h.
Thanks.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 28 / April / 2012, 22:38:27
Added CAM_HAS_MOVIE_DIGEST_MODE to platform_camera.h.
Thanks.



Added in revision 1832.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 28 / April / 2012, 23:29:35
chdk for ixus105_sd1300 firmware 100d only. see attachment for the patch.

This is completely untested since i do not own the camera anymore.

I ported the code from SDM (since Microfunguy ported it from my first chdk port and tested it extensively) to current chdk-trunk so it doesn't get lost and maybe it helps others (e.g. ixus107 port).

Since it compiles correctly and i trust finsig i added it as ALPHA, but feel free to remove it if you are not ok with it.

greets

edit: updated patch with platform_camera.h which i forgot in previous commit
Thanks for doing this. I've checked into the trunk in changeset 1833 (http://trac.assembla.com/chdk/changeset/1833/trunk), with SKIP_AUTOBUILD set.

If someone with this camera can test confirm that it actually works to some extent, we could enable the autobuild. I'll post a binary in the development thread.

I was bit confused by the notes.txt, your post says it is untested, but the notes say somethings were tested. Also contradictory "some lua stuff" tested, and "load script = camera shutdown"  :-[
Anyway, I added a note that this is unfinished, and also that the modemap is incorrect.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 29 / April / 2012, 10:52:30
chdk for ixus105_sd1300 firmware 100d only. see attachment for the patch.

This is completely untested since i do not own the camera anymore.

I ported the code from SDM (since Microfunguy ported it from my first chdk port and tested it extensively) to current chdk-trunk so it doesn't get lost and maybe it helps others (e.g. ixus107 port).

Since it compiles correctly and i trust finsig i added it as ALPHA, but feel free to remove it if you are not ok with it.

greets

edit: updated patch with platform_camera.h which i forgot in previous commit
Thanks for doing this. I've checked into the trunk in changeset 1833 (http://trac.assembla.com/chdk/changeset/1833/trunk), with SKIP_AUTOBUILD set.

If someone with this camera can test confirm that it actually works to some extent, we could enable the autobuild. I'll post a binary in the development thread.

I was bit confused by the notes.txt, your post says it is untested, but the notes say somethings were tested. Also contradictory "some lua stuff" tested, and "load script = camera shutdown"  :-[
Anyway, I added a note that this is unfinished, and also that the modemap is incorrect.
I didn't check notes.txt, but i guess it will need a rewrite after someone tests chdk :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / May / 2012, 20:40:31
Patch to "fix" the jog dial direction in the G10  (stable & dev)  per this thread :

http://chdk.setepontos.com/index.php?topic=7889.msg85086#msg85086 (http://chdk.setepontos.com/index.php?topic=7889.msg85086#msg85086)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 07 / May / 2012, 05:57:47
some fixes for s100 (trunk) - thanks funnel and colon247
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 10 / May / 2012, 14:13:18
EXMEM support for sx200is
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: colon247 on 13 / May / 2012, 10:51:32
This patch is to update the palette to 7 so that all menus are clearly readable.

Thanks to waterwingz for preparing the patch file.

more info here:
http://chdk.setepontos.com/index.php?topic=7887.msg85396#msg85396 (http://chdk.setepontos.com/index.php?topic=7887.msg85396#msg85396)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 13 / May / 2012, 23:00:59
Patch to "fix" the jog dial direction in the G10  (stable & dev)  per this thread :
Forgot to post added in trunk changeset 1838 (http://trac.assembla.com/chdk/changeset/1831/trunk) and stable change 1841 (http://trac.assembla.com/chdk/changeset/1841/branches/release-1_0)

(the commit message says g12... oops!)

some fixes for s100 (trunk) - thanks funnel and colon247

Added in trunk changset 1850 (http://trac.assembla.com/chdk/changeset/1850/trunk)

This patch is to update the palette to 7 so that all menus are clearly readable.
Added in trunk changeset 1851 (http://trac.assembla.com/chdk/changeset/1851/trunk)

EXMEM support for sx200is
Added in trunk changeset 1852 (http://trac.assembla.com/chdk/changeset/1852/trunk) and stable changeset 1853 (http://trac.assembla.com/chdk/changeset/1853/branches/release-1_0)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 13 / May / 2012, 23:48:03
Forgot to post added in trunk changeset 1838 (http://trac.assembla.com/chdk/changeset/1831/trunk) and stable change 1841 (http://trac.assembla.com/chdk/changeset/1841/branches/release-1_0)
(the commit message says g12... oops!)
I noticed anyway and didn't care about the G12 reference. Thanks.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 17 / May / 2012, 23:27:22
sx200is SCREEN_COLOR changed (there was white background/text during playback mode).
Remove EdgeOverlay restrictions if CHDK in EXMEME.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 18 / May / 2012, 14:13:04
Some corrections for the Ixus65/SD630:
- usb remote made operational (trunk version only)
- various framebuffer and other addresses corrected (makes motion detection work)
Patches for rev. 1.0 and trunk attached.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 18 / May / 2012, 19:22:37
sx200is SCREEN_COLOR changed (there was white background/text during playback mode).
Remove EdgeOverlay restrictions if CHDK in EXMEME.

Added in revision 1858 (trunk) and 1859 (release-1.0).

Note I made the SCREEN_COLOR change specific to the SX200IS camera as palette 3 is also used for another camera.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 18 / May / 2012, 19:29:36
Some corrections for the Ixus65/SD630:
- usb remote made operational (trunk version only)
- various framebuffer and other addresses corrected (makes motion detection work)
Patches for rev. 1.0 and trunk attached.

Added in revisions 1860 (release-1.0) and 1861 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: TobiMarg on 22 / May / 2012, 06:00:05
Correction of the module inspector closing (added draw_restore()).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: TobiMarg on 22 / May / 2012, 06:32:27
Added "_" and "£" to the textbox.
Patch is here here (http://chdk.setepontos.com/index.php?topic=7272.msg85688#msg85688)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: asm1989 on 26 / May / 2012, 02:04:23
sx260 100b 100c stable version to be applyed into trunk please
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / May / 2012, 05:57:49
Correction of the module inspector closing (added draw_restore()).
Added "_" and "£" to the textbox.
Patch is here here (http://chdk.setepontos.com/index.php?topic=7272.msg85688#msg85688)

Both added in revision 1865 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / May / 2012, 19:29:23
sx260 100b 100c stable version to be applyed into trunk please

There are a couple of problems with this patch as it currently is:
- The definition and code for the 'mkdir' function in generic/wrappers.c has been changed. This will affect every other camera. If you need a different definition and code make it camera specific or add a new #define the camera.h & platform_camera.h to control it.
- The patch contains unrelated changes to the GPS code.
- The patch contains white space changes to files which make it hard to determine the exact code changes being made.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: asm1989 on 27 / May / 2012, 15:53:15
Phil, the mkdir maybe is best to use a define for this cam,

Gps stuff can be ignored since not tested or worked yet

spaces no clue, will check out
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 28 / May / 2012, 04:02:53
sx200is_100c
1. vid_bitmap_refresh() from ixus870_sd880, gives less flicker than original one.
2. custom palette (philmoz), so CAM_BITMAP_PALETTE changed from 3 to 13.
Now all missing colors are in place.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 31 / May / 2012, 01:18:14
sx200is_100c
1. vid_bitmap_refresh() from ixus870_sd880, gives less flicker than original one.
2. custom palette (philmoz), so CAM_BITMAP_PALETTE changed from 3 to 13.
Now all missing colors are in place.
Added in trunk changeset 1886 (http://trac.assembla.com/chdk/changeset/1886/trunk) release changeset 1888 (http://trac.assembla.com/chdk/changeset/1888/branches/release-1_0)

As phil noted here http://chdk.setepontos.com/index.php?topic=6231.msg85982#msg85982 (http://chdk.setepontos.com/index.php?topic=6231.msg85982#msg85982) we don't have a full firmware dump from this camera. If you can get one using the canon basic dumper http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper (http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper) that would be helpful.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 31 / May / 2012, 01:53:43
I copied my sx200is_100c dump here:
https://skydrive.live.com/redir?resid=67C21A0ED1F7A310!161&authkey=!ACChwRvupSTR7Uo (https://skydrive.live.com/redir?resid=67C21A0ED1F7A310!161&authkey=!ACChwRvupSTR7Uo)

Here comes last change - I switched from palette_buffer to palette_buffer_ptr, which can be found in disassembly.
For example, here are defs for d10_100a:
DEF(palette_buffer_ptr,               0x8494) // links to 0xxxxxxx, sub_FF9B4804
DEF(active_palette_buffer,            0x8D8C) // sub_FF9B4A20
DEF(palette_control,                  0x8D88) // sub_FF9B4A20
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 31 / May / 2012, 04:16:58
I copied my sx200is_100c dump here:
https://skydrive.live.com/redir?resid=67C21A0ED1F7A310!161&authkey=!ACChwRvupSTR7Uo (https://skydrive.live.com/redir?resid=67C21A0ED1F7A310!161&authkey=!ACChwRvupSTR7Uo)
Thanks.
Added the
  • SX200 1.00C
full 8MB dump (dumped with cBasic udumper) by ADamb from this forum post (http://chdk.setepontos.com/index.php?topic=650.msg86004#msg86004) to the box.net/chdk (http://www.box.net/chdk) repository.
Note: this 8MB full dump replaces the old 4MB one.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mastodon on 02 / June / 2012, 09:06:15
v1888 does not seem to work on my SX200. It shows only wellcome screen without CHDK, and after that black screen and does nothing. v1825 does work!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 02 / June / 2012, 09:49:03
v1888 does not seem to work on my SX200. It shows only wellcome screen without CHDK, and after that black screen and does nothing. v1825 does work!
I'd suspect
Code: [Select]
DEF(palette_buffer, 0x15B5A0)as MEMISOSTART is 0x12351C .
It's probably corrected in the above patch.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 02 / June / 2012, 14:55:09
Quote
v1888 does not seem to work on my SX200. It shows only wellcome screen without CHDK, and after that black screen and does nothing. v1825 does work!
I have these on my sx200is:
OPT_EXMEM_MALLOC=1
OPT_CHDK_IN_EXMEM=1
You should wait till last changes are committed to trunk (palette_buffer_ptr).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: TobiMarg on 02 / June / 2012, 16:06:29
Corrected connect 4 on 16:9 screens.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / June / 2012, 17:23:24
Here comes last change - I switched from palette_buffer to palette_buffer_ptr, which can be found in disassembly.
Thanks, added in trunkchangeset 1891 (http://trac.assembla.com/chdk/changeset/1891) release changeset 1892 (http://trac.assembla.com/chdk/changeset/1892)

@mastodon please let us know if the 1891 or later autobuild works.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / June / 2012, 21:11:02
Patch file to add firmware 1.00c to the IXUS200_SD980 code (installs and builds on stable & dev versions).

Also contains updates to the 1.01c & 1.01d firmware versions based on information in the latest stubs_entry.S files for those versions.

Firmware 1.00c tested by forum member SvobodaT (http://chdk.setepontos.com/index.php?action=profile;u=13394).  Updates to 1.01c & 1.01d are not tested but trivial.

Still needs testing to confirm that aperture_sizes_table[], shutter_speeds_table[], iso_table[], and modemap[] are correct.  (modemap[] is not)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / June / 2012, 21:31:18
Corrected connect 4 on 16:9 screens.

Added in revision 1897.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mastodon on 03 / June / 2012, 10:55:00
THANKS! v1892 works! And the menu did not ever flicker, like in the previous ones. AND the color of the startup screen seems to be more red, than before (v1825).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: kosy on 10 / June / 2012, 01:40:20
Here is a patch for the a3300 camera. I used diff with the -cbr options: c gives 3 lines of context, b ignores whitespace changes, and r recurses through the directories. I hope this is satisfactory.

Summary of changes:
1. Changed the default ALT key to PLAY
2. Implemented the ability to change the ALT key to FACE, DISP, or PLAY (ALT Menu/Miscellaneous Stuff/<ALT> Mode Button)
3. Changed location of where CHDK colors are stored to a safe area in the palette so Canon's messages display correctly.
4. Defined DISP as the RAW button -- this also has the effect of making the DISP button the key that triggers "ALT +/- debug action" (ALT/Menu/Miscellaneous Stuff/Debug Parameters/ALT +/- debug action)


Question: Wouldn't it be a good idea to change the message "ALT +/- debug action" to "ALT DISP debug action" so it is correct for THIS camera?

Thanks!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / June / 2012, 21:16:10
Patch file to add firmware 1.00c to the IXUS200_SD980 code (installs and builds on stable & dev versions).

Also contains updates to the 1.01c & 1.01d firmware versions based on information in the latest stubs_entry.S files for those versions.

Firmware 1.00c tested by forum member SvobodaT (http://chdk.setepontos.com/index.php?action=profile;u=13394).  Updates to 1.01c & 1.01d are not tested but trivial.

Still needs testing to confirm that aperture_sizes_table[], shutter_speeds_table[], iso_table[], and modemap[] are correct.  (modemap[] is not)


Added in revision 1907 (release-1.0) and 1909 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 16 / June / 2012, 10:46:05
Here is a patch for the a3300 camera. I used diff with the -cbr options: c gives 3 lines of context, b ignores whitespace changes, and r recurses through the directories. I hope this is satisfactory.
I notice that nobody has said anything about this?  I also noticed that nobody has added this to the trunk either.  So having submitted one or two patches myself I thought I'd add this note.

Typically,  the preferred method to prepare a patch file is to use the diff function integrated into the svn software (the version control software used to maintain the CHDK source code).  On Windows,  this is typical Tortouse SVN (http://tortoisesvn.net/).  On Linux machines there are svn command line tools.  There are also other packages (http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients) for both systems.
 
Patch files created in this format can then be feds directly into the the  Unix patch command (http://en.wikipedia.org/wiki/Patch_(Unix)) (or its Windows equivalent) to make all the changes automatically in the svn build tree.   This makes things a lot easier for the two or three people who actually take the time (and have write permission) to apply changes.  You can surely understand that they really don't have time to hand edit a long list of changes or wade through different patch file formats.

I tried to input your file into patch on my build machine but it was not immediately clear how to  use it as formatted.  It is clearly very different than the ones created using svn patch tools with the defaults settings.  So I'm wondering if you can create a patch file using svn tools instead as a way of getting this submission accepted?

Update :  turns out that I needed to use patch -p2 rather than patch -p0 but I also get the blob errors reyalp mentioned below.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / June / 2012, 17:03:38
Here is a patch for the a3300 camera. I used diff with the -cbr options: c gives 3 lines of context, b ignores whitespace changes, and r recurses through the directories. I hope this is satisfactory.
I notice that nobody has said anything about this?  I also noticed that nobody has added this to the trunk either. 
Things that can be applied easily without much thought tend to go in quickly. Things that aren't, get pushed to the back of the queue.

As waterwingz says, an svn diff is preferred. It is also preferable to remove extraneous changes (debug display, buildconf etc)

I'm looking at this one now. It applies with the appropriate -p, but there's quite a few rejects against the current release branch, so it will take me a bit to decide whether I can apply it.

edit:
The rejects turned out to be line ending issues, no big deal. However, there are some other questions so I haven't checked in. See comments on http://chdk.setepontos.com/index.php?topic=6972.msg86536#msg86536 (http://chdk.setepontos.com/index.php?topic=6972.msg86536#msg86536)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: kosy on 18 / June / 2012, 01:34:24
The rejects turned out to be line ending issues, no big deal. However, there are some other questions so I haven't checked in. See comments on http://chdk.setepontos.com/index.php?topic=6972.msg86536#msg86536 (http://chdk.setepontos.com/index.php?topic=6972.msg86536#msg86536)
Re the line endings issue -- is this due to the Windows habit of terminating lines with crlf versus *NIX's nl (new line)?

Currently I am using a bastardized system that's partly Windows (due to starting with CHDK-Shell) and Linux. I am working toward dropping the Windows part and then should be more UNIX-Linux compatible, at least as far as line endings are concerned. Will that resolve the line endings issues you were seeing?

Second question: I looked at some other patches and I thought they had been prepared by the gnu diff command with context enabled, so that's what I did. Doesn't svn also use the diff command?

Thanks!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 18 / June / 2012, 02:58:26
Re the line endings issue -- is this due to the Windows habit of terminating lines with crlf versus *NIX's nl (new line)?
Somewhere along the line. Most of the source has the svn eol-style property set to "native" which means it will be either lf or crlf depending on the system you checked out on... but if you edit and change the line endings, it's ignored as long as they are consistent within the file.
Quote
Currently I am using a bastardized system that's partly Windows (due to starting with CHDK-Shell) and Linux. I am working toward dropping the Windows part and then should be more UNIX-Linux compatible, at least as far as line endings are concerned. Will that resolve the line endings issues you were seeing?
If you do a fresh checkout under linux, then it should all be linux endings. If you intend to do much work in the source, I strongly suggest doing it inside an SVN working copy. Being able to update easily and diff your local modifications is really a big advantage.
Quote
Second question: I looked at some other patches and I thought they had been prepared by the gnu diff command with context enabled, so that's what I did. Doesn't svn also use the diff command?
svn has it's own diff command (and tortoise has 'create patch'), which produces output compatible with diff but also includes branch / revision information. If the patch is from SVN, I can apply it using tortoise which has a nice gui merge interface.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 18 / June / 2012, 23:53:18
Here is a patch for the a3300 camera.
Added per discussion in the other thread, release changeset 1922 (http://trac.assembla.com/chdk/changeset/1922/branches/release-1_0)
edit and trunk changeset 1923 (http://trac.assembla.com/chdk/changeset/1923/trunk)

Quote
Question: Wouldn't it be a good idea to change the message "ALT +/- debug action" to "ALT DISP debug action" so it is correct for THIS camera?
If we could insert the actual key name in a generic way, that would be nice, but I don't want an #ifdef for each camera.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 18 / June / 2012, 23:57:52
Question: Wouldn't it be a good idea to change the message "ALT +/- debug action" to "ALT DISP debug action" so it is correct for THIS camera?
If we could insert the actual key name in a generic way, that would be nice, but I don't want an #ifdef for each camera.

Don't we already have the #ifdefs in gui.c - the debug shortcut uses SHORTCUT_TOGGLE_RAW?
Converting this back to a button name would not be hard.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 19 / June / 2012, 06:16:09
fix build with edge overlay disabled, patch attached
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / June / 2012, 22:47:20
fix build with edge overlay disabled, patch attached
Thanks, added in trunk changeset 1927 (http://trac.assembla.com/chdk/changeset/1927)

Don't we already have the #ifdefs in gui.c - the debug shortcut uses SHORTCUT_TOGGLE_RAW?
The entire label comes from a lang string. Of course it could be fixed, but I don't want to expend much effort or introduce a bunch of cruft just for a label on a debug shortcut.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 21 / June / 2012, 13:52:10
In trunk changeset 1928 (http://trac.assembla.com/chdk/changeset/1928), I used find_eventproc to add GetVRAM*PixelsSize for all autobuild enabled vxworks cameras except for
a410
No such event procedures here, but the values exist of course. Attached patch adds the required functionality for liveview, seems to work (but it's sloooow, so the usability is next to zero  :D).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / June / 2012, 10:42:07
Two small patch files related to USB Remote usage in the dev / unstable trunk.

1) Patch file to allow USB remote buffered values to be cleared  (pulse widths, pulse counts, pulse seen) from a script or internal CHDK code.  (will update wiki once accepted)

2) Patch file to allow USB remote sync and sync delay have effect when using scripts to monitor the USB port and shooting functions.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / June / 2012, 10:45:17
Patch files to add user adjustable <ALT> key for the older cameras that use platform/generic/kbd.c    :

     a410   a420   a430   a530   a540   a610   a620
     a630   a640   a700   a710   ixus800_sd700


Stable & unstable trunk included.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / June / 2012, 17:59:46
Small cleanup for the G10 (stable and dev trunks).  Fixes the default mask for the user selectable <ALT> key.  Should not really affect anything unless the CCHDK.CFG file is missing - then it would be using the wrong mask by default.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / June / 2012, 19:02:28
Another apparently "orphan" port.    Converted from stable to dev trunk compatibility.  Builds but is not tested.

Submitted as "ALPHA" and tagged SKIP_AUTOBUILD.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / June / 2012, 19:47:15
Two small patch files related to USB Remote usage in the dev / unstable trunk.

1) Patch file to allow USB remote buffered values to be cleared  (pulse widths, pulse counts, pulse seen) from a script or internal CHDK code.  (will update wiki once accepted)

2) Patch file to allow USB remote sync and sync delay have effect when using scripts to monitor the USB port and shooting functions.

Patch files to add user adjustable <ALT> key for the older cameras that use platform/generic/kbd.c    :

     a410   a420   a430   a530   a540   a610   a620
     a630   a640   a700   a710   ixus800_sd700


Stable & unstable trunk included.

Small cleanup for the G10 (stable and dev trunks).  Fixes the default mask for the user selectable <ALT> key.  Should not really affect anything unless the CCHDK.CFG file is missing - then it would be using the wrong mask by default.


Another apparently "orphan" port.    Converted from stable to dev trunk compatibility.  Builds but is not tested.

Submitted as "ALPHA" and tagged SKIP_AUTOBUILD.

I've added all the trunk changes in revision 1933.

As we discussed on IRC the stable branch (release-1.0) is only getting bug fixes now.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / June / 2012, 20:11:09
As we discussed on IRC the stable branch (release-1.0) is only getting bug fixes now.
thanks philmoz  .. if someone wants the user selectable <ALT> for a stable branch camera that uses the platform/generic/kbd.c code ,  the patch file is still available as posted.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 24 / June / 2012, 02:50:29
No such event procedures here, but the values exist of course. Attached patch adds the required functionality for liveview, seems to work (but it's sloooow, so the usability is next to zero  :D).
Added in trunk changeset 1934 (http://trac.assembla.com/chdk/changeset/1934).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 25 / June / 2012, 18:35:31
Patch file to add f/w 1.00e to the ixus230_elph310hs port  (stable or dev trunk).

Based on code by mrks in this forum thread :

http://chdk.setepontos.com/index.php?topic=7149.msg86905#msg86905 (http://chdk.setepontos.com/index.php?topic=7149.msg86905#msg86905)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / June / 2012, 01:38:08
Patch file to add f/w 1.00e to the ixus230_elph310hs port  (stable or dev trunk).

Based on code by mrks in this forum thread :

http://chdk.setepontos.com/index.php?topic=7149.msg86905#msg86905 (http://chdk.setepontos.com/index.php?topic=7149.msg86905#msg86905)
Thanks. Added in trunk changeset 1936 (http://trac.assembla.com/chdk/changeset/1936) and release changeset 1937 (http://trac.assembla.com/chdk/changeset/1937)

Yeah, I know I said bugfixes only in the release branch, but I think backporting added subs for existing ports makes sense since it's trivial and has no impact outside of the sub.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 30 / June / 2012, 02:06:02
I've found a bug in the drawings.lua library in function get_params. There is:

Lines 83-84
Code: (lua) [Select]
    if SCREEN_DRAWINGS[n][1] == "r" then out[1]"rect" end
    if SCREEN_DRAWINGS[n][1] == "rf" then out[1]"rectf" end

There should be:
Code: (lua) [Select]
    if SCREEN_DRAWINGS[n][1] == "r" then out[1]="rect" end
    if SCREEN_DRAWINGS[n][1] == "rf" then out[1]="rectf" end

"=" sign missed.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / June / 2012, 03:04:48
I've found a bug in the drawings.lua library in function get_params. There is:

Lines 83-84
Code: (lua) [Select]
    if SCREEN_DRAWINGS[n][1] == "r" then out[1]"rect" end
    if SCREEN_DRAWINGS[n][1] == "rf" then out[1]"rectf" end

There should be:
Code: (lua) [Select]
    if SCREEN_DRAWINGS[n][1] == "r" then out[1]="rect" end
    if SCREEN_DRAWINGS[n][1] == "rf" then out[1]="rectf" end

"=" sign missed.

Added in revision 1942 (trunk) and 1943 (release-1.0).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 30 / June / 2012, 17:43:53
I would like to ask for some advice.

There are cameras that can not handle subject distance override except in AF lock (or movie mode). At the moment, two of these (ixus1000_sd4500, ixus220_elph300hs) use a special code path in core/shooting.c, which is selected by the CAM_CAN_SD_OVER_IN_AF_LOCK define.

short shooting_can_focus()
{
    int m=mode_get()&MODE_SHOOTING_MASK;
#if !CAM_CAN_SD_OVER_NOT_IN_MF && CAM_CAN_SD_OVERRIDE
#if CAM_CAN_SD_OVER_IN_AF_LOCK
    if (shooting_get_prop(PROPCASE_AF_LOCK))
        return 1;
    else if (!MODE_IS_VIDEO(m))
        return 0;

#elif CAM_HAS_VIDEO_BUTTON
   return shooting_get_common_focus_mode();
#endif
    return (shooting_get_common_focus_mode() || MODE_IS_VIDEO(m));
#elif !CAM_CAN_SD_OVERRIDE
    return MODE_IS_VIDEO(m);
#elif defined (CAMERA_ixus800_sd700)
    // TODO whats the reason for this ?!?
    return (shooting_get_zoom()<8) && (m!=MODE_AUTO) && (m!=MODE_SCN_UNDERWATER);
#else
    return 1;
#endif
}


The above function is used to check whether SD override is possible (AFAIK). The current code (without the green lines) doesn't prevent some cameras (A2200, Ixus850/SD800) from crashing even when CAM_CAN_SD_OVER_IN_AF_LOCK is defined.
The two green lines would be my additions, based on the report (http://chdk.setepontos.com/index.php?topic=8263.msg87088#msg87088) of an SD800 owner. (I'm unsure about the A2200, I haven't got the expected result from the test (see the previous posts) (http://chdk.setepontos.com/index.php?topic=6254.msg85723#msg85723)).
How should I / we deal with this situation? Create yet another codepath specific to the SD800, or modify CHDK behaviour when CAM_CAN_SD_OVER_IN_AF_LOCK is defined?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / June / 2012, 19:50:21
I would like to ask for some advice.

There are cameras that can not handle subject distance override except in AF lock (or movie mode). At the moment, two of these (ixus1000_sd4500, ixus220_elph300hs) use a special code path in core/shooting.c, which is selected by the CAM_CAN_SD_OVER_IN_AF_LOCK define.

short shooting_can_focus()
{
    int m=mode_get()&MODE_SHOOTING_MASK;
#if !CAM_CAN_SD_OVER_NOT_IN_MF && CAM_CAN_SD_OVERRIDE
#if CAM_CAN_SD_OVER_IN_AF_LOCK
    if (shooting_get_prop(PROPCASE_AF_LOCK))
        return 1;
    else if (!MODE_IS_VIDEO(m))
        return 0;

#elif CAM_HAS_VIDEO_BUTTON
   return shooting_get_common_focus_mode();
#endif
    return (shooting_get_common_focus_mode() || MODE_IS_VIDEO(m));
#elif !CAM_CAN_SD_OVERRIDE
    return MODE_IS_VIDEO(m);
#elif defined (CAMERA_ixus800_sd700)
    // TODO whats the reason for this ?!?
    return (shooting_get_zoom()<8) && (m!=MODE_AUTO) && (m!=MODE_SCN_UNDERWATER);
#else
    return 1;
#endif
}


The above function is used to check whether SD override is possible (AFAIK). The current code (without the green lines) doesn't prevent some cameras (A2200, Ixus850/SD800) from crashing even when CAM_CAN_SD_OVER_IN_AF_LOCK is defined.
The two green lines would be my additions, based on the report (http://chdk.setepontos.com/index.php?topic=8263.msg87088#msg87088) of an SD800 owner. (I'm unsure about the A2200, I haven't got the expected result from the test (see the previous posts) (http://chdk.setepontos.com/index.php?topic=6254.msg85723#msg85723)).
How should I / we deal with this situation? Create yet another codepath specific to the SD800, or modify CHDK behaviour when CAM_CAN_SD_OVER_IN_AF_LOCK is defined?

Seems related to this thread - http://chdk.setepontos.com/index.php?topic=8056.msg84750#msg84750. (http://chdk.setepontos.com/index.php?topic=8056.msg84750#msg84750.)

The three lines after your green lines were added to fix a similar problem with cameras that have a dedicated video button.

I'm not sure whether your change would have side effects for other cameras though.
To be safe you should probably wrap them in a new #define and add that to your affected cameras.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 30 / June / 2012, 22:16:54
To be safe you should probably wrap them in a new #define and add that to your affected cameras.
Thanks, I'll do that.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 03 / July / 2012, 10:36:02
Here (http://chdk.setepontos.com/index.php?topic=8263.msg87136#msg87136)'s my updated patch to prevent the possibility of a SD override related crash on the Ixus850/SD800. I think this code will need some cleanup in the future - but that would require tests on cameras none of the current developers have...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / July / 2012, 13:25:22
Patch file to add the ixus115_elph100hs alpha7 source to the dev trunk. 

This version recovered from alpha5 version in forum thread http://chdk.setepontos.com/index.php?topic=6751.msg78653#msg78653. (http://chdk.setepontos.com/index.php?topic=6751.msg78653#msg78653.) 

Submitted as ALPHA - SKIP_AUTOBUILD so the code does not get "lost" again.   Tested on camera - it boots and runs.  However, there are problems with RAW and with shooting commands in scripts,  all noted in the forum thread given above.

Update :   not worth adding yet - found and fixed several fundamental problem.  New patch file to follow.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 06 / July / 2012, 22:31:36
EnterTo/ExitFromCompensationEVF correction for A450 :)
The functions are correctly found by finsig, but were overridden - with a nasty typo (?). Applies to both trunk and 1.0 .
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 06 / July / 2012, 22:42:38
EnterTo/ExitFromCompensationEVF correction for A450 :)
The functions are correctly found by finsig, but were overridden - with a nasty typo (?). Applies to both trunk and 1.0 .
Added, trunk changeset 1956 (http://trac.assembla.com/chdk/changeset/1956/trunk) release changeset 1957 (http://trac.assembla.com/chdk/changeset/1957/branches/release-1_0)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: TobiMarg on 07 / July / 2012, 12:56:55
Attached is a patch, that adds a few features to Snake:
More info's here (http://chdk.setepontos.com/index.php?topic=7526)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: TobiMarg on 07 / July / 2012, 14:54:15
I've found an error in the text box. Attached is an image that shows the problem (the black part at the bottom (transparent) should be grey) and an patch to fix it.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 09 / July / 2012, 09:30:33
Patch to add user configurable ALT key  (Display or Playback keys) to the IXUS120-SD940  (dev trunk).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 09 / July / 2012, 22:03:23
Two small patches to correct what I believe is an incorrect cut&paste of code from the IXUS120 kbd.c file to the IXUS220 and IXUS230.

The code in the IXU120 uses a counter variable (altDownTimer) in the routine my_kbd_read_keys() to time how long the DISP button is held down.  This allows the DISP key on a CHDK equiped IXUS120 to have three functions :
The code supplements  the "short press / long press" logic implemented in core/kbd.c that lets a short press start <ALT> mode and a longer press give the original key functionality.

The IXUS120 code is copied almost exactly to the kbd.c files for the IXUS220 & IXUS230.   According to the comments,  the author(s) apparently believed its purpose was to provide the "short press/long press" logic that is actually handled by core/kbd.c.     However,  the code cannot provide that functionality (or the three state logic given to the IXUS120) because it is implemented to use the wrong physw_status entry - i.e. :

Code: [Select]
physw_status[0] &= ~alt_mode_key_mask;  // press the VIDEO button
rather than

Code: [Select]
physw_status[2] &= ~alt_mode_key_mask;  // press the VIDEO button
The patch file(s) delete the unnecessary logic and prevent the code from writing to the wrong physw_status register with possible unpredictable results.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / July / 2012, 00:59:45
Patch to add user configurable ALT key  (Display or Playback keys) to the IXUS120-SD940  (dev trunk).
Added, trunk changeset 1968 (http://trac.assembla.com/chdk/changeset/1968)

I've found an error in the text box. Attached is an image that shows the problem (the black part at the bottom (transparent) should be grey) and an patch to fix it.
Added, trunk  changeset 1969 (http://trac.assembla.com/chdk/changeset/1969)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / July / 2012, 23:42:39
Two small patches to correct what I believe is an incorrect cut&paste of code from the IXUS120 kbd.c file to the IXUS220 and IXUS230.
Added in trunk changeset 1972 (http://trac.assembla.com/chdk/changeset/1972/trunk) release changeset 1973 (http://trac.assembla.com/chdk/changeset/1973/branches/release-1_0)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / July / 2012, 23:31:18
Submitted :  a patch file to add the IXUS115_ELPH100HS  fw  1.00c, 1.01a, 1.01b&1.01c  to the dev trunk & autobuild.

Based on alpha5 port by Just.J posted here : http://chdk.setepontos.com/index.php?topic=6751.msg78653#msg78653 (http://chdk.setepontos.com/index.php?topic=6751.msg78653#msg78653) 

Testing progress can be read in that thread.

Thanks to dnw (http://chdk.setepontos.com/index.php?action=profile;u=1178) for his patient testing,  for working through all the little details necessary to complete the main.c and shooting.c files and well as his time spent getting the keymap values right. And finally,  for confirming that the build works with the the validation scripts posted here : http://chdk.wikia.com/wiki/Testing (http://chdk.wikia.com/wiki/Testing)

Also props to RueLue and siak for testing each alpha release and reporting results in the forum.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 12 / July / 2012, 01:05:32
Submitted :  a patch file to add the IXUS115_ELPH100HS  fw  1.00c, 1.01a, 1.01b&1.01c  to the dev trunk & autobuild.

Based on alpha5 port by Just.J posted here : http://chdk.setepontos.com/index.php?topic=6751.msg78653#msg78653 (http://chdk.setepontos.com/index.php?topic=6751.msg78653#msg78653) 

Testing progress can be read in that thread.

Thanks to dnw (http://chdk.setepontos.com/index.php?action=profile;u=1178) for his patient testing,  for working through all the little details necessary to complete the main.c and shooting.c files and well as his time spent getting the keymap values right. And finally,  for confirming that the build works with the the validation scripts posted here : http://chdk.wikia.com/wiki/Testing (http://chdk.wikia.com/wiki/Testing)

Also props to RueLue and siak for testing each alpha release and reporting results in the forum.
Added, trunk changeset 1977 (http://trac.assembla.com/chdk/changeset/1977)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 12 / July / 2012, 23:19:38
ixus115_elph100hs : A small cleanup patch file to fix something left over from the debugging phase - the CAM_EMUL_KEYPRESS_DELAY value was set to approx 2 seconds rather than the default 0.4 seconds (as noted here : http://chdk.setepontos.com/index.php?topic=6751.msg87736#msg87736 (http://chdk.setepontos.com/index.php?topic=6751.msg87736#msg87736) )
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 13 / July / 2012, 23:26:23
ixus115_elph100hs : A small cleanup patch file to fix something left over from the debugging phase - the CAM_EMUL_KEYPRESS_DELAY value was set to approx 2 seconds rather than the default 0.4 seconds (as noted here : http://chdk.setepontos.com/index.php?topic=6751.msg87736#msg87736 (http://chdk.setepontos.com/index.php?topic=6751.msg87736#msg87736) )
Added trunk changeset 1979 (http://trac.assembla.com/chdk/changeset/1979)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / July / 2012, 18:55:24
ixus130_sd1400 : Another orphan port, this one from the github :https://github.com/emlyn/chdk

Converted for the dev trunk and marked Alpha - skip_autobuild for now.

Note :  breaks the build as the current makefiles cannot handle the lower case letter assembler code in the C tasks
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / July / 2012, 19:54:00
ixus130_sd1400 : Another orphan port, this one from the github :https://github.com/emlyn/chdk

Converted for the dev trunk and marked Alpha - skip_autobuild for now.
Added, trunk changeset 1985 (http://trac.assembla.com/chdk/changeset/1985/trunk)

Quote
Note :  breaks the build as the current makefiles cannot handle the lower case letter assembler code in the C tasks
I'll make that case insensitive in the next checkin.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 15 / July / 2012, 19:56:34
Patch to fix LCD width value for ixus130_sd1400.   Also unlinks some LED debug code.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / July / 2012, 20:57:54
Patch to fix LCD width value for ixus130_sd1400.   Also unlinks some LED debug code.
Added, trunk changeset 1992 (http://trac.assembla.com/chdk/changeset/1992). I restored some of the lib.c comments.

Inline asm fixed in changeset 1993 (http://trac.assembla.com/chdk/changeset/1993)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 16 / July / 2012, 20:47:09
IXUS130_SD1400 :  Patch to fix values in both f/w version lib.c files - corrected to match sigfinder values for vid_get_viewport_fb() and for get_flash_params_count().

Might help with one of the problems listed here :  http://chdk.setepontos.com/index.php?topic=5034.msg88000#msg88000 (http://chdk.setepontos.com/index.php?topic=5034.msg88000#msg88000)

Update :  modified patch to include :
Code: [Select]
#define CAM_BITMAP_HEIGHT          270
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 17 / July / 2012, 00:39:13
IXUS130_SD1400 :  Patch to fix values in both f/w version lib.c files - corrected to match sigfinder values for vid_get_viewport_fb() and for get_flash_params_count().

Might help with one of the problems listed here :  http://chdk.setepontos.com/index.php?topic=5034.msg88000#msg88000 (http://chdk.setepontos.com/index.php?topic=5034.msg88000#msg88000)

Update :  modified patch to include :
Code: [Select]
#define CAM_BITMAP_HEIGHT          270
Added trunk changeset 1997 (http://trac.assembla.com/chdk/changeset/1997)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 18 / July / 2012, 17:52:37
ixus130_sd1400 fw 1.00a & 1.00c patch to override sigfinder 1st choce value for GetDrive_FreeClusters with the 2nd choice.

see : http://chdk.setepontos.com/index.php?topic=5034.msg88092#msg88092 (http://chdk.setepontos.com/index.php?topic=5034.msg88092#msg88092)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / July / 2012, 01:39:47
ixus130_sd1400 fw 1.00a & 1.00c patch to override sigfinder 1st choce value for GetDrive_FreeClusters with the 2nd choice.

see : http://chdk.setepontos.com/index.php?topic=5034.msg88092#msg88092 (http://chdk.setepontos.com/index.php?topic=5034.msg88092#msg88092)
Added, trunk changeset 2000 (http://trac.assembla.com/chdk/changeset/2000)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / July / 2012, 19:18:20
Attached is a small change for the User Menu function to fix a small annoyance.

Currently, when you add a user menu item while in Edit mode (via the erase button or half-press) there is no acknowledgement. Its kind of a blind action.  So this simple patch adds a popup box that acknowledges the addition of the menu item.

Maybe it should go in philmoz's  UI2 version but I think it simple enough to just throw into the dev trunk ?|
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: TobiMarg on 24 / July / 2012, 14:02:08
Attached is a patch that changes the filebrowser so that it opens .txt files directly (like .flt's).

EDIT: I think you have forgotten my Snake patch: here (http://chdk.setepontos.com/index.php?topic=650.msg87543#msg87543)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 28 / July / 2012, 00:58:11
Attached is a patch that changes the filebrowser so that it opens .txt files directly (like .flt's).

EDIT: I think you have forgotten my Snake patch: here (http://chdk.setepontos.com/index.php?topic=650.msg87543#msg87543)

I've added the filebrowser patch in revision 2017 to the trunk.

I tried the snake patch; but it is not compatible with the current trunk code.
Can you redo this patch against the latest version.

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 29 / July / 2012, 11:05:55
Small cleanup to USB remote code to remove unused passed parameter.  Tested with a complete build of all cameras.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 29 / July / 2012, 20:25:32
Patch to fix usb remote issues ( and possibly others ) with a490 port 1.00d and 1.00f versions based on accepting stubs_entry.S suggestions from finsig (thanks philmoz!).

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / July / 2012, 00:10:12
Small cleanup to USB remote code to remove unused passed parameter.  Tested with a complete build of all cameras.
Added in trunk changset 2021 (http://trac.assembla.com/chdk/changeset/2021/trunk) release changeset 2023 (http://trac.assembla.com/chdk/changeset/2023/branches/release-1_1)

Patch to fix usb remote issues ( and possibly others ) with a490 port 1.00d and 1.00f versions based on accepting stubs_entry.S suggestions from finsig (thanks philmoz!).
Holding off on this one until I know whether GetBatteryTemperature crashes.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 30 / July / 2012, 17:44:44
The following patch hasn't been committed yet (as it doesn't affect any other model, I think it could go to both 1.1 and trunk. The patch still applies cleanly to 1.1 and almost cleanly to current trunk. The A2200 port is planned to also use this new code path.
Here (http://chdk.setepontos.com/index.php?topic=8263.msg87136#msg87136)'s my updated patch to prevent the possibility of a SD override related crash on the Ixus850/SD800. I think this code will need some cleanup in the future - but that would require tests on cameras none of the current developers have...

Another issue: I noticed changeset 1988 (https://trac.assembla.com/chdk/changeset/1988/trunk), which made me do a little research.
CAM_FIRMWARE_MEMINFO is only activated for the following cameras:
a2100, a540, a590, d10, g10, g12, g1x, ixus310_elph500hs, s100, s95, sx130is, sx20, sx30, sx40hs
With this enabled, my usual DIGIC II test cameras showed a big performance improvement during multi file upload over CHDK-PTP (for small files: about 1-2 second/file without CAM_FIRMWARE_MEMINFO, at least five times faster with it).
Don't know how this situation should be handled:
a) enable for all DryOS (i.e. trust the sigfinder)
b) enable for all
c) enable only individually, after tests
If it's c), I have tested it on 3 cameras, patch attached.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / July / 2012, 23:01:10
Patch to fix usb remote issues ( and possibly others ) with a490 port 1.00d and 1.00f versions based on accepting stubs_entry.S suggestions from finsig (thanks philmoz!).
Added in trunk changeset (http://trac.assembla.com/chdk/changeset/2027/trunk) release changeset 2028 (http://trac.assembla.com/chdk/changeset/2028/branches/release-1_1), plus fixed  _GetBatteryTemperature
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / July / 2012, 23:06:49
The following patch hasn't been committed yet (as it doesn't affect any other model, I think it could go to both 1.1 and trunk. The patch still applies cleanly to 1.1 and almost cleanly to current trunk. The A2200 port is planned to also use this new code path.
Here (http://chdk.setepontos.com/index.php?topic=8263.msg87136#msg87136)'s my updated patch to prevent the possibility of a SD override related crash on the Ixus850/SD800. I think this code will need some cleanup in the future - but that would require tests on cameras none of the current developers have...
Thanks for the reminder, I'll add this when I get a chance.
Quote
Another issue: I noticed changeset 1988 (https://trac.assembla.com/chdk/changeset/1988/trunk), which made me do a little research.
CAM_FIRMWARE_MEMINFO is only activated for the following cameras:
a2100, a540, a590, d10, g10, g12, g1x, ixus310_elph500hs, s100, s95, sx130is, sx20, sx30, sx40hs
With this enabled, my usual DIGIC II test cameras showed a big performance improvement during multi file upload over CHDK-PTP (for small files: about 1-2 second/file without CAM_FIRMWARE_MEMINFO, at least five times faster with it).
That's useful info, I knew the old way was bad, but never tested how bad. This probably affects live view performance too.
Quote
Don't know how this situation should be handled:
a) enable for all DryOS (i.e. trust the sigfinder)
b) enable for all
c) enable only individually, after tests
If it's c), I have tested it on 3 cameras, patch attached.
I think turning it on for all dryos should be fine. I meant to do this before the least release but didn't get to it. In this post http://chdk.setepontos.com/index.php?topic=2509.msg66350#msg66350 (http://chdk.setepontos.com/index.php?topic=2509.msg66350#msg66350) I wanted to get a few more models tested, but I expect it's OK.

For vxworks, we need to find sys_mempart_id, which I haven't finished doing for all cameras. Baring typos, I think to should be safe to turn on for all that have been found.


edit:
Added sd override fix in trunk changeset 2029 (http://trac.assembla.com/chdk/changeset/2029/trunk), meminfo in  changeset 2030 (http://trac.assembla.com/chdk/changeset/2030/trunk), merged both to stable in changeset 2031 (http://trac.assembla.com/chdk/changeset/2031/branches/release-1_1)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 31 / July / 2012, 23:35:49
Thx.
I think turning it on for all dryos should be fine. I meant to do this before the least release but didn't get to it. In this post http://chdk.setepontos.com/index.php?topic=2509.msg66350#msg66350 (http://chdk.setepontos.com/index.php?topic=2509.msg66350#msg66350) I wanted to get a few more models tested, but I expect it's OK.

For vxworks, we need to find sys_mempart_id, which I haven't finished doing for all cameras. Baring typos, I think to should be safe to turn on for all that have been found.
From a quick look, sys_mempart_id could be found by looking at an eventproc named "memShow" which is a wrapper for memPartShow. The latter needs sys_mempart_id as its first param. Haven't looked at a lot of dumps, but memShow seems to be present in all of them (except in Ixus30/40).
The PTP transfer speed (for small files or liveview) on the Ixus65 (DIGIC II, USB 2.0) is nearly 4 times as fast as without CAM_FIRMWARE_MEMINFO.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 01 / August / 2012, 17:48:56
As small patch to change the default <ALT> key for the ixus115 and ixus120 to be the Playback key (both cameras already implement user adjustable <ALT> keys).   

Question : should we consider this for every camera that does not have a Print key ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 02 / August / 2012, 13:56:00
Patches for sx200is 100c, revision 2034.
1. Add transparent grey to use for menu background, use custom palette in video playback mode.
2. PTP live support, CAM_FIRMWARE_MEMINFO.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / August / 2012, 00:43:20
As small patch to change the default <ALT> key for the ixus115 and ixus120 to be the Playback key (both cameras already implement user adjustable <ALT> keys).   
Added trunk  changeset 2039 (http://trac.assembla.com/chdk/changeset/2039)  release changeset 2040 (http://trac.assembla.com/chdk/changeset/2040)
Quote
Question : should we consider this for every camera that does not have a Print key ?
I would like to standardize on play as much as possible, but I don't think it is urgent. If there are any left that use combos, I'd like to move away from that.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 03 / August / 2012, 18:01:33
I would like to standardize on play as much as possible, but I don't think it is urgent. If there are any left that use combos, I'd like to move away from that.
A quick grep of the current trunk for KEY_PRINT does not show any combos remaining.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 04 / August / 2012, 04:34:31
A quick grep of the current trunk for KEY_PRINT does not show any combos remaining.

ixus300/sd4000 KEY_UP + KEY_LEFT

http://trac.assembla.com/chdk/browser/trunk/platform/ixus300_sd4000/kbd.c#L292 (http://trac.assembla.com/chdk/browser/trunk/platform/ixus300_sd4000/kbd.c#L292)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / August / 2012, 07:58:04
A quick grep of the current trunk for KEY_PRINT does not show any combos remaining.
ixus300/sd4000 KEY_UP + KEY_LEFT
Looks like my "quick grep" was too quick. I see that one now too.  That camera seems to set the record for having a minimum set of buttons!  And the current method of getting into <ALT> mode looks really ugly to me.  Unfortunately,  the kbd.c file for that camera does not have the key code for the Playback key.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / August / 2012, 08:01:22
One more fix for the IXUS115 user defined ALT function.   Hopefully the last - its a pain not having the camera to test with.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / August / 2012, 17:41:08
Patches for sx200is 100c, revision 2034.
1. Add transparent grey to use for menu background, use custom palette in video playback mode.
Added, trunk changeset 2045 (http://trac.assembla.com/chdk/changeset/2045) release changeset 2046 (http://trac.assembla.com/chdk/changeset/2046). Note I modified this slightly, removing COLOR_GREY_BG which isn't defined/used anywhere else.

Quote
2. PTP live support, CAM_FIRMWARE_MEMINFO.
Added, trunk changeset 2047 (http://trac.assembla.com/chdk/changeset/2047) release changeset 2048 (http://trac.assembla.com/chdk/changeset/2048)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / August / 2012, 18:02:09
One more fix for the IXUS115 user defined ALT function.   Hopefully the last - its a pain not having the camera to test with.
Added, trunk changeset 2049 (http://trac.assembla.com/chdk/changeset/2049) release changeset 2050 (http://trac.assembla.com/chdk/changeset/2050)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / August / 2012, 10:00:28
ixus300/sd4000 KEY_UP + KEY_LEFT
Two more "User Defined ALT key" patches using the KEY_PLAYBACK values found by the most recent sigfinder update (thanks to philmoz & srsa_4c).

Adds adjustable ALT to the ixus300_sd4000 (replaces the existing combo key sequence) and the ixus100_sd780 (because its a twin to my SD940).

Builds but untested in camera so a quick eyeball check of the changes is probably in order.

Thanks.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 07 / August / 2012, 11:02:22
git branch: https://github.com/c10ud/CHDK/tree/fix-ixus105
diff attached to this post.

fixed a bunch of stuff in the ixus105 port, i tried briefly and i think it's ready for beta:
- fixed ui
- fixed physw task (and added adjustable alt button)
- fixed overrides, zebra, histo, etc.

known issues:
- no video overrides or similar
- wrong free space counter
- i now see sometimes it fails to startup correctly

i'll try to fix the last two asap

About the adj button: i added the key print also for the ixus120_sd940, but since it's the default ALT button and needs to be defined anyway..no big deal i guess
Code: [Select]
-#elif defined(CAMERA_ixus120_sd940)
-    static const char* names[]={ "Display", "Playback" };
-    static const int keys[] = {KEY_DISPLAY, KEY_PLAYBACK };
+#elif defined(CAMERA_ixus120_sd940) || defined(CAMERA_ixus105_sd1300)
+    static const char* names[]={ "Playback", "Display", "Playback" };
+    static const int keys[] = {KEY_PRINT, KEY_DISPLAY, KEY_PLAYBACK};
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 07 / August / 2012, 11:14:55
easier than i thought, diff attached, apply after the previous one

fixes for ixus105:
- wrong free space counter
- startup fail
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 08 / August / 2012, 06:49:38
I have finally found a little time for posting new version of EDI. I've been using this version for some time so it should be OK. Might be added to the trunk and stable release (since it now contains new Lua functions - file_browser() and textbox()).

Some bugs were fixed, some features added. Changelog in the script file.

Regards!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / August / 2012, 19:58:44
Submitted is a medium size patch to allow adding script selections to the User Menu.  I'd like to see this added to the dev branch (although I have a patch for the current stable branch too).

Having played with tsvstar's new menu system today,  I've become convinced that this patch will still be useful & compatible.  Tsvstar's version still supports the User Menu and I think something like this might be important for user's who do not want to edit a text config file on their computer (or via the Lua text editor) and who still want to add and remove scripts from their user menu (without redefining their whole menu system).

( This takes nothing away from tsvstar's menu system - it seems to be very nice and useful to me ! )
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mipa87 on 09 / August / 2012, 07:43:58
Update for czech files and A580.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / August / 2012, 21:55:50
ixus300/sd4000 KEY_UP + KEY_LEFT
Two more "User Defined ALT key" patches using the KEY_PLAYBACK values found by the most recent sigfinder update (thanks to philmoz & srsa_4c).

Adds adjustable ALT to the ixus300_sd4000 (replaces the existing combo key sequence) and the ixus100_sd780 (because its a twin to my SD940).

Builds but untested in camera so a quick eyeball check of the changes is probably in order.

easier than i thought, diff attached, apply after the previous one

fixes for ixus105:
- wrong free space counter
- startup fail

I have finally found a little time for posting new version of EDI. I've been using this version for some time so it should be OK. Might be added to the trunk and stable release (since it now contains new Lua functions - file_browser() and textbox()).

Some bugs were fixed, some features added. Changelog in the script file.

Regards!

Update for czech files and A580.

Added to trunk in revision 2073 and release-1.1 in 2074.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / August / 2012, 01:03:03
Submitted is a medium size patch to allow adding script selections to the User Menu.  I'd like to see this added to the dev branch (although I have a patch for the current stable branch too).

Having played with tsvstar's new menu system today,  I've become convinced that this patch will still be useful & compatible.  Tsvstar's version still supports the User Menu and I think something like this might be important for user's who do not want to edit a text config file on their computer (or via the Lua text editor) and who still want to add and remove scripts from their user menu (without redefining their whole menu system).

( This takes nothing away from tsvstar's menu system - it seems to be very nice and useful to me ! )

Added to trunk in revision 2075.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 10 / August / 2012, 07:22:31
<error - wrong thread>
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 19 / August / 2012, 13:27:30
fix dng header for ixus105, patch in this post: http://chdk.setepontos.com/index.php?topic=5720.msg89496#msg89496 (http://chdk.setepontos.com/index.php?topic=5720.msg89496#msg89496)

also, currently the ixus105 build is disabled, i think it can be safely enabled as alpha or beta, only movie override is missing, everything else should be working as expected
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 24 / August / 2012, 21:05:28
fix dng header for ixus105, patch in this post: http://chdk.setepontos.com/index.php?topic=5720.msg89496#msg89496 (http://chdk.setepontos.com/index.php?topic=5720.msg89496#msg89496)

also, currently the ixus105 build is disabled, i think it can be safely enabled as alpha or beta, only movie override is missing, everything else should be working as expected

Added in revision 2098 (release 1.1) and 2099 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 24 / August / 2012, 21:51:16
Patch for CHDK for ixus230 100a ALPHA, binary version was posted here (http://chdk.setepontos.com/index.php?topic=7149.msg88868#msg88868).
Only one user reported that it is working, is it enough?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mipa87 on 27 / August / 2012, 12:44:25
Second update for czech files and A580.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / September / 2012, 12:31:21
A small patch to the A3300 to flag the camera as not having an "erase" button.

Should work in stable & dev trunks.  I suppose it could be applied to the a3200 as well.  Same problem there.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / September / 2012, 23:17:27
A small patch to the A3300 to flag the camera as not having an "erase" button.

Should work in stable & dev trunks.  I suppose it could be applied to the a3200 as well.  Same problem there.
Done for both, in 2121 and 2122
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / September / 2012, 01:13:21
Second update for czech files and A580.
Added a580 updates to trunk changeset 2124 (http://trac.assembla.com/chdk/changeset/2124) and stable changeset 2126 (http://trac.assembla.com/chdk/changeset/2126)

Language updates only added to trunk, changeset 2125 (http://trac.assembla.com/chdk/changeset/2125), since some values are different in release.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 03 / September / 2012, 13:00:46
I found a bug that causes bad snake tail removing in snake game (it was drawing rect filled with 0x0 - literally empty). Patch attached. The only change is

line 409 before:
Code: [Select]
                         snake[snake_tail][1] * SNAKE_ELEMENT_SIZE+SNAKE_ELEMENT_SIZE-1, COLOR_WHITE);

now:
Code: [Select]
                         snake[snake_tail][1] * SNAKE_ELEMENT_SIZE+SNAKE_ELEMENT_SIZE-1, MAKE_COLOR(COLOR_WHITE,COLOR_WHITE));

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 03 / September / 2012, 13:45:13
Submitted : A1200  fw 1.00b  & fw 1.00c - Beta version for inclusion in autobuild of stable & dev trunks.

Source for fw 1.00a tasks also included for archiving but that version has not been tested.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / September / 2012, 00:58:44
Submitted : A1200  fw 1.00b  & fw 1.00c - Beta version for inclusion in autobuild of stable & dev trunks.
Added, trunk changeset changeset 2128 (http://trac.assembla.com/chdk/changeset/2128), release changeset 2129 (http://trac.assembla.com/chdk/changeset/2129)

Note, I used the trunk patch and merged it to release rather than applying both. gui.c, stubs_min.s and stubs_entry.S adjusted accordingly.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / September / 2012, 20:12:17
Small fix to last A1200 port (with parrallel A2200 correction).  Custom colors now enabled and redundant #define for colored icons removed.

Tested on A1200 1.00c.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / September / 2012, 23:16:10
Small fix to last A1200 port (with parrallel A2200 correction).  Custom colors now enabled and redundant #define for colored icons removed.
Added trunk changeset 2132 (http://trac.assembla.com/chdk/changeset/2132) release changeset  2133 (http://trac.assembla.com/chdk/changeset/2133)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dvip on 05 / September / 2012, 23:23:25
I wonder if that color A1200 patch can also fix the A590is color palette. I get sometimes different colors from what was selected in menus...

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / September / 2012, 23:26:54
I wonder if that color A1200 patch can also fix the A590is color palette. I get sometimes different colors from what was selected in menus...
No, this was due to the wrong line getting deleted in platform_camera.h
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / September / 2012, 23:41:06
I wonder if that color A1200 patch can also fix the A590is color palette. I get sometimes different colors from what was selected in menus...
This is probably the wrong thread to discuss this but the recent ability to define user specified custom color palettes "slipped" into the code for recent ports only.  Isn't going to work on my three year old cameras (or likely anything older) without a substantial amount of additional work.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dvip on 05 / September / 2012, 23:57:11
I know what you mean, waterwingz. The A590is is from 2008
and now you can't even find the A1200 in local stores, it's old too :)
Good thing there is Amazon.
Thanks anyway, guys.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 08 / September / 2012, 11:15:35
sx240hs  fw 1.00a  & fw 1.00c - Alpha version for dev trunk.
sx260hs  fw 1.00b  & fw 1.00c - Alpha version for dev trunk.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 08 / September / 2012, 17:57:30
sx240hs  fw 1.00a  & fw 1.00c - Alpha version for dev trunk.
sx260hs  fw 1.00b  & fw 1.00c - Alpha version for dev trunk.
Hi nafraf. Thanks for making these. I still have to resolve the question of how to deal with these different PID but identical code models in the source.

If I understand correctly, there were two separately developed codebases for sx240 and sx260. Can you clarify which code your patches come from ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 08 / September / 2012, 18:19:48
Hi reyalp,
The patch is integrated for both models.  I started sx240hs port using patch file posted for rudi  here (http://chdk.setepontos.com/index.php?topic=7889.msg88784#msg88784).

I created code for sx240, but bugs detected were fixed in both models.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 13 / September / 2012, 17:52:00
Patch to "add" 1.00a firmware to the A1200 port.   The 1.00a is identical to the 1.00b so that is noted in camera_list.csv and the prototype C files in the platform/a1200/sub/100a have been deleted.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 15 / September / 2012, 07:07:11
sx240hs  fw 1.00a  & fw 1.00c - Alpha version for dev trunk.
sx260hs  fw 1.00b  & fw 1.00c - Alpha version for dev trunk.

Push...

What is the problem with this patch? I think it's important to have a 2012 camera as base for other cameras from this year.

Btw, rudi has improved also the GPS functions, what is included in this patch.

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / September / 2012, 15:24:27
sx240hs  fw 1.00a  & fw 1.00c - Alpha version for dev trunk.
sx260hs  fw 1.00b  & fw 1.00c - Alpha version for dev trunk.

Push...

What is the problem with this patch? I think it's important to have a 2012 camera as base for other cameras from this year.

Btw, rudi has improved also the GPS functions, what is included in this patch.

msl
No specific problem, I'll try to look at it today.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / September / 2012, 18:09:27
sx240hs  fw 1.00a  & fw 1.00c - Alpha version for dev trunk.
sx260hs  fw 1.00b  & fw 1.00c - Alpha version for dev trunk.
Added to trunk in changest 2145 (http://trac.assembla.com/chdk/changeset/2145) and changeset 2146 (http://trac.assembla.com/chdk/changeset/2146). Thanks for the nice clean patch

I made some minor adjustsments
notes.txt
- made the "raw not saved in auto mode" apply to all. If this is not actually correct, let me know
- I added a note about compatibility between the two cameras.
It seems like there are some other outstanding issues discussed in the porting threads (intermittent raw in other modes, crashes ?) If someone more familiar with these ports can provide updated information we should add it.

in camera_list.csv, sx260 100b was marked beta, the others alpha. I made them all alpha, if there's really a difference in maturity between these ports, we can change it.
Some minor adjustments to make less noise diffing the platform directories.

edit:
I backported the GPS changes to 1.1 in changeset 2147 (http://trac.assembla.com/chdk/changeset/2147)This looks like it should be fine to me, but I don't have any of the affected cameras, if someone can confirm that would be good.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 15 / September / 2012, 20:24:22
Patch to enable dual partition support for the A1000.  Forum thread here :

http://chdk.setepontos.com/index.php?topic=8682.0 (http://chdk.setepontos.com/index.php?topic=8682.0)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / September / 2012, 20:40:50
Added sx240 and sx260 to the 1.1 branch in changeset 2148 (http://trac.assembla.com/chdk/changeset/2148)

Only changes were commenting out KEY_POWER and stubs regeneration.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / September / 2012, 21:09:03
Patch to "add" 1.00a firmware to the A1200 port.   The 1.00a is identical to the 1.00b so that is noted in camera_list.csv and the prototype C files in the platform/a1200/sub/100a have been deleted.
Patch to enable dual partition support for the A1000.
Thanks. Trunk changesets 2149 (http://trac.assembla.com/chdk/changeset/2149), 2150 (http://trac.assembla.com/chdk/changeset/2150) and 2151 (http://trac.assembla.com/chdk/changeset/2151) release changeset 2152 (http://trac.assembla.com/chdk/changeset/2152)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: martinl on 16 / September / 2012, 15:09:03
Hello!

Attached patch for s100 (reference post: chdk.setepontos.com/index.php?topic=7887.msg90910#msg90910 (http://chdk.setepontos.com/index.php?topic=7887.msg90910#msg90910))
- Adds the 'ring func.' button as the erase button
- Fixed spacing in keymap array (got rid of tabs)
- Un-undefs CAM_HAS_ERASE_BUTTON

Should apply both to trunk and the 1.1 release.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / September / 2012, 16:36:28
Hello!

Attached patch for s100 (reference post: chdk.setepontos.com/index.php?topic=7887.msg90910#msg90910 (http://chdk.setepontos.com/index.php?topic=7887.msg90910#msg90910))
- Adds the 'ring func.' button as the erase button
- Fixed spacing in keymap array (got rid of tabs)
- Un-undefs CAM_HAS_ERASE_BUTTON

Should apply both to trunk and the 1.1 release.
Thanks. Added in trunk changeset 2155 (http://trac.assembla.com/chdk/changeset/2155) release changeset 2156 (http://trac.assembla.com/chdk/changeset/2156)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 16 / September / 2012, 20:38:29
Attached a small patch to a495:
- Modemap table corrected, new stubs_entry.S generated for 1.00d, 1.00e, 1.00f
- Some #define needed for optical zoom were added
- PARAM_EXPOSURE_COUNTER deleted.

The changes were tested in 1.00f and chdkptp0.2.301-alpha.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / September / 2012, 21:31:41
Attached a small patch to a495:
- Modemap table corrected, new stubs_entry.S generated for 1.00d, 1.00e, 1.00f
- Some #define needed for optical zoom were added
- PARAM_EXPOSURE_COUNTER deleted.
Added trunk changeset 2159 (http://trac.assembla.com/chdk/changeset/2159) release changeset 2160 (http://trac.assembla.com/chdk/changeset/2160)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 20 / September / 2012, 00:56:04
a810  fw 1.00b  & fw 1.00d - Alpha version for dev trunk.

KNOWN BUGS
- mkdir using chdkptp returns error
- Colors of Connect4 are wrong.
- GetBatteryTemperature() returns always -99° Celsius or -146° Fahrenheit
- Mute during zoom in/out is not implemented
- Video Time limit removal is not implemented.
- AF during video recording is disabled.
- Motion detection was not tested

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 20 / September / 2012, 21:28:58
a3200  fw 1.00a/fw 1.00c - Alpha version for dev trunk.
a3200 fw 1.00d - Source cleanup and unlock optical zoom during video added.

Binary files were posted here (http://chdk.setepontos.com/index.php?topic=7180.msg91056#msg91056)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 22 / September / 2012, 10:47:47
sx150 patch as reported here : http://chdk.setepontos.com/index.php?topic=6953.msg91147#msg91147 (http://chdk.setepontos.com/index.php?topic=6953.msg91147#msg91147)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 22 / September / 2012, 18:19:55
a810  fw 1.00b  & fw 1.00d - Alpha version for dev trunk.
Added to trunk in changeset  2168 (http://trac.assembla.com/chdk/changeset/2168)
Note that the empty clobber list in _rand was not accepted by the compiler on the autobuild server. It was fine with gcc 4.5.1 I'm using on my main dev machine, but not on the 4.3.2 I have on my laptop. It seems to me it's also incorrect that this function has no clobbers, so I've "fixed" it by adding r0,r1 and r2 to the clobber list.

This function should just be re-written in C, and added in wrappers .c under a CAM_MISSING_RAND ifdef or something like that.

edit:
Merged to stable in changeset 2172 (http://trac.assembla.com/chdk/changeset/2172)

a3200  fw 1.00a/fw 1.00c - Alpha version for dev trunk.
a3200 fw 1.00d - Source cleanup and unlock optical zoom during video added.
Added in trunk changeset  2169 (http://trac.assembla.com/chdk/changeset/2169) release changeset 2173 (http://trac.assembla.com/chdk/changeset/2173)

sx150 patch as reported here : http://chdk.setepontos.com/index.php?topic=6953.msg91147#msg91147 (http://chdk.setepontos.com/index.php?topic=6953.msg91147#msg91147)
Added in trunk changeset 2170 (http://trac.assembla.com/chdk/changeset/2170) release changeset 2174 (http://trac.assembla.com/chdk/changeset/2174)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 24 / September / 2012, 10:26:14
a810  fw 1.00b  & fw 1.00d - Alpha version for dev trunk.
Added to trunk in changeset  2168 (http://trac.assembla.com/chdk/changeset/2168)
Note that the empty clobber list in _rand was not accepted by the compiler on the autobuild server. It was fine with gcc 4.5.1 I'm using on my main dev machine, but not on the 4.3.2 I have on my laptop. It seems to me it's also incorrect that this function has no clobbers, so I've "fixed" it by adding r0,r1 and r2 to the clobber list.

This function should just be re-written in C, and added in wrappers .c under a CAM_MISSING_RAND ifdef or something like that.
patch for a810

- CAM_MISSING_RAND added to include/camera.h
- srand() and rand() implemented in C and added to platform/generic/wrappers.c under #ifdef CAM_MISSING_RAND
- a810/platform_camera.h modified to use CAM_MISSING_RAND.
- srand() and rand() removed from platform/a810/lib.c

@reyalp, thanks for checking, if you think that more modification should be done, let me know.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 26 / September / 2012, 23:06:19
Update for the readme.txt file (included in every build) in response to recent newbie confusion from the out-of-date instructions posted there.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 28 / September / 2012, 22:41:50
a2200 100b/100c/100d
Patch created from source files posted by Nilinhim here (http://chdk.setepontos.com/index.php?topic=6254.msg91268#msg91268)

Additionally, exmem was disabled in 100d, as was done in 100b.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 29 / September / 2012, 10:09:46

patch for a810

- CAM_MISSING_RAND added to include/camera.h
- srand() and rand() implemented in C and added to platform/generic/wrappers.c under #ifdef CAM_MISSING_RAND
- a810/platform_camera.h modified to use CAM_MISSING_RAND.
- srand() and rand() removed from platform/a810/lib.c

Added in trunk r2179 & release-1_1 r2182
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 29 / September / 2012, 10:10:44
Update for the readme.txt file (included in every build) in response to recent newbie confusion from the out-of-date instructions posted there.


Added in trunk r2180 & release-1_1 r 2182
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 29 / September / 2012, 10:11:34
a2200 100b/100c/100d
Patch created from source files posted by Nilinhim here (http://chdk.setepontos.com/index.php?topic=6254.msg91268#msg91268)

Additionally, exmem was disabled in 100d, as was done in 100b.

Added in trunk r2181 & release-1_1 r2182.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 30 / September / 2012, 18:31:53
Update to the ixus130_sd1400 - fw 1.00a & 1.00c

Rewrite of boot.c for both version to clean up the code and enable dual partition support.

After testing by beta test group, 1.00c ready to be included in autobuild as ALPHA.   

The 1.00a is untested and not ready for release.



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 02 / October / 2012, 10:31:15
patch to a490 100d. typo.  Reported here (http://chdk.setepontos.com/index.php?topic=8753.msg91487#msg91487)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 02 / October / 2012, 15:45:29
Patch deleted. Error detected. Sorry  :'(
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / October / 2012, 01:00:53
patch to a490 100d. typo.  Reported here (http://chdk.setepontos.com/index.php?topic=8753.msg91487#msg91487)
Added in trunk changeset 2187 (http://trac.assembla.com/chdk/changeset/2187/trunk) release changeset 2188 (http://trac.assembla.com/chdk/changeset/2188/branches/release-1_1)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 03 / October / 2012, 18:54:15
* ixus230 100a new port
* Patch for ixus230 100b and 100e to fix zebra, and control unlimited video time using menu (in previous version it was always enabled).

Discussion here (http://chdk.setepontos.com/index.php?topic=7149.msg91334#msg91334)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / October / 2012, 22:21:39
Update to the ixus130_sd1400 - fw 1.00a & 1.00c
Added, trunk changeset 2193 (http://trac.assembla.com/chdk/changeset/2193/trunk), release changeset 2194 (http://trac.assembla.com/chdk/changeset/2194/branches/release-1_1)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / October / 2012, 23:08:13
* ixus230 100a new port
* Patch for ixus230 100b and 100e to fix zebra, and control unlimited video time using menu (in previous version it was always enabled).

Discussion here (http://chdk.setepontos.com/index.php?topic=7149.msg91334#msg91334)
Added trunk changesets 2195 (http://trac.assembla.com/chdk/changeset/2195/trunk), 2196 (http://trac.assembla.com/chdk/changeset/2196/trunk) release changeset 2197 (http://trac.assembla.com/chdk/changeset/2197/branches/release-1_1)

I think this takes care of all the outstanding patches, if I've missed something please let me know.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 06 / October / 2012, 10:23:52
patch to ixus115_elph100hs 101a
- Fix to zoom lock during video recording.
- Extended video time added
Reports here (http://chdk.setepontos.com/index.php?topic=6751.msg91202#msg91202)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 11 / October / 2012, 20:17:21
patch to a810 100b and 100d
- apex2us was replacing a wrong function.
- Fix to *vid_get_bitmap_active_palette().
- Fix to *vid_get_viewport_live_fb().
Bugs were reported here (http://chdk.setepontos.com/index.php?topic=8450.msg91609#msg91609)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 13 / October / 2012, 04:24:47
a495 patch to fix palette in chdkptp liveview
The following functions implemented:
  - void *vid_get_bitmap_active_palette()
  - int vid_get_palette_type()
  - int vid_get_palette_size()
  - void *vid_get_bitmap_active_buffer()

Tested using a495 100f.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 13 / October / 2012, 16:34:03
patch to ixus115_elph100hs 101a
- Fix to zoom lock during video recording.
- Extended video time added
Reports here (http://chdk.setepontos.com/index.php?topic=6751.msg91202#msg91202)
I've deferred this one for the moment. Right now, we don't have a good way to make compile time optional features specific to a particular sub, without enabling it for the others. In any case, I rather not do this because it makes everything more confusing.

In general, if code is tested on one version, I'm willing to accept equivalent code for others without testing. However, for changes like this where there's a lot of assembler changes where typos could easily be missed, getting actual testing would definitely be preferable. I guess it would be OK to check in the code for this one, but leave CAM_CHDK_HAS_EXT_VIDEO_TIME turned off ?

I assume the zoom lock and SD override stuff in platform_camera.h is applicable to all so I will add those.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 13 / October / 2012, 20:32:28
Previously mention ixus115_elph100hs platform_camera.h changes added in trunk changeset 2208 (http://trac.assembla.com/chdk/changeset/2208)

patch to a810 100b and 100d
Added to trunk in changeset 2209 (http://trac.assembla.com/chdk/changeset/2209)

a495 patch to fix palette in chdkptp liveview
Added to trunk in changeset 2210 (http://trac.assembla.com/chdk/changeset/2210)

All merged to stable in changeset 2211 (http://trac.assembla.com/chdk/changeset/2211)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 14 / October / 2012, 04:10:25
Maybe this one is worth of adding to the source:

http://chdk.setepontos.com/index.php?topic=8797.0 (http://chdk.setepontos.com/index.php?topic=8797.0)

Has been published in new thread by new user instead of posting it here.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: fe50 on 14 / October / 2012, 06:18:34
Maybe this one is worth of adding to the source:  http://chdk.setepontos.com/index.php?topic=8797.0 (http://chdk.setepontos.com/index.php?topic=8797.0)  Has been published in new thread by new user instead of posting it here.
Added with changeset #2214 (http://trac.assembla.com/chdk/changeset/2214/)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 16 / October / 2012, 08:04:23
Patch to fix palette in ixus115.  Tested in firmware version 101a

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / October / 2012, 19:16:48
Fix for the ixus90_sd790 per this thread : http://chdk.setepontos.com/index.php?topic=8835 (http://chdk.setepontos.com/index.php?topic=8835)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / October / 2012, 23:42:23
Patch to fix palette in ixus115.  Tested in firmware version 101a
Added in trunk changeset 2217 (http://trac.assembla.com/chdk/changeset/2217) release changeset 2218  (http://trac.assembla.com/chdk/changeset/2217)

I moved the vid_get_bitmap_active_buffer in the platform lib.c to the sub lib.c files. Even though in this case the address was the same for all the subs, it should be in the subs because it uses a firmware RAM address directly.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / October / 2012, 23:50:26
Fix for the ixus90_sd790 per this thread : http://chdk.setepontos.com/index.php?topic=8835 (http://chdk.setepontos.com/index.php?topic=8835)
Added, trunk changeset 2219 (http://trac.assembla.com/chdk/changeset/2219) release changeset 2220 (http://trac.assembla.com/chdk/changeset/2220)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 20 / October / 2012, 06:45:30
sx260 101a port. 
Comments, feedback and test log files are available here (http://chdk.setepontos.com/index.php?topic=7889.msg92180#msg92180)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / October / 2012, 16:24:36
sx260 101a port. 
Comments, feedback and test log files are available here (http://chdk.setepontos.com/index.php?topic=7889.msg92180#msg92180)
Added, trunk changeset 2221 (http://trac.assembla.com/chdk/changeset/2221) release changeset 2222 (http://trac.assembla.com/chdk/changeset/2222)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 26 / October / 2012, 20:34:36
a810 100e port
Thanks to beta testers.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 26 / October / 2012, 22:09:26
a3400 101a port
Tester sent logs generated for test scripts, but after that I did not receive more feedback. So, the patch was created with SKIP_AUTOBUILD option enabled.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / October / 2012, 23:53:18
a810 100e port
Thanks to beta testers.

Do you want to include this in camera_list.csv for the autobuild?

a3400 101a port
Tester sent logs generated for test scripts, but after that I did not receive more feedback. So, the patch was created with SKIP_AUTOBUILD option enabled.


Patch is missing the loader directory contents for the a3400.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / October / 2012, 15:52:15
IXUS220_ELPH300 patch to add USB sync per  http://chdk.setepontos.com/index.php?topic=6341.msg92525#msg92525 (http://chdk.setepontos.com/index.php?topic=6341.msg92525#msg92525)

Hook for noise reduction added  but commented out pending testing per  http://chdk.setepontos.com/index.php?topic=8810.msg92353#msg92353 (http://chdk.setepontos.com/index.php?topic=8810.msg92353#msg92353)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 27 / October / 2012, 21:15:04
a3400 101a port
Tester sent logs generated for test scripts, but after that I did not receive more feedback. So, the patch was created with SKIP_AUTOBUILD option enabled.

Patch is missing the loader directory contents for the a3400.

Phil.
Sorry, this time the patch includes the loader directory.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / October / 2012, 22:04:28
a810 100e port
Thanks to beta testers.

Added in revision 2233.

Phil.

Edit: Added to release-1.1 in revision 2264.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / October / 2012, 22:11:59
a3400 101a port
Tester sent logs generated for test scripts, but after that I did not receive more feedback. So, the patch was created with SKIP_AUTOBUILD option enabled.

Patch is missing the loader directory contents for the a3400.

Phil.
Sorry, this time the patch includes the loader directory.


Added in revision 2234.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / October / 2012, 22:29:57
IXUS220_ELPH300 patch to add USB sync per  http://chdk.setepontos.com/index.php?topic=6341.msg92525#msg92525 (http://chdk.setepontos.com/index.php?topic=6341.msg92525#msg92525)

Hook for noise reduction added  but commented out pending testing per  http://chdk.setepontos.com/index.php?topic=8810.msg92353#msg92353 (http://chdk.setepontos.com/index.php?topic=8810.msg92353#msg92353)

Added in revisions 2235 (trunk) and 2236 (release 1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 30 / October / 2012, 17:48:28
Update to extend video time limts for A1200 fw 1.00b & 1.00c - 1.1.0 and dev trunk.

Also includes two small changes to english language file to clean up video menu wording and let warning message fit on screen.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 31 / October / 2012, 03:34:30
Update to extend video time limts for A1200 fw 1.00b & 1.00c - 1.1.0 and dev trunk.

Also includes two small changes to english language file to clean up video menu wording and let warning message fit on screen.


Added in revisions 2240 (release 1.1) and 2241 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 07 / November / 2012, 04:51:57
Patch to a2200 to add adjustable alt button, and remove SKIP_AUTOBUILD for 100d.

It was tested by nedhorning in 100d firmware, report was done here (http://chdk.setepontos.com/index.php?topic=6254.msg92772#msg92772)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 07 / November / 2012, 05:49:27
Patch to a2200 to add adjustable alt button, and remove SKIP_AUTOBUILD for 100d.

It was tested by nedhorning in 100d firmware, report was done here (http://chdk.setepontos.com/index.php?topic=6254.msg92772#msg92772)



Added in revisions 2255 (trunk) and 2256 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 10 / November / 2012, 07:02:47
A small patch to add a2200 100b to autobuild.
Thanks to ahull, and  Scottydog for testing.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: casrap on 14 / November / 2012, 16:32:20
Patches for the A3100 and A3150, firmware versions 100b and 100d. The 100b is marked 'SKIP_AUTOBUILD' as it is untested, the 100d is a stable alpha. The A3100 & A3150 are identical.

Thanks ahull for testing, and waterwingz for preparing the source!
And the original porters of the A490 and A3000!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 16 / November / 2012, 18:22:44
Patches for ixus105 100c done by casrap:
- Modemap completed
- movie_rec.c created
- active area update

Port for ixus105 100b, tested by branislav.zember and reported here (http://chdk.setepontos.com/index.php?topic=5720.msg93282#msg93282)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 16 / November / 2012, 19:09:31
A small patch to add a2200 100b to autobuild.
Thanks to ahull, and  Scottydog for testing.
Patches for the A3100 and A3150, firmware versions 100b and 100d. The 100b is marked 'SKIP_AUTOBUILD' as it is untested, the 100d is a stable alpha. The A3100 & A3150 are identical.

Thanks ahull for testing, and waterwingz for preparing the source!
And the original porters of the A490 and A3000!
Patches for ixus105 100c done by casrap:
- Modemap completed
- movie_rec.c created
- active area update

Port for ixus105 100b, tested by branislav.zember and reported here (http://chdk.setepontos.com/index.php?topic=5720.msg93282#msg93282)

Added in revisions 2277 (trunk) and 2278 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 17 / November / 2012, 04:44:32
a1300 100d port
Tested by Gerryve7bgp (http://chdk.setepontos.com/index.php?action=profile;u=24008), reports here (http://chdk.setepontos.com/index.php?topic=8909.msg93231#msg93231)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 17 / November / 2012, 05:39:40
a1300 100d port
Tested by Gerryve7bgp (http://chdk.setepontos.com/index.php?action=profile;u=24008), reports here (http://chdk.setepontos.com/index.php?topic=8909.msg93231#msg93231)

Added in revisions 2285 (trunk) and 2286 (release-1.1).

I've also added the A3400 1.01a port to release-1.1 (missed it earlier).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 19 / November / 2012, 04:06:00
Patch to sx240/sx260:
- #define MKDIR_RETURN_ONE_ON_SUCCESS   added to platform_camera.h.
- sx240/sx260 100c - Fix pointer to DeleteFile_Fut in stubs_entry_2.S
- sx240 101a port. Tested by  JamesBMI6 (http://chdk.setepontos.com/index.php?action=profile;u=24626) and Uran (http://chdk.setepontos.com/index.php?action=profile;u=24645), reports here (http://chdk.setepontos.com/index.php?topic=7928.msg93274#msg93274)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ERR99 on 19 / November / 2012, 16:34:58
Hello,

here ist the first version of the SX50HS port (1.00b, ALPHA version with SKIP_AUTOBUILD configuration).
Patch is created based on trunk revision 2289. The diff includes also a small change for tools/packfi2/fi2enc.c (DryOS R51 also needs the "extra value" as R50 to get PS.FI2 working).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: aditidatta on 19 / November / 2012, 22:09:45
Bur where is the 101c folder in ixus115hs???
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / November / 2012, 22:14:50
Bur where is the 101c folder in ixus115hs???
cross posted here : http://chdk.setepontos.com/index.php?topic=845.msg93479#msg93479 (http://chdk.setepontos.com/index.php?topic=845.msg93479#msg93479)

please don't do that
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 20 / November / 2012, 03:54:57
Patch to sx240/sx260:
- #define MKDIR_RETURN_ONE_ON_SUCCESS   added to platform_camera.h.
- sx240/sx260 100c - Fix pointer to DeleteFile_Fut in stubs_entry_2.S
- sx240 101a port. Tested by  JamesBMI6 (http://chdk.setepontos.com/index.php?action=profile;u=24626) and Uran (http://chdk.setepontos.com/index.php?action=profile;u=24645), reports here (http://chdk.setepontos.com/index.php?topic=7928.msg93274#msg93274)

Hello,

here ist the first version of the SX50HS port (1.00b, ALPHA version with SKIP_AUTOBUILD configuration).
Patch is created based on trunk revision 2289. The diff includes also a small change for tools/packfi2/fi2enc.c (DryOS R51 also needs the "extra value" as R50 to get PS.FI2 working).


Both added in revisions 2292-2293 (trunk) and 2294 (release-1.1)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 21 / November / 2012, 18:46:05
small patch to fix PLATFORMID in sx240 101a
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 21 / November / 2012, 23:11:32
small patch to fix PLATFORMID in sx240 101a
Added, changesets 2298 and 2299.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 23 / November / 2012, 06:51:10
patch ixus105 to solve this bug, found and fixed by casrap
Quote
Overrides only work when the self timer is off, when you select a self timer of 2 or 10sec (or custom) overrides are ignored. Sometimes it takes one shot with timer+overrides, but all the next shots are again without overrides.

I prepared the patch and ported the code to 100b. 
Patch was tested in 100d, but it was not tested in 100b.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / November / 2012, 07:24:12
patch ixus105 to solve this bug, found and fixed by casrap
Quote
Overrides only work when the self timer is off, when you select a self timer of 2 or 10sec (or custom) overrides are ignored. Sometimes it takes one shot with timer+overrides, but all the next shots are again without overrides.

I prepared the patch and ported the code to 100b. 
Patch was tested in 100d, but it was not tested in 100b.



Added in revisions 2309 (trunk) and 2310 (release-1.1)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 23 / November / 2012, 14:45:58
Small patch for the SX150IS to fix the file counter issue (thread starts here (http://chdk.setepontos.com/index.php?topic=6953.msg93407#msg93407), success report here (http://chdk.setepontos.com/index.php?topic=6953.msg93587#msg93587)).

@philmoz
About changeset 2308: If the following
p.s. Could the problem be due to dark frame subtraction? With brief shutter time i have never had a problem.
is true, the file counter is sometimes already correct when the raw hook is reached. In that case r2308 will enforce the maximum delay. Partial proposal below. Partial = some affected ports (like the Ixus220) do not currently call the NR hook, those will need an additional #define in capt_seq.c. I might be still missing something, that's the reason why I'm posting here.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / November / 2012, 18:01:31
@philmoz
About changeset 2308: If the following
p.s. Could the problem be due to dark frame subtraction? With brief shutter time i have never had a problem.
is true, the file counter is sometimes already correct when the raw hook is reached. In that case r2308 will enforce the maximum delay. Partial proposal below. Partial = some affected ports (like the Ixus220) do not currently call the NR hook, those will need an additional #define in capt_seq.c. I might be still missing something, that's the reason why I'm posting here.

I considered that possibility; but decided against it.

When I looked at this I started out recording the before and after file counter values to see how often the loop went to the full delay period. On the cameras I have that are affected by this it happened very rarely so I decided to stick with a simple solution. It's no worse than the previous code and in most cases exits the loop after 10 - 20ms.

There's no guarantee that capturing the file counter in capt_seq_hook_set_nr will behave any differently - the call to this is not that much earlier than the call to capt_seq_hook_raw_here and there is no sleep between them so in all likelihood it would get the same file counter value.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / November / 2012, 18:06:14
Small patch for the SX150IS to fix the file counter issue (thread starts here (http://chdk.setepontos.com/index.php?topic=6953.msg93407#msg93407), success report here (http://chdk.setepontos.com/index.php?topic=6953.msg93587#msg93587)).

Added in revision 2312 (trunk) and 2313 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 24 / November / 2012, 07:32:02
When I looked at this I started out recording the before and after file counter values to see how often the loop went to the full delay period. On the cameras I have that are affected by this it happened very rarely so I decided to stick with a simple solution. It's no worse than the previous code and in most cases exits the loop after 10 - 20ms.
I don't have direct experience with this as AFAIK none of my DryOS cams is affected. It's also not a question that it's better than the fixed delay.
Quote
There's no guarantee that capturing the file counter in capt_seq_hook_set_nr will behave any differently - the call to this is not that much earlier than the call to capt_seq_hook_raw_here and there is no sleep between them
capt_seq_hook_set_nr, wait_until_remote_button_is_released are all called before the shot, the raw hook is called after it. I've traced back the update of the file counter param on a DryOS cam (don't remember which, maybe A470), and it seems that the task responsible for it is DvlpSeqTask.
Quote
  so in all likelihood it would get the same file counter value.
That could be true, I don't know when the other task decides to increment the counter, the shot will happen anyway at that point. shooting_expo_param_override is called before decision, but it's in a different source module and in some ports it might even be skipped, so it's probably not entirely reliable (could result in overwritten files).

So, in short: I don't know a better solution that doesn't require messing with every affected port's source.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 24 / November / 2012, 11:46:12
A small patch to

Currently  script_print_screen_statement(n) in core/scripts.c opens a log file named LOG_nnnn.TXT in overwrite mode if n>0 or in append mode if n<0.   If n=0 it disables logging (but does not close any open log files).

In luascript.c,  luaCB_print_screen(n) adds 10000 to the passed value of n from the print_screen(n) function call before calling script_print_screen_statement(n).  There is no (obvious) reason why it does this as the log file name uses only the 4 least significant digits.  However, it means that you need to specify n < -10000 if you want to open a log file in "append" mode using print_screen() in Lua.

The corresponding uBASIC statement treats any negative number as a request for a log file in append mode.

Patch should not break any existing code although the file numbers created using print_screen() in lua will sometimes be different.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: lapser on 24 / November / 2012, 23:22:57
Thanks! I noticed that print_screen(false) didn't close the file when I tried to rename it. Hopefully, rename will work now.

I also found that my log files were lost with low battery shut down, which doesn't call restore(). My solution was to close and re-open the log file for each picture, which works well. I assume now it will work with print_screen in Basic and Lua?

Code: (lua) [Select]
for i=1,10 do
  print_screen(-1)
  print ("testing",i)
  print_screen(false)
  --sleep(100)
end

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 24 / November / 2012, 23:28:34
A small patch to
  • fix up a problem with the print_screen() function in Lua
  • close any open log file when logging is turned off  (i.e. print_screen(false)  or print_screen(0)  or print_screen 0)

Currently  script_print_screen_statement(n) in core/scripts.c opens a log file named LOG_nnnn.TXT in overwrite mode if n>0 or in append mode if n<0.   If n=0 it disables logging (but does not close any open log files).

In luascript.c,  luaCB_print_screen(n) adds 10000 to the passed value of n from the print_screen(n) function call before calling script_print_screen_statement(n).  There is no (obvious) reason why it does this as the log file name uses only the 4 least significant digits.  However, it means that you need to specify n < -10000 if you want to open a log file in "append" mode using print_screen() in Lua.

The corresponding uBASIC statement treats any negative number as a request for a log file in append mode.

Patch should not break any existing code although the file numbers created using print_screen() in lua will sometimes be different.

Added in revisions 2317 (trunk) and 2318 (release-1.1)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 27 / November / 2012, 01:09:53
a1300 100e port
Firmware dump (http://chdk.setepontos.com/index.php?topic=8909.msg93819#msg93819) and test done by calculusrunner (http://chdk.setepontos.com/index.php?action=profile;u=24706)

This port is a copy of a810 100e, but with the PLATFORMID=12862.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 27 / November / 2012, 06:47:41
a495 new loader patch. Tested using a495 100f.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / November / 2012, 06:58:13
a1300 100e port
Firmware dump (http://chdk.setepontos.com/index.php?topic=8909.msg93819#msg93819) and test done by calculusrunner (http://chdk.setepontos.com/index.php?action=profile;u=24706)

This port is a copy of a810 100e, but with the PLATFORMID=12862.


Added in revision 2326 (trunk) and 2327 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / November / 2012, 06:59:59
a495 new loader patch. Tested using a495 100f.


Added in revision 2328 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 27 / November / 2012, 18:09:01
patch to a495 and a810

a495
Removed references to the RESTARTSTART in makefile.inc 100d, 100e, 100f

a810
New loader implemented, boot tested using 100b, 100d, 100e
EXMEM_BUFFER_SIZE and MEMISOSTART set to the values for 1mb buffer. As reported here (http://chdk.setepontos.com/index.php?topic=8450.msg92969#msg92969) by SnowLeopard
I think that a810 can be released as beta now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 27 / November / 2012, 20:16:01
New loader patch for
Quote
A series:       A590-101b,   A620-100f,   A630-100c
ixus series:     ixus70_sd1000-101b,   ixus115_elph100hs-101b,   ixus220_elph300hs-100c
                 ixus230_elph310hs-100b,   ixus300_sd4000-100c,   ixus870_sd880-101a
S series:       S95-100h


Patch attached here (http://chdk.setepontos.com/index.php?topic=9027.msg93896#msg93896)
Warning: created with gnu diff - I did include a stripped version which hopefully works for you guys,
although the /resetcode dirs will need to be removed manually afterwards.
By the way, nafraf's a495 patch in post #905 also appears to have left an (empty) /resetcode dir in
trunk 2328.

wim
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / November / 2012, 20:17:04
Patch for new loader code :   G10,  A1200,  IXUS120_SD940

This patch file seems to clear content of the files in cam/resetcode directory rather than delete them or the subdirectory itself ?  Not sure what I can/should do different ?

Code: [Select]
svn diff > patch.patch 
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 28 / November / 2012, 06:11:51
New loader patch for the A720 & SX220
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 28 / November / 2012, 06:49:08
patch to a495 and a810

a495
Removed references to the RESTARTSTART in makefile.inc 100d, 100e, 100f

a810
New loader implemented, boot tested using 100b, 100d, 100e
EXMEM_BUFFER_SIZE and MEMISOSTART set to the values for 1mb buffer. As reported here (http://chdk.setepontos.com/index.php?topic=8450.msg92969#msg92969) by SnowLeopard
I think that a810 can be released as beta now.

New loader patch for
Quote
A series:       A590-101b,   A620-100f,   A630-100c
ixus series:     ixus70_sd1000-101b,   ixus115_elph100hs-101b,   ixus220_elph300hs-100c
                 ixus230_elph310hs-100b,   ixus300_sd4000-100c,   ixus870_sd880-101a
S series:       S95-100h


Patch attached here (http://chdk.setepontos.com/index.php?topic=9027.msg93896#msg93896)
Warning: created with gnu diff - I did include a stripped version which hopefully works for you guys,
although the /resetcode dirs will need to be removed manually afterwards.
By the way, nafraf's a495 patch in post #905 also appears to have left an (empty) /resetcode dir in
trunk 2328.

wim

Patch for new loader code :   G10,  A1200,  IXUS120_SD940

This patch file seems to clear content of the files in cam/resetcode directory rather than delete them or the subdirectory itself ?  Not sure what I can/should do different ?

Code: [Select]
svn diff > patch.patch 

New loader patch for the A720 & SX220

All added in revision 2329 - thanks everyone.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: vaibhavr000 on 30 / November / 2012, 15:07:26
where can I find chdk for canon sx 160
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 30 / November / 2012, 21:18:12
where can I find chdk for canon sx 160
http://chdk.setepontos.com/index.php?topic=9041.msg93965#msg93965 (http://chdk.setepontos.com/index.php?topic=9041.msg93965#msg93965)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 01 / December / 2012, 10:39:32
Hi

Quote
All added in revision 2329 - thanks everyone.

Phil.

Implementations for A720, A1200, G10, ixus120_sd940, SX220hs and TX1 appear to miss
the mods in /platform in trunk 2329 (ie. removal of RESTARTSTART - see attachment for fixes)

Also prepared patches for all as yet untested cams (79 of them, see attachment 2)
to make preparing test builds easier.

Edit: patches appear to apply cleanly to later builds as well (currently batch-compiling  a patched
        version of philmoz-reorg 2339)
Edit2: Note that the patches will not remove the /loader/CAM/resetcode directories, so this needs
          to be done manually (although leaving them in does not appear to affect compilation)
Edit3: Updated attachment 2, stupid copy/paste error in d10 patch

cheers,

wim

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 01 / December / 2012, 12:47:48
Implementations for A720, A1200, G10, ixus120_sd940, SX220hs and TX1 appear to miss
the mods in /platform in trunk 2329 (ie. removal of RESTARTSTART - see attachment for fixes)
Nice cleanup - thanks.  Should not change the compiled code - just deletes an unused compile option.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / December / 2012, 16:37:19
Implementations for A720, A1200, G10, ixus120_sd940, SX220hs and TX1 appear to miss
the mods in /platform in trunk 2329 (ie. removal of RESTARTSTART - see attachment for fixes)
Added in trunk changeset 2342 (http://trac.assembla.com/chdk/changeset/2342)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 04 / December / 2012, 19:32:13
ixus105 100c port
The port includes the new loader code posted by whim here (http://chdk.setepontos.com/index.php?topic=650.msg93986#msg93986).

Tested by chispiao, testing script log files are attached.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 06 / December / 2012, 02:44:56
ixus105 100c port
The port includes the new loader code posted by whim here (http://chdk.setepontos.com/index.php?topic=650.msg93986#msg93986).

Tested by chispiao, testing script log files are attached.



Added in revision 2346 (trunk) and 2347 (release-1.1).
I added it to the autobuild as well (ALPHA like the other versions).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 07 / December / 2012, 19:14:15
A small patch that includes:
- a1300 new loader patch, created by whim, tested using a810 (a1300 and a810 are CHDK compatible)
- fix to length variable in loader/a810/main.c, bug found after see a1300 patch.
Code: [Select]
-        long length = blob_chdk_core_size;
+        long length = (blob_chdk_core_size + 3) >> 2;


edit:
attachment updated, to fix comment in loader/a810/main.c
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 08 / December / 2012, 04:00:09
A small patch that includes:
- a1300 new loader patch, created by whim, tested using a810 (a1300 and a810 are CHDK compatible)
- fix to length variable in loader/a810/main.c, bug found after see a1300 patch.
Code: [Select]
-        long length = blob_chdk_core_size;
+        long length = (blob_chdk_core_size + 3) >> 2;


edit:
attachment updated, to fix comment in loader/a810/main.c

Added in revision 2353 (trunk) and 2353 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / December / 2012, 11:16:28
Patches to remove 10 second USB remote timeout while "half pressed"  (for both trunk and stable).

See http://chdk.setepontos.com/index.php?topic=7127.msg94248#msg94248 (http://chdk.setepontos.com/index.php?topic=7127.msg94248#msg94248)

Tested on G10 and A1200.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: pux on 08 / December / 2012, 12:54:50
Hello,

i made some changes for the SX210IS, so now it's working (again?).

Please see my other post: http://chdk.setepontos.com/index.php?topic=5045.msg94252#msg94252 (http://chdk.setepontos.com/index.php?topic=5045.msg94252#msg94252)

I also included diffs and if the diffs fail somehow, i also included the changed files.

Since most of the changes are trivial, and it gets the camera working (i use it with these patches for some days now without problems), it would be nice to see it activated in autobuild.

(Recent autobuild builds will probably encourage more sx210is users to contribute then probably :D)

-- pux
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 08 / December / 2012, 20:09:40
Hello,

i made some changes for the SX210IS, so now it's working (again?).

Please see my other post: http://chdk.setepontos.com/index.php?topic=5045.msg94252#msg94252 (http://chdk.setepontos.com/index.php?topic=5045.msg94252#msg94252)

I also included diffs and if the diffs fail somehow, i also included the changed files.

Since most of the changes are trivial, and it gets the camera working (i use it with these patches for some days now without problems), it would be nice to see it activated in autobuild.

(Recent autobuild builds will probably encourage more sx210is users to contribute then probably :D)

-- pux

See my comments in the other thread - http://chdk.setepontos.com/index.php?topic=5045.msg94274#msg94274 (http://chdk.setepontos.com/index.php?topic=5045.msg94274#msg94274)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: pux on 09 / December / 2012, 05:46:38
Quote
See my comments in the other thread - http://chdk.setepontos.com/index.php?topic=5045.msg94274#msg94274 (http://chdk.setepontos.com/index.php?topic=5045.msg94274#msg94274)

Phil.

Hey Phil,

thanks for your input, i fixed it:

http://chdk.setepontos.com/index.php?topic=5045.msg94294#msg94294 (http://chdk.setepontos.com/index.php?topic=5045.msg94294#msg94294)

(also uploading same .diff here)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 10 / December / 2012, 03:18:58
Quote
See my comments in the other thread - http://chdk.setepontos.com/index.php?topic=5045.msg94274#msg94274 (http://chdk.setepontos.com/index.php?topic=5045.msg94274#msg94274)

Phil.

Hey Phil,

thanks for your input, i fixed it:

http://chdk.setepontos.com/index.php?topic=5045.msg94294#msg94294 (http://chdk.setepontos.com/index.php?topic=5045.msg94294#msg94294)

(also uploading same .diff here)



Added in revision 2364 (trunk) and 2365 (release-1.1).

The change to gui_fselect.c was not needed - I fixed the free space calculation yesterday.
I also fixed the signature finder for GetDrive_FreeClusters so the stubs_entry_2.S change was not needed either.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 11 / December / 2012, 12:11:09
a1300 100b port

Firmware dump and tests thanks to aladar (http://chdk.setepontos.com/index.php?action=profile;u=24806)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / December / 2012, 23:54:27
Patches to remove 10 second USB remote timeout while "half pressed"  (for both trunk and stable).

See http://chdk.setepontos.com/index.php?topic=7127.msg94248#msg94248 (http://chdk.setepontos.com/index.php?topic=7127.msg94248#msg94248)
Added, trunk changeset 2367 (http://trac.assembla.com/chdk/changeset/2367) release changeset 2368 (http://trac.assembla.com/chdk/changeset/2368)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / December / 2012, 07:50:38
a1300 100b port

Firmware dump and tests thanks to aladar (http://chdk.setepontos.com/index.php?action=profile;u=24806)


Added in revision 2382 (trunk) and 2383 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 17 / December / 2012, 05:34:18
sx260 100b patch to fix long exposure time.

Bug detected by lapser, reported here (http://chdk.setepontos.com/index.php?topic=9113.msg94567#msg94567)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 17 / December / 2012, 06:08:23
sx260 100b patch to fix long exposure time.

Bug detected by lapser, reported here (http://chdk.setepontos.com/index.php?topic=9113.msg94567#msg94567)


Added in revision 2393 (trunk) and 2394 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 19 / December / 2012, 16:56:13
sx260 new loader patch, written by whim, tested by lapser on sx260 100b.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: whim on 19 / December / 2012, 19:41:36
Quote
written by whim
Sorry for being off topic, but there's only 1 person who has written this patch, and that's philmoz (See here (http://chdk.setepontos.com/index.php?topic=9027.msg93857#msg93857))
Me - i just got carried away a bit after successfully testing it on my cams ... feels a bit embarassing
to be credited for what's basically copy/pasting.

thanks,

wim
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / December / 2012, 17:10:36
sx260 new loader patch, written by whim, tested by lapser on sx260 100b.


Added in revision 2400 (trunk) and 2401 (release-1.1)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 28 / December / 2012, 13:22:45
Fix for USB remote V2 operation for the S3is per this post :

http://chdk.setepontos.com/index.php?topic=9169.msg94874#msg94874 (http://chdk.setepontos.com/index.php?topic=9169.msg94874#msg94874)

Patch works for both 1.1 and dev trunks.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 28 / December / 2012, 14:59:33
A couple of small patches for two of the four "default" scripts included with CHDK.   Those scripts are included in CHDK as the  simplest possible examples of things people might want to do with CHDK.  However,  I've noticed that they have become somewhat more than that to new users of CHDK.  They are often assumed to be the correct (if simple) way to do these things.

So I'd like to propose the smallest possible update to address issues I've seen posted.  My intent is not to produce better more complicated scripts.  There are hundred of each on the wiki & forum already and any "improvements"  can take us down a slippery slope likely to end up in flame-wars.   So these proposed updates are just to make two of the existing scripts a little more usable.

The first update is to make the threshold and delay values in the motion.bas & motion.lua scripts into parameters.  These are typically the two values people need to adjust to get reasonable motion detection performance.

The second update is add an adjustment (in 1/2 f-stop increments) to the hdr.bas & hdr.lua scripts.  This will let users adjust the amount of exposure range that the hdr scripts use.

Should be trivial enough to add to both the main trunk and dev branches ?

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 28 / December / 2012, 17:49:09
Fix for USB remote V2 operation for the S3is per this post :

http://chdk.setepontos.com/index.php?topic=9169.msg94874#msg94874 (http://chdk.setepontos.com/index.php?topic=9169.msg94874#msg94874)

Patch works for both 1.1 and dev trunks.



A couple of small patches for two of the four "default" scripts included with CHDK.   Those scripts are included in CHDK as the  simplest possible examples of things people might want to do with CHDK.  However,  I've noticed that they have become somewhat more than that to new users of CHDK.  They are often assumed to be the correct (if simple) way to do these things.

So I'd like to propose the smallest possible update to address issues I've seen posted.  My intent is not to produce better more complicated scripts.  There are hundred of each on the wiki & forum already and any "improvements"  can take us down a slippery slope likely to end up in flame-wars.   So these proposed updates are just to make two of the existing scripts a little more usable.

The first update is to make the threshold and delay values in the motion.bas & motion.lua scripts into parameters.  These are typically the two values people need to adjust to get reasonable motion detection performance.

The second update is add an adjustment (in 1/2 f-stop increments) to the hdr.bas & hdr.lua scripts.  This will let users adjust the amount of exposure range that the hdr scripts use.

Should be trivial enough to add to both the main trunk and dev branches ?



Both added in revision 2411 (trunk) and 2412 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 28 / December / 2012, 18:05:20
Both added in revision 2411 (trunk) and 2412 (release-1.1).
Sure - today the patches get added quickly  :'(

Realized as I was driving home that the changes to the HDR script work in full f-stops rather than half stops.  This corrects the patched script for half stops.

TIA.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 28 / December / 2012, 18:25:42
Both added in revision 2411 (trunk) and 2412 (release-1.1).
Sure - today the patches get added quickly  :'(

Realized as I was driving home that the changes to the HDR script work in full f-stops rather than half stops.  This corrects the patched script for half stops.

TIA.


Updated in revision 2414 (trunk) and 2415 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 29 / December / 2012, 23:55:42
Fix for USB remote for the ixus750_sd550 per http://chdk.setepontos.com/index.php?topic=9169.msg94984#msg94984. (http://chdk.setepontos.com/index.php?topic=9169.msg94984#msg94984.)

Patch should be good for both stable and dev branches.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / December / 2012, 01:12:30
Fix for USB remote for the ixus750_sd550 per http://chdk.setepontos.com/index.php?topic=9169.msg94984#msg94984. (http://chdk.setepontos.com/index.php?topic=9169.msg94984#msg94984.)

Patch should be good for both stable and dev branches.


Added in revision 2422 (trunk) and 2423 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / January / 2013, 20:22:49
Small patch to narrow the menu border width for the A1200 and IXUS120_SD940 so that menu text does not truncate.

Patch file works for both dev and stable branches.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 04 / January / 2013, 22:45:46
sx230 new loader patch tested by true (http://chdk.setepontos.com/index.php?action=profile;u=2674) on sx230 1.01c
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / January / 2013, 22:56:38
Small patch to narrow the menu border width for the A1200 and IXUS120_SD940 so that menu text does not truncate.

Patch file works for both dev and stable branches.

sx230 new loader patch tested by true (http://chdk.setepontos.com/index.php?action=profile;u=2674) on sx230 1.01c

Both added in revision 2456 (trunk) and 2457 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / January / 2013, 20:11:51
Patch files to correct bug with bracketing mode not timing out correctly when used by USB remote.  Also extends the timeout interval from 5 to 10 seconds to allow a little more time between shots prior to a reset.

Patch for stable version is a minimal fix and will hit the same 1 second bug fixed in rev 2104 of dev trunk.

Patch for dev version is complete.  Includes a small code cleanup.

Tested on G10, IXUS120_SD940 and A1200.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 07 / January / 2013, 23:25:39
a610 and a570 new loader patch, thanks to OhmEye for testing.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dvip on 08 / January / 2013, 19:31:09
Phil,

Got these errors using philmoz-reorg@2472  (A590is-101b and SX40HS-100i):

 
========== C:\CHDK\TRUNK\TRUNK2472\BIN\LOGS\ERR-A590-101B.TXT ==========

In file included from wrappers.c:1:0:
../generic/wrappers.c: In function 'lens_set_zoom_point':
../generic/wrappers.c:194:19: error: 'zoom_status' undeclared (first use in this function)
../generic/wrappers.c:194:19: note: each undeclared identifier is reported only once for each function it appears in
../generic/wrappers.c:194:31: error: 'ZOOM_OPTICAL_MIN' undeclared (first use in this function)
../generic/wrappers.c:195:48: error: 'ZOOM_OPTICAL_MAX' undeclared (first use in this function)
../generic/wrappers.c:196:22: error: 'ZOOM_OPTICAL_MEDIUM' undeclared (first use in this function)
../generic/wrappers.c: In function 'lens_set_focus_pos':
../generic/wrappers.c:213:19: error: 'MAX_DIST' undeclared (first use in this function)
../generic/wrappers.c:213:38: error: 'INFINITY_DIST' undeclared (first use in this function)
C:\chdk\gcc451\bin\gmake.exe[2]: *** [wrappers.o] Error 1
C:\chdk\gcc451\bin\gmake.exe[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1

========== C:\CHDK\TRUNK\TRUNK2472\BIN\LOGS\ERR-SX40HS-100I.TXT ==========

lib.c: In function 'vid_get_viewport_live_fb':
lib.c:76:53: error: 'VIDEO_RECORD_IN_PROGRESS' undeclared (first use in this function)
lib.c:76:53: note: each undeclared identifier is reported only once for each function it appears in
C:\chdk\gcc451\bin\gmake.exe[2]: *** [lib.o] Error 1
C:\chdk\gcc451\bin\gmake.exe[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 08 / January / 2013, 21:21:45
@dvip - use the trunk version, all the 'reorg' changes have been merged.

The last merge I did from trunk back to philmoz-reorg seems to have missed some changes - there's probably not much point updating the branch at this stage.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dvip on 09 / January / 2013, 01:01:35
@Phil, ok, thanks, all working fine now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / January / 2013, 03:07:26
Patch files to correct bug with bracketing mode not timing out correctly when used by USB remote.  Also extends the timeout interval from 5 to 10 seconds to allow a little more time between shots prior to a reset.

Patch for stable version is a minimal fix and will hit the same 1 second bug fixed in rev 2104 of dev trunk.

Patch for dev version is complete.  Includes a small code cleanup.

Tested on G10, IXUS120_SD940 and A1200.


a610 and a570 new loader patch, thanks to OhmEye for testing.


Both added in revision 2473 (trunk) and 2474 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 10 / January / 2013, 10:35:26
a3100 100a alpha port and a3100 new loader tested. Pacth created from source posted by casrap here (http://chdk.setepontos.com/index.php?topic=5560.msg95553#msg95553)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / January / 2013, 02:56:26
a3100 100a alpha port and a3100 new loader tested. Pacth created from source posted by casrap here (http://chdk.setepontos.com/index.php?topic=5560.msg95553#msg95553)

Added in revision 2476 (trunk) and 2477 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 12 / January / 2013, 21:10:09
Patch file for unstable 1.2.0 branch to clean-up some old #defines related to USB remote per this old thread : remote #defines (http://chdk.setepontos.com/index.php?topic=5851)

These old #undefs now cause problem in 1.2.0 per this thread :
http://chdk.setepontos.com/index.php?topic=7127.msg95640#msg95640 (http://chdk.setepontos.com/index.php?topic=7127.msg95640#msg95640)

In the unstable branch,  #undef CAM_REMOTE causes the Remote Parameters menu to not appear.  In previous versions it only removed the submenu from the Scripting menu and disabled the USB remote OSD display.   

Change removes all references to CAM_REMOTE and CAM_SYNCH from the platform_camera.h files.  You can stil disable the Remote Parameters menu with #undef CAM_REMOTE should somebody want to do so in the future.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 13 / January / 2013, 12:17:28
Patches (1.1.0 and 1.2.0) for USB Remote Bracketing function per this post :  http://chdk.setepontos.com/index.php?topic=7127.msg95671#msg95671 (http://chdk.setepontos.com/index.php?topic=7127.msg95671#msg95671)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 14 / January / 2013, 15:42:07
Hello there,

here are the patches for porting S100 to the new loader code:

1) https://github.com/c10ud/CHDK/commit/a94ca402bf13c11ac473bd8c49c38a41fc78c6da.patch
2) https://github.com/c10ud/CHDK/commit/a8ad484aa8d8268d7592dfec370ffc35268e3eaf.patch

edit - if you don't want meta-data:
1) https://github.com/c10ud/CHDK/commit/a94ca402bf13c11ac473bd8c49c38a41fc78c6da.diff
2) https://github.com/c10ud/CHDK/commit/a8ad484aa8d8268d7592dfec370ffc35268e3eaf.diff
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / January / 2013, 16:48:03
Patch file for unstable 1.2.0 branch to clean-up some old #defines related to USB remote per this old thread : remote #defines (http://chdk.setepontos.com/index.php?topic=5851)

These old #undefs now cause problem in 1.2.0 per this thread :
http://chdk.setepontos.com/index.php?topic=7127.msg95640#msg95640 (http://chdk.setepontos.com/index.php?topic=7127.msg95640#msg95640)

In the unstable branch,  #undef CAM_REMOTE causes the Remote Parameters menu to not appear.  In previous versions it only removed the submenu from the Scripting menu and disabled the USB remote OSD display.   

Change removes all references to CAM_REMOTE and CAM_SYNCH from the platform_camera.h files.  You can stil disable the Remote Parameters menu with #undef CAM_REMOTE should somebody want to do so in the future.

Patches (1.1.0 and 1.2.0) for USB Remote Bracketing function per this post :  http://chdk.setepontos.com/index.php?topic=7127.msg95671#msg95671 (http://chdk.setepontos.com/index.php?topic=7127.msg95671#msg95671)


Added in revision 2485 (trunk) and 2486 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / January / 2013, 16:53:46
Hello there,

here are the patches for porting S100 to the new loader code:

1) https://github.com/c10ud/CHDK/commit/a94ca402bf13c11ac473bd8c49c38a41fc78c6da.patch
2) https://github.com/c10ud/CHDK/commit/a8ad484aa8d8268d7592dfec370ffc35268e3eaf.patch

edit - if you don't want meta-data:
1) https://github.com/c10ud/CHDK/commit/a94ca402bf13c11ac473bd8c49c38a41fc78c6da.diff
2) https://github.com/c10ud/CHDK/commit/a8ad484aa8d8268d7592dfec370ffc35268e3eaf.diff

Added in revision 2487 (trunk) and 2488 (release-1.1).

It's preferable to upload the patch files directly to the posts in this thread rather than an external hosting site. Click the 'Preview' button when creating a message - there is a section to add attachments.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 14 / January / 2013, 17:20:05
Hello there,

here are the patches for porting S100 to the new loader code:

1) https://github.com/c10ud/CHDK/commit/a94ca402bf13c11ac473bd8c49c38a41fc78c6da.patch
2) https://github.com/c10ud/CHDK/commit/a8ad484aa8d8268d7592dfec370ffc35268e3eaf.patch

edit - if you don't want meta-data:
1) https://github.com/c10ud/CHDK/commit/a94ca402bf13c11ac473bd8c49c38a41fc78c6da.diff
2) https://github.com/c10ud/CHDK/commit/a8ad484aa8d8268d7592dfec370ffc35268e3eaf.diff

Added in revision 2487 (trunk) and 2488 (release-1.1).

It's preferable to upload the patch files directly to the posts in this thread rather than an external hosting site. Click the 'Preview' button when creating a message - there is a section to add attachments.

Phil.

Phil, i know how to use a forum (:)) but that's not exactly an external hosting site: each link directly refers to a commit in a git repository (mine) which fits my workflow better.
Appending .diff or .patch to the single commit URLs i can give you patches: lazy yet effective.
However, if you prefer patches-appended-to-posts, next time I have something I'll surely do it.

greets
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 17 / January / 2013, 12:38:16
I have a proposal which would be of help for cameras that have too few buttons (and no touchscreen). This would enable normal camera use for inexperienced users, and also enable more comfortable camera control for those who don't mind that the camera's On/Off button behaves differently when in ALT mode.

Background info: this kind of remap is currently permanently enabled in the Ixus110 port (which can be confusing for some).

The patch makes changes in core in order to introduce a new configurable option and a new menu item. Since I don't do this usually, I'd like to ask for a quick look and some advice from those who do. My question is: is this acceptable?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 17 / January / 2013, 21:45:51
patch to sx110is 100b: new loader tested and exp_drv task implemented.

Report and comments here (http://chdk.setepontos.com/index.php?topic=2838.msg95798#msg95798).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / January / 2013, 22:54:34
I have a proposal which would be of help for cameras that have too few buttons (and no touchscreen). This would enable normal camera use for inexperienced users, and also enable more comfortable camera control for those who don't mind that the camera's On/Off button behaves differently when in ALT mode.
If I understand the patch file correctly,  this allows the On/Off button to substitute in <ALT> mode for one of the buttons that the CHDK code expects the camera to have but which is in fact not available on that camera.  Is that right ?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 18 / January / 2013, 03:12:26
patch to sx110is 100b: new loader tested and exp_drv task implemented.

Report and comments here (http://chdk.setepontos.com/index.php?topic=2838.msg95798#msg95798).

Added in revision 2490 (trunk) and 2491 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 18 / January / 2013, 03:26:50
I have a proposal which would be of help for cameras that have too few buttons (and no touchscreen). This would enable normal camera use for inexperienced users, and also enable more comfortable camera control for those who don't mind that the camera's On/Off button behaves differently when in ALT mode.

Background info: this kind of remap is currently permanently enabled in the Ixus110 port (which can be confusing for some).

The patch makes changes in core in order to introduce a new configurable option and a new menu item. Since I don't do this usually, I'd like to ask for a quick look and some advice from those who do. My question is: is this acceptable?

Looks ok - the only suggestion I have is to change the text slightly (the use of the word 'Off' could be confusing).
So instead of the default menu entry being
      OFF button in <ALT> mode       [Off    ]
change it to
      Power button in <ALT> mode   [Power]

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 18 / January / 2013, 15:58:24
Looks ok - the only suggestion I have is to change the text slightly (the use of the word 'Off' could be confusing).
So instead of the default menu entry being
      OFF button in <ALT> mode       [Off    ]
change it to
      Power button in <ALT> mode   [Power]
Thanks for the review and the suggestion. I used "Off" because that's what's written on the camera (considering non-English users, and the fact that the #define'd strings can not be localized).

There's one more thing I'm uncertain of. There are several issues with the buttons in general:
- there are new cameras (A series) with a fair amount of available buttons, but some of those are not used (KEY_VIDEO, KEY_HELP) except when chosen for the ALT button.
- there are cameras with more buttons (for ALT mode use) than needed, but some of those have no use in ALT mode (KEY_FACE for example), again, when not selected as ALT button. They could be configured as shortcuts (shooting / scripting / modules related use), according to one's liking.
- there may be a generic solution that doesn't need to be implemented individually for each camera

I don't know whether there are plans to address the above issues. If there's a plan, my current work may be in conflict.

If it's not a problem, I'll commit my (corrected) solution.

If I understand the patch file correctly,  this allows the On/Off button to substitute in <ALT> mode for one of the buttons that the CHDK code expects the camera to have but which is in fact not available on that camera.  Is that right ?
Yes, although it could be implemented for a button other than "power" too. In that case the menu text will have to be changed.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 18 / January / 2013, 16:20:55
Looks ok - the only suggestion I have is to change the text slightly (the use of the word 'Off' could be confusing).
So instead of the default menu entry being
      OFF button in <ALT> mode       [Off    ]
change it to
      Power button in <ALT> mode   [Power]
Thanks for the review and the suggestion. I used "Off" because that's what's written on the camera (considering non-English users, and the fact that the #define'd strings can not be localized).

Hadn't thought of that, good point. On all my cameras the button is labelled ON/OFF (in caps) so perhaps the menu should be:
     ON/OFF button in <ALT> mode  [OFF  ]
Are cameras labelled with ON/OFF in non-English countries?

Quote
There's one more thing I'm uncertain of. There are several issues with the buttons in general:
- there are new cameras (A series) with a fair amount of available buttons, but some of those are not used (KEY_VIDEO, KEY_HELP) except when chosen for the ALT button.
- there are cameras with more buttons (for ALT mode use) than needed, but some of those have no use in ALT mode (KEY_FACE for example), again, when not selected as ALT button. They could be configured as shortcuts (shooting / scripting / modules related use), according to one's liking.
- there may be a generic solution that doesn't need to be implemented individually for each camera

I don't know whether there are plans to address the above issues. If there's a plan, my current work may be in conflict.


Adding user configurable shortcuts is something I've been thinking about for a while; but the number of cameras and button combinations makes any generic solution very hard (at least I haven't found a simple way to do it yet).

Unless someone else has any issues with this, I don't see any reason not to add it.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 18 / January / 2013, 16:29:31
Hadn't thought of that, good point. On all my cameras the button is labelled ON/OFF (in caps) so perhaps the menu should be:
     ON/OFF button in <ALT> mode  [OFF  ]
Are cameras labelled with ON/OFF in non-English countries?
According to a quick image search for a random "Ixy" model, even Japanese cameras have English labels.

Quote
Unless someone else has any issues with this, I don't see any reason not to add it.
OK, if no objections, I'll check it in.

edit: https://trac.assembla.com/chdk/changeset/2498/
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Konrad127123 on 19 / January / 2013, 13:23:44
When CHDK gets a GPS fix from gps_get_data(), it doesn't check whether the latitude coordinates are North or South or if the longitude coordinates are East or West. The attached patch fixes this behaviour by making the latitude/longitude negative if it is South/West respectively, which is what the rest of the code expects.

I've tested the patch on my SX230HS when I was somewhere with coordinates which were North and West and it worked correctly.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 19 / January / 2013, 23:10:12
a3400 100f port ALPHA version. Tested by TuDo.

capt_seq.c in a3400 101a was updated, but this version remains untested.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 19 / January / 2013, 23:38:23
a3400 100f port ALPHA version. Tested by TuDo.

capt_seq.c in a3400 101a was updated, but this version remains untested.

Added in revision 2500 (trunk) and 2501 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: rudi on 20 / January / 2013, 07:03:38
The gps patch from Konrad127123 is fine. I add this correct size definition for tGPS. The wrong century chars in DNGs dateStamp is the result of wrong tGPS.status size. tGPS size is always 0x110 and unknown2[] only 160 chars. For compare library gpsLib.lua for SX230, SX260 at here (http://forum.chdk-treff.de/viewtopic.php?f=7&t=2999).
Another thing, we should be use rounded pi-values in imath.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / January / 2013, 04:02:18
When CHDK gets a GPS fix from gps_get_data(), it doesn't check whether the latitude coordinates are North or South or if the longitude coordinates are East or West. The attached patch fixes this behaviour by making the latitude/longitude negative if it is South/West respectively, which is what the rest of the code expects.

I've tested the patch on my SX230HS when I was somewhere with coordinates which were North and West and it worked correctly.

The gps patch from Konrad127123 is fine. I add this correct size definition for tGPS. The wrong century chars in DNGs dateStamp is the result of wrong tGPS.status size. tGPS size is always 0x110 and unknown2[] only 160 chars. For compare library gpsLib.lua for SX230, SX260 at here (http://forum.chdk-treff.de/viewtopic.php?f=7&t=2999).
Another thing, we should be use rounded pi-values in imath.

Added in revision 2507 (trunk) and 2508 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 25 / January / 2013, 00:08:15
I'll move this to its own thread - I came up with a couple of other ideas overnight that are probably worth a seperate discussion.

A small patch to the motion detection code to display on the camera's LCD in real time the changes in luminescence that CHDK measures.  It displays when the "show grid" option is used with md_detect_motion().   The calculated change value for each zone is drawn as text in the center of each zone rectangle.

This change should be pretty useful for users trying to tune an MD script as they will actually be able to see the measured value that CHDK compares to their passed threshold-value parameter.  A lot simpler that playing the "tweak the parameter until it appears to work"  game that people play now.

Note : I've also implement this as just a Lua script using the md_get_cell_diff() function and Lua drawing functions.  However,  the output is not as pretty and as it has not been done in any of the published scripts yet, it is not really available to the average CHDK user.  Adding it to the MD code makes it available to all.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 25 / January / 2013, 22:55:27
I'd like to ask for permission to do the following changes in core:
Code: [Select]
Index: core/ptp.c
===================================================================
--- core/ptp.c (revision 2515)
+++ core/ptp.c (working copy)
@@ -650,7 +650,7 @@
   }
 
   // send response
-  data->send_resp( data->handle, &ptp );
+  data->send_resp( data->handle, &ptp, 0 );
   
   return 1;
 }
Index: core/ptp_chdk.h
===================================================================
--- core/ptp_chdk.h (revision 2515)
+++ core/ptp_chdk.h (working copy)
@@ -30,7 +30,7 @@
     int handle;
     int (*send_data)(int handle, const char *buf, int part_size, int total_size, int, int, int); // (0xFF9F525C), total_size should be 0 except for the first call
     int (*recv_data)(int handle, char *buf, int size, int, int); // (0xFF9F5500)
-    int (*send_resp)(int handle, PTPContainer *resp); // (0xFF9F5688)
+    int (*send_resp)(int handle, PTPContainer *resp, int zero); // (0xFF9F5688), ixus30/40 needs a third argument, which is always 0
     int (*get_data_size)(int handle); // (0xFF9F5830)
     int (*send_err_resp)(int handle, PTPContainer *resp); // (0xFF9F5784)
     int unknown1; // ???
and
Code: [Select]
Index: platform/generic/wrappers.c
===================================================================
--- platform/generic/wrappers.c (revision 2515)
+++ platform/generic/wrappers.c (working copy)
@@ -109,7 +109,7 @@
     char    unk6;
 } flashParam;
 
-short get_parameter_size(long id)
+short __attribute__((weak)) get_parameter_size(long id)
 {
     extern flashParam* FlashParamsTable[];
 
I believe that both are harmless.
I'd like to integrate my ixus30/sd200 port, the above changes are needed for correct operation. I plan to fix some issues on the ixus40/sd300 port too.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / January / 2013, 01:02:08
I'd like to ask for permission to do the following changes in core:
Both seem fine to me. I think we discussed the send_resp one before in the ptp thread.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 26 / January / 2013, 10:40:53
Both seem fine to me. I think we discussed the send_resp one before in the ptp thread.
Yes. I repeated it as that talk was months ago.

I have another question about changeset 2516 (https://trac.assembla.com/chdk/changeset/2516). I can't simply merge it back into release-1_1 because of structural changes. Should I make an independent commit (without svn mergeinfo), or port the changeset back with mergeinfo?

And finally: should I use this (http://chdk.setepontos.com/index.php?topic=2509.0) thread for questions like this? I feel a bit off-topic here...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 26 / January / 2013, 16:16:06
patch to fix palette in a810.
Bug was reported here (http://chdk.setepontos.com/index.php?topic=8450.msg95856#msg95856)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / January / 2013, 01:57:13
Code: [Select]
Index: platform/generic/wrappers.c
===================================================================
--- platform/generic/wrappers.c (revision 2515)
+++ platform/generic/wrappers.c (working copy)
@@ -109,7 +109,7 @@
     char    unk6;
 } flashParam;
 
-short get_parameter_size(long id)
+short __attribute__((weak)) get_parameter_size(long id)
 {
     extern flashParam* FlashParamsTable[];
 
I believe that both are harmless.
I'd like to integrate my ixus30/sd200 port, the above changes are needed for correct operation. I plan to fix some issues on the ixus40/sd300 port too.

Sorry I didn't reply earlier, I'm away for the long weekend holiday here.

For the FlashParamsTable fix I think it would be better to add a #define for this table version to camera.h and set the correct structure definition in wrappers.c based on the #define. This probably affects other cameras.

I added the get_parameter_size function in my recent reorg to remove the hard wired logic elsewhere. Unless I got this all wrong the current release version will also not work properly. See the code in luascript.c that gets the size value from the table. If this the case then get_parameter_size should be added to the release version.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 27 / January / 2013, 08:22:34
For the FlashParamsTable fix I think it would be better to add a #define for this table version to camera.h and set the correct structure definition in wrappers.c based on the #define. This probably affects other cameras.
To my knowledge the only cameras with this structure variant are the Ixus30 and 40, and the third exception would be the S1IS with yet another variant.
Quote
I added the get_parameter_size function in my recent reorg to remove the hard wired logic elsewhere. Unless I got this all wrong the current release version will also not work properly. See the code in luascript.c that gets the size value from the table. If this the case then get_parameter_size should be added to the release version.
There's nothing wrong with your code, the Ixus40 style flash params table was never supported. The port used a workaround to not crash on regular camera use.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 27 / January / 2013, 10:31:20
a2300 100e port - alpha
Reports here (http://chdk.setepontos.com/index.php?topic=8318.msg96121#msg96121)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 28 / January / 2013, 20:29:45
@philmoz
Attached is the backport of changesets 2516-2519, including get_parameter_size, for review. I have used a new #define here, it could be used in trunk too if it looks right.
(it's tested and works)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / January / 2013, 02:54:12
patch to fix palette in a810.
Bug was reported here (http://chdk.setepontos.com/index.php?topic=8450.msg95856#msg95856)

a2300 100e port - alpha
Reports here (http://chdk.setepontos.com/index.php?topic=8318.msg96121#msg96121)


Both added in revision 2521 (trunk) and 2522 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / January / 2013, 03:33:07
@philmoz
Attached is the backport of changesets 2516-2519, including get_parameter_size, for review. I have used a new #define here, it could be used in trunk too if it looks right.
(it's tested and works)

Looks ok. I assume you'll commit this when ready.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 29 / January / 2013, 16:39:18
Looks ok. I assume you'll commit this when ready.
Done (https://trac.assembla.com/chdk/changeset/2523/).

For the FlashParamsTable fix I think it would be better to add a #define for this table version to camera.h and set the correct structure definition in wrappers.c based on the #define.
After doing it this way in release-1_1, I have done the same for trunk (https://trac.assembla.com/chdk/changeset/2524/).
Feel free to move the new #define elsewhere in camera.h, as it's something that nobody else will use. The version number is due to the following, you can change it if you want to:
the only cameras with this structure variant are the Ixus30 and 40, and the third exception would be the S1IS with yet another variant.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 29 / January / 2013, 17:47:49
ixus90_sd790 new loader. Tested by NormalA (http://chdk.setepontos.com/index.php?action=profile;u=9392). Thanks.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 02 / February / 2013, 14:08:34
a3400 101b port (ALPHA)  Thanks to tobyjones8 (http://chdk.setepontos.com/index.php?action=profile;u=25124) for testing.

Fix exp_drv_task and code cleanup in a3400 100f and a3400 101a.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / February / 2013, 20:09:00
Motion detect changes for A1200 - both f/w versions.

Changes to stable trunk version to fix incorrect address used for vid_get_viewport_live_fb().

Changes to dev trunk to use new sigfinder code version for faster detection per http://chdk.setepontos.com/index.php?topic=9366.msg96664#msg96664 (http://chdk.setepontos.com/index.php?topic=9366.msg96664#msg96664)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 06 / February / 2013, 21:02:39
ixus90_sd790 new loader. Tested by NormalA (http://chdk.setepontos.com/index.php?action=profile;u=9392). Thanks.

a3400 101b port (ALPHA)  Thanks to tobyjones8 (http://chdk.setepontos.com/index.php?action=profile;u=25124) for testing.

Fix exp_drv_task and code cleanup in a3400 100f and a3400 101a.

Motion detect changes for A1200 - both f/w versions.

Changes to stable trunk version to fix incorrect address used for vid_get_viewport_live_fb().

Changes to dev trunk to use new sigfinder code version for faster detection per http://chdk.setepontos.com/index.php?topic=9366.msg96664#msg96664 (http://chdk.setepontos.com/index.php?topic=9366.msg96664#msg96664)


Added in revision 2549 (trunk) and 2550 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 07 / February / 2013, 00:03:07
A small patch file to fix the LED mapping for the IXUS120_SD940.  Patch works for both 1.1.0 and 1.2.0 trunks.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 07 / February / 2013, 00:12:09
A small patch file to fix the LED mapping for the IXUS120_SD940.  Patch works for both 1.1.0 and 1.2.0 trunks.


Added in 2551 (trunk) and 2552 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: rudi on 08 / February / 2013, 06:26:53
Patch enabled DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY on sx260 and cleanup stubs.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 08 / February / 2013, 07:43:11
Patch enabled DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY on sx260 and cleanup stubs.

Added in revision 2557 (trunk) and 2558 (release-1.1 - stubs changes only).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 09 / February / 2013, 11:16:06
Update for Croatian language file-developer version 1.2
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 10 / February / 2013, 15:02:55
Small patch for camera_set_led() function of the A1200.   
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 10 / February / 2013, 15:39:07
a2300 100f port (ALPHA)
Thanks to merxator and stefanb for testing.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / February / 2013, 20:41:13
Update for Croatian language file-developer version 1.2
Added, trunk changeset 2561 (http://trac.assembla.com/chdk/changeset/2561)

Small patch for camera_set_led() function of the A1200.   
Added, trunk changeset 2562 (http://trac.assembla.com/chdk/changeset/2562), stable changeset 2563 (http://trac.assembla.com/chdk/changeset/2563)

Edit:
a2300 100f port (ALPHA)
Thanks to merxator and stefanb for testing.
Added trunk changeset 2565 (http://trac.assembla.com/chdk/changeset/2565) stable changeset 2566 (http://trac.assembla.com/chdk/changeset/2566)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 16 / February / 2013, 10:06:09
As written here (http://chdk.setepontos.com/index.php?topic=265.msg96940#msg96940), running the trunk version of the benchmark seems to make all (DIGIC ... DIGIC III) cameras shut down in the middle of tests.
Attached is a possible solution. I have split the 4 memory related tests into separate functions, and left the rest in place. Leaving the O0 attribute on gui_bench_run() also works now (the patch doesn't include it).
I'd like to ask for others' opinion.
I don't mind if I'm not the one committing this, especially if it could be (further) improved.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 16 / February / 2013, 10:56:58
Patch file to add a script function md_get_cell_val() that returns motion detection actual cell values rather than just differences as returned by md_get_cell_diff().

Discussion thread is here :  http://chdk.setepontos.com/index.php?topic=9437.0 (http://chdk.setepontos.com/index.php?topic=9437.0)

Per the linked thread, function can be useful in MD scripts for determining if a scene has returned to its original quiescent state.  Should also be very handy for implementing AGC for the md_detect_motion()'s sensitivity parameter.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / February / 2013, 11:17:15
Two small patches to enable MD testing for the G10 and ixus120_sd940.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 17 / February / 2013, 11:28:47
For vxworks, we need to find sys_mempart_id, which I haven't finished doing for all cameras. Baring typos, I think to should be safe to turn on for all that have been found.
From a quick look, sys_mempart_id could be found by looking at an eventproc named "memShow" which is a wrapper for memPartShow. The latter needs sys_mempart_id as its first param.
Done. I have also verified the already found values (A, G series) except for a570 101a (that dump seems to be missing from the "collection"). Patch attached, enables CAM_FIRMWARE_MEMINFO  for all VxWorks ports which support it.
I chose not to commit this without consent, as it has impact on many ports and the only one I can test is the Ixus65.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 17 / February / 2013, 21:24:39
Patch file to add a script function md_get_cell_val() that returns motion detection actual cell values rather than just differences as returned by md_get_cell_diff().

Discussion thread is here :  http://chdk.setepontos.com/index.php?topic=9437.0 (http://chdk.setepontos.com/index.php?topic=9437.0)

Per the linked thread, function can be useful in MD scripts for determining if a scene has returned to its original quiescent state.  Should also be very handy for implementing AGC for the md_detect_motion()'s sensitivity parameter.



Two small patches to enable MD testing for the G10 and ixus120_sd940.

Added in revision 2581 (trunk only).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 17 / February / 2013, 21:30:13
For vxworks, we need to find sys_mempart_id, which I haven't finished doing for all cameras. Baring typos, I think to should be safe to turn on for all that have been found.
From a quick look, sys_mempart_id could be found by looking at an eventproc named "memShow" which is a wrapper for memPartShow. The latter needs sys_mempart_id as its first param.
Done. I have also verified the already found values (A, G series) except for a570 101a (that dump seems to be missing from the "collection"). Patch attached, enables CAM_FIRMWARE_MEMINFO  for all VxWorks ports which support it.
I chose not to commit this without consent, as it has impact on many ports and the only one I can test is the Ixus65.

Perhaps add the stubs_min.S values with a comment that it is untested and to enable the option in platform_camera.h to test.
Add the values in platform_camera.h commented out with instructions to enable & test.

That way the info is not lost; but won't break any existing ports.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / February / 2013, 21:32:53
Added in revision 2581 (trunk only).
thnks !
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 19 / February / 2013, 04:11:00
a810 and a1300

a1300 only
   
a810 only

a1300 was updated with changes done to a810 (BETA), so A1300 was marked as BETA release.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 19 / February / 2013, 05:42:26
a810 and a1300
  • stubs_entry_2.S cleanup
  • platform_camera.h
        - Duplicated CAM_USES_ASPECT_CORRECTION was deleted
        - CAM_AF_LED was defined
  • lib.c
        - Unused variables were deleted
        - shutdown_soft() was deleted
        - camera_set_led() revised
        - _LockAndRefresh() and _UnlockAndRefresh() replaced by _ScreenLock() and _ScreenUnlock() respectively.
  • stubs_min.S: some_flag_for_af_scan was defined.
  • main.c:
        - Unused variable deleted
  • notes.txt updated

a1300 only
  • CAM_LOAD_CUSTOM_COLORS enabled, CAM_BITMAP_PALETTE=13
   
a810 only
  • CAM_PROPSET changed to 5

a1300 was updated with changes done to a810 (BETA), so A1300 was marked as BETA release.


Added in revision 2584.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 19 / February / 2013, 19:30:37
a3400 101a
* Remove duplicated CAM_USES_ASPECT_CORRECTION definition in platform_camera.h
* vid_get_viewport_live_fb() implemented using viewport_buffers and active_viewport_buffer
* EXMEM_BUFFER_SIZE = 1MB
* Unused variables deleted
* a3400 101a ready to autobuild

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 20 / February / 2013, 18:11:36
a3200 newloader and unused variables deletion in main.c
tested by ricardo28 (http://chdk.setepontos.com/index.php?action=profile;u=23859) on 3200 100d.  Thanks
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 21 / February / 2013, 22:01:31
Small patch to fix some errors reported by cppcheck. 

Code: [Select]
[core/gps.c:1175]: (error) Buffer is accessed out of bounds.
=> gpx_name[17] resized to gpx_name[30] to store sprintf(gpx_name, "A/GPS/Logging/%02d_%02d-%02d_%02d.gpx",...)

[core/gps.c:1339]: (error) Resource leak: fp
=> fclose(fp) missing

[core/gui_script.c:157]: (style) Variable 'i' is assigned a value that is never used.
[core/gui_script.c:186]: (style) Variable 'i' is assigned a value that is never used.
[core/gui_script.c:507]: (style) Unused variable: i

[core/shooting.c:1512]: (style) Same expression on both sides of '||'.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 21 / February / 2013, 23:00:22
Small patch to fix some errors reported by cppcheck. 
You could be about to become very very busy ....  ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / February / 2013, 03:19:55
a3400 101a
* Remove duplicated CAM_USES_ASPECT_CORRECTION definition in platform_camera.h
* vid_get_viewport_live_fb() implemented using viewport_buffers and active_viewport_buffer
* EXMEM_BUFFER_SIZE = 1MB
* Unused variables deleted
* a3400 101a ready to autobuild


a3200 newloader and unused variables deletion in main.c
tested by ricardo28 (http://chdk.setepontos.com/index.php?action=profile;u=23859) on 3200 100d.  Thanks
Small patch to fix some errors reported by cppcheck. 

Code: [Select]
[core/gps.c:1175]: (error) Buffer is accessed out of bounds.
=> gpx_name[17] resized to gpx_name[30] to store sprintf(gpx_name, "A/GPS/Logging/%02d_%02d-%02d_%02d.gpx",...)

[core/gps.c:1339]: (error) Resource leak: fp
=> fclose(fp) missing

[core/gui_script.c:157]: (style) Variable 'i' is assigned a value that is never used.
[core/gui_script.c:186]: (style) Variable 'i' is assigned a value that is never used.
[core/gui_script.c:507]: (style) Unused variable: i

[core/shooting.c:1512]: (style) Same expression on both sides of '||'.

All added in revisions 2585 - 2590 (trunk & release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 23 / February / 2013, 16:48:38
a2300, a3400, a810, a1300: makefile.inc. Patch to fix comments of how EXMEM_HEAP_SKIP was obtained.
a2300: unused variables deleted

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / February / 2013, 22:04:03
a2300, a3400, a810, a1300: makefile.inc. Patch to fix comments of how EXMEM_HEAP_SKIP was obtained.
a2300: unused variables deleted



Added in revision 2593 (trunk) and 2594 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 24 / February / 2013, 17:33:25
For vxworks, we need to find sys_mempart_id, which I haven't finished doing for all cameras. Baring typos, I think to should be safe to turn on for all that have been found.
From a quick look, sys_mempart_id could be found by looking at an eventproc named "memShow" which is a wrapper for memPartShow. The latter needs sys_mempart_id as its first param.
Done. I have also verified the already found values (A, G series) except for a570 101a (that dump seems to be missing from the "collection"). Patch attached, enables CAM_FIRMWARE_MEMINFO  for all VxWorks ports which support it.
I chose not to commit this without consent, as it has impact on many ports and the only one I can test is the Ixus65.

Perhaps add the stubs_min.S values with a comment that it is untested and to enable the option in platform_camera.h to test.
Add the values in platform_camera.h commented out with instructions to enable & test.

That way the info is not lost; but won't break any existing ports.

Phil.
I don't think there are many people out there who compile CHDK from source. Probably even less who look into the source before. And probably only a fraction of those will ever mess with an old (= VxWorks) camera.
My main concern about enabling CAM_FIRMWARE_MEMINFO for all Vx ports is that I have not verified the memPartInfoGet function for most of them. That said, the sigfinder appears to be 100% certain about its address in all cases.
Memory information is used (I may have missed something):
- when someone clicks on that menu entry
- from Lua (get_meminfo)
- in PTP, performance is horrible without it
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 24 / February / 2013, 17:55:03
My main concern about enabling CAM_FIRMWARE_MEMINFO for all Vx ports is that I have not verified the memPartInfoGet function for most of them. That said, the sigfinder appears to be 100% certain about its address in all cases.
I think I missed this discussion the first time around. IMO, enabling something based on 100% sig finder match, and manual spot checks on a few ports is OK. I enabled it for all dryos cams in the trunk on the same basis.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 24 / February / 2013, 17:57:29
And probably only a fraction of those will ever mess with an old (= VxWorks) camera.
My guess is that the fraction of all the people who use CHDK and mess with old (= VxWorks) cameras is probably just one person.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 24 / February / 2013, 18:04:13
I think I missed this discussion the first time around. IMO, enabling something based on 100% sig finder match, and manual spot checks on a few ports is OK. I enabled it for all dryos cams in the trunk on the same basis.
OK, I will check 1-2 firmware out of each "generation", then I'll risk the commit...
And probably only a fraction of those will ever mess with an old (= VxWorks) camera.
My guess is that the fraction of all the people who use CHDK and mess with old (= VxWorks) cameras is probably just one person.
8)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 24 / February / 2013, 20:50:42
Small fix for the A1200 - stable & unstable branch.   Per this post : http://chdk.setepontos.com/index.php?topic=9482.msg97203#msg97203 (http://chdk.setepontos.com/index.php?topic=9482.msg97203#msg97203)  it appears that shooting_get_prop(PROPCASE_ASPECT_RATIO) very occassionally returns a value out of the expected 0-3 range.  The code was returning the same value regardless when the value was in range so I just locked it there.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 25 / February / 2013, 04:29:23
Small fix for the A1200 - stable & unstable branch.   Per this post : http://chdk.setepontos.com/index.php?topic=9482.msg97203#msg97203 (http://chdk.setepontos.com/index.php?topic=9482.msg97203#msg97203)  it appears that shooting_get_prop(PROPCASE_ASPECT_RATIO) very occassionally returns a value out of the expected 0-3 range.  The code was returning the same value regardless when the value was in range so I just locked it there.


Added in revisions 2598 (trunk) and 2599 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 01 / March / 2013, 19:38:58
a2300 100c port (ALPHA)
tested by akiro021 and mainakm

EDIT: I posted the patch again, to include changes in camera_list.csv.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / March / 2013, 00:42:04
a2300 100c port (ALPHA)
tested by akiro021 and mainakm

EDIT: I posted the patch again, to include changes in camera_list.csv.

Added in revision 2608 (trunk) and 2609 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 02 / March / 2013, 02:29:03
Patch to sx50 100b and 100c
Well, this patch for 100b and 100c includes:
 *  the previous capt_seq.c patch to fix call to wait_until_remote_button_is_released
 * EXMEM_BUFFER_SIZE and EXMEM_HEAP_SKIP
 * Implementation of void *vid_get_viewport_fb() void *vid_get_viewport_live_fb() as done in g12.
File was posted here sx50_100b_100c_trunk2606.patch.gz (http://chdk.setepontos.com/index.php?action=dlattach;topic=8932.0;attach=7886).
Tests and reports here (http://chdk.setepontos.com/index.php?topic=8932.msg97403#msg97403)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / March / 2013, 05:46:12
Patch to sx50 100b and 100c
Well, this patch for 100b and 100c includes:
 *  the previous capt_seq.c patch to fix call to wait_until_remote_button_is_released
 * EXMEM_BUFFER_SIZE and EXMEM_HEAP_SKIP
 * Implementation of void *vid_get_viewport_fb() void *vid_get_viewport_live_fb() as done in g12.
File was posted here sx50_100b_100c_trunk2606.patch.gz (http://chdk.setepontos.com/index.php?action=dlattach;topic=8932.0;attach=7886).
Tests and reports here (http://chdk.setepontos.com/index.php?topic=8932.msg97403#msg97403)


Added in revision 2610 (trunk) and 2611 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: lapser on 02 / March / 2013, 09:01:42
Added in revision 2610 (trunk) and 2611 (release-1.1).
Thanks nafraf and Phil.

Also, the jpg size is actually 4000 x 3000 instead of this:

    #define CAM_JPEG_WIDTH                      4072
    #define CAM_JPEG_HEIGHT                     3044
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 02 / March / 2013, 13:11:21
A4000IS port (ALPHA)
100c and 101a remain untested.
101b can be added to autobuild, it was tested by ricardo28.
Thanks.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / March / 2013, 15:35:32
Added in revision 2610 (trunk) and 2611 (release-1.1).
Thanks nafraf and Phil.

Also, the jpg size is actually 4000 x 3000 instead of this:

    #define CAM_JPEG_WIDTH                      4072
    #define CAM_JPEG_HEIGHT                     3044


That's ok.

Many of the ports (including mine) define the image size for DNG images to use the whole of the active sensor area. Canon choose to crop their JPEG images smaller than the active area.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / March / 2013, 15:58:15
A4000IS port (ALPHA)
100c and 101a remain untested.
101b can be added to autobuild, it was tested by ricardo28.
Thanks.


Added in revision 2612 (trunk) and 2613 (release-1.1)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 02 / March / 2013, 19:05:08
I think I missed this discussion the first time around. IMO, enabling something based on 100% sig finder match, and manual spot checks on a few ports is OK. I enabled it for all dryos cams in the trunk on the same basis.
OK, I will check 1-2 firmware out of each "generation", then I'll risk the commit...
I've checked this in. https://trac.assembla.com/chdk/changeset/2614/ and https://trac.assembla.com/chdk/changeset/2615/
memPartInfoGet is a VxWorks library function. It's present in all VxWorks firmwares (except s1, ixus30, ixus40), but is only used in the earliest models. The routine looks exactly the same in every firmware (except the BL instructions).
Checked the following disassemblies:
a530 100a: ok
a550 100c: ok
a560 100a: ok
a570 100e: ok
a610 100e: ok
a620 100f: ok
a630 100c: ok
a640 100b: ok
a700 100b: ok
a710 100a: ok
g7 100e: ok
ixus50 101a: ok
ixus55 100b: ok
ixus60 100a: ok
ixus65 100a: ok
ixus700 101a: ok
ixus70 101b: ok
ixus750 100g: ok
ixus75 100b: ok
ixus800 100b: ok
ixus850 100e: ok
ixus900 100c: ok
ixus950 100c: ok
ixusizoom_sd30 100g: ok
s2is 100f: ok
s3is 100a: ok
tx1 100g: ok
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / March / 2013, 19:09:02
I would have started doing this (or enabling it) in the trunk only. Sorry I wasn't clear about this in my previous post. It's probably OK.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 02 / March / 2013, 19:41:43
I would have started doing this (or enabling it) in the trunk only. Sorry I wasn't clear about this in my previous post. It's probably OK.
Hmmm, I should have read your sentence a bit more thoroughly.
Quote
I enabled it for all dryos cams in the trunk on the same basis.
And yes, it's really not mass-enabled in 1.1 ...  :-[

I have no doubt that the function is actually the correct one in every case though. Checked 1 fw version for every camera manually.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / March / 2013, 19:50:13
I have no doubt that the function is actually the correct one in every case though. Checked 1 fw version for every camera manually.
Yeah, I think it's fine. And meminfo has been enabled in the trunk for dryos a long time without problems, so we could probably move that over too. It sort of qualifies as a bug fix, because the malloc version can cause crashes in ptp...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 02 / March / 2013, 20:19:23
1.1 autobuild broke down while compiling the a4000 port.

Due to recent changes, trunk and 1.1 platform files are no longer compatible. We may need a checklist about things that are different.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / March / 2013, 20:37:10
Due to recent changes, trunk and 1.1 platform files are no longer compatible.
Which ones?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / March / 2013, 21:19:02
Due to recent changes, trunk and 1.1 platform files are no longer compatible.
Which ones?
Looks like the recent keyboard changes.

I've disabled a4000 in 1.1. for now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 02 / March / 2013, 21:36:42
Looks like the recent keyboard changes.

I've disabled a4000 in 1.1. for now.
kbd_get_autoclicked_key() was removed from trunk.
this patch adds kbd_get_autoclicked_key() to a4000 stable.


Solved, this patch is not necessary.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / March / 2013, 21:37:27
Due to recent changes, trunk and 1.1 platform files are no longer compatible.
Which ones?
Looks like the recent keyboard changes.

I've disabled a4000 in 1.1. for now.

Fixed and re-enabled auto-build for A4000 1.01b.

I'll merge the 'kbd_get_autoclicked_key' changes to release-1.1 so the platform stuff should be compatible again.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 07 / March / 2013, 10:46:28
A4000 patch
camera_set_led(...) enabled.  led_table[] values confirmed by rkomar.
Reported  here (http://chdk.setepontos.com/index.php?topic=9443.msg97599#msg97599)

EDIT:
Patch had 0 downloads, so I modified it to fix behavior of set_led: 0 LED is off 1 LED is on

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 08 / March / 2013, 03:25:30
A4000 patch
camera_set_led(...) enabled.  led_table[] values confirmed by rkomar.
Reported  here (http://chdk.setepontos.com/index.php?topic=9443.msg97599#msg97599)

EDIT:
Patch had 0 downloads, so I modified it to fix behavior of set_led: 0 LED is off 1 LED is on


Added in revision 2620 (trunk) and 2621 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 09 / March / 2013, 10:21:04
a810/a1300
Patch to fix behavior of set_led: 0 LED is off 1 LED is on
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / March / 2013, 22:13:07
a810/a1300
Patch to fix behavior of set_led: 0 LED is off 1 LED is on


Added in revision 2625 (trunk) and 2626 (release-1.1).
Revision 2626 also include the changes from 2584 that I missed merging into the release-1.1 branch previously.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 11 / March / 2013, 07:34:00
sx50hs
- New loader implemented
- Fix to modemap table
- Fix to remove crash during video recording

Reports here (http://chdk.setepontos.com/index.php?topic=8932.msg97732#msg97732)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 13 / March / 2013, 05:12:17
sx50hs
- New loader implemented
- Fix to modemap table
- Fix to remove crash during video recording

Reports here (http://chdk.setepontos.com/index.php?topic=8932.msg97732#msg97732)

Added in revisions 2633 (trunk) and 2634 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 15 / March / 2013, 20:19:21
s100 102a port ALPHA
tested by m4tt, reports here (http://chdk.setepontos.com/index.php?topic=7887.210)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / March / 2013, 22:14:01
s100 102a port ALPHA
tested by m4tt, reports here (http://chdk.setepontos.com/index.php?topic=7887.210)

Added in revision 2637 (trunk) and 2638 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 22 / March / 2013, 23:01:24
Patch to fix CHDK color palette for the sx50hs. 

Props to philmoz for his help :  http://chdk.setepontos.com/index.php?topic=8306.msg98194#msg98194 (http://chdk.setepontos.com/index.php?topic=8306.msg98194#msg98194)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / March / 2013, 00:00:50
Patch to fix CHDK color palette for the sx50hs. 

Props to philmoz for his help :  http://chdk.setepontos.com/index.php?topic=8306.msg98194#msg98194 (http://chdk.setepontos.com/index.php?topic=8306.msg98194#msg98194)



Added in revision 2647 (trunk) and 2648 (release-1.1).

I also change the 'vid_get_palette_type' value to 5 since this will need new code in chdkptp to cater for the altered transparency values.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 23 / March / 2013, 18:40:09
ixus125_elph110hs port

100d remains untested (SKIP_AUTOBUILD)
100e tested by Hardware-Hacker
101a tested by MKR
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / March / 2013, 20:39:31
Fix for sx50hs Canon color corruption problem reported here :
http://chdk.setepontos.com/index.php?topic=8932.msg98227#msg98227 (http://chdk.setepontos.com/index.php?topic=8932.msg98227#msg98227)


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / March / 2013, 21:05:50
ixus125_elph110hs port

100d remains untested (SKIP_AUTOBUILD)
100e tested by Hardware-Hacker
101a tested by MKR

Fix for sx50hs Canon color corruption problem reported here :
http://chdk.setepontos.com/index.php?topic=8932.msg98227#msg98227 (http://chdk.setepontos.com/index.php?topic=8932.msg98227#msg98227)


Added in revision 2650 (trunk) and 2651 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 24 / March / 2013, 21:14:36
Patch to fix crashing when using USB remote in "sync" mode for the sx240hs & sx260hs  (and possibly other mystery crashes in any code that calls debug_led() ).

See :  http://chdk.setepontos.com/index.php?topic=7889.msg98326#msg98326 (http://chdk.setepontos.com/index.php?topic=7889.msg98326#msg98326)
and    http://chdk.setepontos.com/index.php?topic=7889.msg88724#msg88724 (http://chdk.setepontos.com/index.php?topic=7889.msg88724#msg88724)

Patch file for 1.2.0 trunk.  Patches the 1.1.0 trunk successfully too.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / March / 2013, 00:07:18
Patch to fix crashing when using USB remote in "sync" mode for the sx240hs & sx260hs  (and possibly other mystery crashes in any code that calls debug_led() ).
Added, trunk changeset 2653 (http://trac.assembla.com/chdk/changeset/2653) release changeset 2654 (http://trac.assembla.com/chdk/changeset/2654)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 29 / March / 2013, 05:52:39
This patch adds "#define CAM_HAS_VIDEO_BUTTON" to some models where it is missing:
a810, a1300, a2300, a3400, a4000, s100, sx150hs


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 30 / March / 2013, 16:24:39
A few additions by rudi to the Lua integer math package as discussed here : fast integer based trigonometry for chdk and lua (http://chdk.setepontos.com/index.php?topic=9131.msg98523#msg98523)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / March / 2013, 20:59:58
This patch adds "#define CAM_HAS_VIDEO_BUTTON" to some models where it is missing:
a810, a1300, a2300, a3400, a4000, s100, sx150hs


Added in revision 2655 (trunk) and 2656 (release-1.1).

A few additions by rudi to the Lua integer math package as discussed here : fast integer based trigonometry for chdk and lua (http://chdk.setepontos.com/index.php?topic=9131.msg98523#msg98523)

Added in revision 2655 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 01 / April / 2013, 18:54:10
yukia10's updates for lib.c for the sx50 per http://chdk.setepontos.com/index.php?topic=8932.msg98711#msg98711 (http://chdk.setepontos.com/index.php?topic=8932.msg98711#msg98711)

Patch file works for both stable and dev trunks.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / April / 2013, 03:09:32
yukia10's updates for lib.c for the sx50 per http://chdk.setepontos.com/index.php?topic=8932.msg98711#msg98711 (http://chdk.setepontos.com/index.php?topic=8932.msg98711#msg98711)

Patch file works for both stable and dev trunks.


Added in revision 2660 (trunk) and 2661 (release-1.1).

I made a small change to remove the redundant vp_w array (identical to vp_xo).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 03 / April / 2013, 19:41:25
Small patch file to :

1) change the status of the sx50hs to BETA and include it in the autobuild.
2) remove the BETA status from the A1200

Patch works for both stable & dev versions trunks  ( Gen 2 & Gen 3 :) )
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 03 / April / 2013, 21:38:13
Small patch to camera_list.csv:
* A1100 100c runs on 100b, it was reported by two users on 2011 (http://chdk.setepontos.com/index.php?topic=4727.msg64539#msg64539) and 2013 (http://chdk.setepontos.com/index.php?topic=9564.msg98391#msg98391)
* A2200 100b runs on 100c, patch was added to A2200 porting thread (http://chdk.setepontos.com/index.php?topic=6254.msg87389#msg87389) and there is a note on A2200 wikia page (http://chdk.wikia.com/wiki/A2200) confirming that.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / April / 2013, 01:51:38
1) change the status of the sx50hs to BETA and include it in the autobuild.
2) remove the BETA status from the A1200
Added trunk changeset 2663 (http://trac.assembla.com/chdk/changeset/2663), release changeset 2664 (http://trac.assembla.com/chdk/changeset/2664)

* A1100 100c runs on 100b, it was reported by two users on 2011 (http://chdk.setepontos.com/index.php?topic=4727.msg64539#msg64539) and 2013 (http://chdk.setepontos.com/index.php?topic=9564.msg98391#msg98391)
* A2200 100b runs on 100c, patch was added to A2200 porting thread (http://chdk.setepontos.com/index.php?topic=6254.msg87389#msg87389) and there is a note on A2200 wikia page (http://chdk.wikia.com/wiki/A2200) confirming that.
Added trunk changeset 2665 (http://trac.assembla.com/chdk/changeset/2665), release changeset 2666 (http://trac.assembla.com/chdk/changeset/2666)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 04 / April / 2013, 22:55:02
Hi, patch to fix zoom bugs in A495, A810, A1300:
- PROPCASE_DIGITAL_ZOOM_MODE added to propset3 and propset5 (tested on a495 and a810/sx260 respectively)
- A495, A810, A1300: CAM_USE_ALT_SET_ZOOM_POINT and CAM_USE_ALT_PT_MoveOpticalZoomAt defined.

additionally:
- A495: stubs_entry_2.S cleanup and camera_set_led() fix.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / April / 2013, 00:37:17
Hi, patch to fix zoom bugs in A495, A810, A1300:
Added in trunk changeset 2668 (http://trac.assembla.com/chdk/changeset/2668) release changeset 2669 (http://trac.assembla.com/chdk/changeset/2669)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: rudi on 05 / April / 2013, 06:26:56
Bugfix for imath library, Changeset 2655.
Patch and desciption please see here: http://chdk.setepontos.com/index.php?topic=9131.msg98857#msg98857 (http://chdk.setepontos.com/index.php?topic=9131.msg98857#msg98857)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / April / 2013, 23:27:02
Bugfix for imath library, Changeset 2655.
Patch and desciption please see here: http://chdk.setepontos.com/index.php?topic=9131.msg98857#msg98857 (http://chdk.setepontos.com/index.php?topic=9131.msg98857#msg98857)
Added, trunk changeset 2673 (http://trac.assembla.com/chdk/changeset/2673)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 06 / April / 2013, 15:48:01
A4000 patches
- 101a tested by atirage21, added to autobuild as ALPHA
- Fix to zoom bugs: CAM_USE_ALT_SET_ZOOM_POINT and CAM_USE_ALT_PT_MoveOpticalZoomAt defined
- New value for PAUSE_FOR_FILE_COUNTER.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / April / 2013, 17:44:21
I got tired of complaining about CHDK shortcut keys and did something about it.  This patch adds a menu item to the CHDK settings menu to allow shortcut keys to be enabled/disabled by the user. 

I realize a full user editable shortcut key menu with individual enable/disables and configurable button choices would be nicer.  But this is a good step and only took a few minutes to code and test.
 
For compatibility,  it defaults shortcuts to be enabled - a compromise I regret but will live with for the benefit of not further confusing new users.


Update :  cleaned up the help menu string spacing a bit.  Also capitalized the Enable Shortcut Keys menu item.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 06 / April / 2013, 19:30:27
A4000 patches
- 101a tested by atirage21, added to autobuild as ALPHA
- Fix to zoom bugs: CAM_USE_ALT_SET_ZOOM_POINT and CAM_USE_ALT_PT_MoveOpticalZoomAt defined
- New value for PAUSE_FOR_FILE_COUNTER.

Added in revision 2674 (trunk) and 2675 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 06 / April / 2013, 19:54:49
I got tired of complaining about CHDK shortcut keys and did something about it.  This patch adds a menu item to the CHDK settings menu to allow shortcut keys to be enabled/disabled by the user. 

I realize a full user editable shortcut key menu with individual enable/disables and configurable button choices would be nicer.  But this is a good step and only took a few minutes to code and test.
 
For compatibility,  it defaults shortcuts to be enabled - a compromise I regret but will live with for the benefit of not further confusing new users.


Update :  cleaned up the help menu string spacing a bit.  Also capitalized the Enable Shortcut Keys menu item.

A couple of comments:
- This clashes with my new modules branch on the CONF_INFO item (conf.c) and the new strings in english.lng. Can you move these please.
- The changes in gui_draw_alt_helper are hiding too many lines when you disable the shortcuts. LANG_HELP_HIDE_OSD and LANG_HELP_NOT_ALT should still display.
- The change in gui_kbd_shortcuts will also disable the manual focus overrides for camera that don't have built in manual focus.
- The change only disables Shutter Half Press + button shortcuts, the menu item text 'Enable Shortcut Keys' doesn't reflect this.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: lapser on 06 / April / 2013, 20:04:21
A couple of comments:
- The change in gui_kbd_shortcuts will also disable the manual focus overrides for camera that don't have built in manual focus.
- The change only disables Shutter Half Press + button shortcuts, the menu item text 'Enable Shortcut Keys' doesn't reflect this.
Would it work better where I suggested? Things are always more complicated than they seem in CHDK, aren't they?
http://chdk.setepontos.com/index.php?topic=8932.msg98899#msg98899 (http://chdk.setepontos.com/index.php?topic=8932.msg98899#msg98899)
Thanks Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / April / 2013, 20:37:49
A couple of comments:
- This clashes with my new modules branch on the CONF_INFO item (conf.c) and the new strings in english.lng. Can you move these please.
Sheesh  - you haven't updated those to the trunk yet.  Modified to leave a hole based on what's currently in the SVN for your branch.

Quote
- The changes in gui_draw_alt_helper are hiding too many lines when you disable the shortcuts. LANG_HELP_HIDE_OSD and LANG_HELP_NOT_ALT should still display.
Okay - changed to leave those in.

Quote
The change in gui_kbd_shortcuts will also disable the manual focus overrides for camera that don't have built in manual focus.
Changed to leave those enabled - I haven't accidentally hit those so far anyway.

Quote
The change only disables Shutter Half Press + button shortcuts, the menu item text 'Enable Shortcut Keys' doesn't reflect this.
Hmmm .. those are the only one I think of as an actual shortcuts.  Text changed.


Would it work better where I suggested?
No.  Your patch is right before the call to where I patched the code.  Doing it that way would make it impossible to leave the manual focus stuff enabled.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 06 / April / 2013, 20:40:25
Small patch to sx50/sx260:
sx50/sx260: CAM_USE_ALT_SET_ZOOM_POINT and CAM_USE_ALT_PT_MoveOpticalZoomAt defined
sx260: Configurable ALT button enabled. 
Tested by lapser, thanks
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 06 / April / 2013, 20:47:10
A couple of comments:
- This clashes with my new modules branch on the CONF_INFO item (conf.c) and the new strings in english.lng. Can you move these please.
Sheesh  - you haven't updated those to the trunk yet.  Modified to leave a hole based on what's currently in the SVN for your branch.

http://chdk.setepontos.com/index.php?topic=9532.msg98860#msg98860 (http://chdk.setepontos.com/index.php?topic=9532.msg98860#msg98860)

I was just about to merge my changes when you posted your patch - and I did say please :)

What about the CONF_INFO item for conf.enable_shortcuts (I'm using 294 for conf.module_logging)?
I'd prefer to put conf.enable_shortcuts as 295, otherwise it will make merging my branch harder.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / April / 2013, 20:54:34
What about the CONF_INFO item for conf.enable_shortcuts (I'm using 294 for conf.module_logging)?
I'd prefer to put conf.enable_shortcuts as 295, otherwise it will make merging my branch harder.
Done.

We could just wait until you've finished your merge if that makes it easier.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 06 / April / 2013, 21:15:51
What about the CONF_INFO item for conf.enable_shortcuts (I'm using 294 for conf.module_logging)?
I'd prefer to put conf.enable_shortcuts as 295, otherwise it will make merging my branch harder.
Done.

We could just wait until you've finished your merge if that makes it easier.

Added in revision 2679.

My module changes are in 2677 - fingers crossed it doesn't break too badly :)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / April / 2013, 21:30:00
Added in revision 2679.
My module changes are in 2677 - fingers crossed it doesn't break too badly :)
Need to remember to wipe the CCHDK3.CFG file.

Rebuilt now - everything looks good on the G10 & SX50.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: lapser on 06 / April / 2013, 23:28:11
Added in revision 2679.
My module changes are in 2677 - fingers crossed it doesn't break too badly :)
Need to remember to wipe the CCHDK3.CFG file.
Rebuilt now - everything looks good on the G10 & SX50.
You guys are incredible. Thanks for all the additions.

I'm assuming that  Lua to version 5.1.5 (Feb 2012 release) is now installed?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: javier_uy on 07 / April / 2013, 13:33:22
Hi everyone.

I have a canon A580 with firmware 1.00C...

Can I use CHDK with it?.  If not, can i load a new firmware into the cam?. If not... what can i do with this cam?...  :(

Thank's in advance

Javier.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 07 / April / 2013, 13:52:53
I have a canon A580 with firmware 1.00C...  Can I use CHDK with it?. 
CHDK is only available for the 1.01B version of the A580.  Its not likely that will work on a 1.00c camera.

Quote
If not, can i load a new firmware into the cam?.
No - Canon does not provide firmware updates unless there is a major bug.

Quote
If not... what can i do with this cam?...  :(
Hope somebody volunteers to do the port for you - this will require you to volunteer to do detailed testing.

link> CHDK FAQ : My camera isn't ported yet (http://chdk.wikia.com/wiki/FAQ#Q._My_camera_isn.27t_ported_yet._Is_a_port_planned.C2.A0.3F_When_will_it_be_ready.C2.A0.3F_How_can_I_help.C2.A0.3F)

Also,  it would be better if you posted follow ups this one of the A580 threads.  Somewhere like http://chdk.setepontos.com/index.php?topic=2900.0 (http://chdk.setepontos.com/index.php?topic=2900.0)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: javier_uy on 08 / April / 2013, 21:49:23
Thank's waterwingz for your fast answers!!

There's no problem to testing help, but i don't understand that this port would be used.
(Sorry for my bad english but is not my native languaje).

Thank's in advance
Javier
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / April / 2013, 21:57:24
There's no problem to testing help, but i don't understand that this port would be used.
Related post here :  http://chdk.setepontos.com/index.php?topic=2900.msg99002#msg99002 (http://chdk.setepontos.com/index.php?topic=2900.msg99002#msg99002)

If you send nafraf (http://chdk.setepontos.com/index.php?action=profile;u=23406) a PM (personal message - click on his icon) then I'm sure he can help you.  He is the CHDK blink port superstar.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: javier_uy on 08 / April / 2013, 22:07:03
Thank you!!!  I'll do.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / April / 2013, 04:22:15
Small patch to sx50/sx260:
sx50/sx260: CAM_USE_ALT_SET_ZOOM_POINT and CAM_USE_ALT_PT_MoveOpticalZoomAt defined
sx260: Configurable ALT button enabled. 
Tested by lapser, thanks

Added in revision 2690 (trunk) and 2691 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 09 / April / 2013, 13:17:46
Croatian language update,trunk and stable versions.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 14 / April / 2013, 10:10:28
a810/a1300,  a4000 patch to mute microphone if optical zoom is used during video recording.
(#define CAM_CAN_MUTE_MICROPHONE )

a810: Tested on 100b and 100d, addresses of TurnOffMic, TurnOnMic are the same for 100e, them patch was created for all fw versions.

a4000: Tested on 101b, addresses of TurnOffMic, TurnOnMic are the same for all firmware versions, then patch was created for all fw versions.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / April / 2013, 20:11:20
a810/a1300,  a4000 patch to mute microphone if optical zoom is used during video recording.
(#define CAM_CAN_MUTE_MICROPHONE )

a810: Tested on 100b and 100d, addresses of TurnOffMic, TurnOnMic are the same for 100e, them patch was created for all fw versions.

a4000: Tested on 101b, addresses of TurnOffMic, TurnOnMic are the same for all firmware versions, then patch was created for all fw versions.

Added in revision 2699 (trunk) and 2700 (revision-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / April / 2013, 20:13:34
Croatian language update,trunk and stable versions.

Added in revision 2701 (trunk) and 2702 (revision-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 16 / April / 2013, 15:56:00
s100: remove todos in rear jogdial and use proper value in kbd's sleeptask
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 17 / April / 2013, 14:22:00
I decided to improve the RAM dump feature which is in the CHDK core. I'd be grateful for any comments, critiques, suggestions.
Changes:
- the dump can be delayed by a few seconds (adjustable), can be useful for investigating halfshoot behaviour
- starting address and dump size can be specified
- doesn't try to dump when a movie is being recorded
- skips existing dump files (based on file name)
- new module for editing unsigned hexadecimal numbers, with decimal hint (not inline editor, I found that too complicated)

(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg197.imageshack.us%2Fimg197%2F1620%2Framdumpsubmenu.png&hash=1b0a64ae581221d0de0c6b87c6cef00c) (https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg407.imageshack.us%2Fimg407%2F9243%2Fhexbox.png&hash=291ef8ed4dbcd6183c1dcd84e2e5f01d)

Pros:
- you can make smaller dumps, if you know what you need (exmem allocation testing for example)
- having to dump the whole RAM on cameras with higher specs (128 or 256MB of RAM) can be painful
- the delay can be useful sometimes
- can be used with small free RAM (no Lua overhead)

Cons:
- increases core size
- setting up for dumping the whole RAM is not obvious (new menu entry needed ?)
- a Lua script could do the same in many cases
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 19 / April / 2013, 18:50:15
s100: remove todos in rear jogdial and use proper value in kbd's sleeptask

Added in revision 2705 (trunk) and 2706 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 19 / April / 2013, 19:07:04
a3200 100d and 100a: patch to mute microphone if optical zoom is used during video recording.
(#define CAM_CAN_MUTE_MICROPHONE), and MakeAFScan address fix.
Tested on a3200 100d by ricardo28. 
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 19 / April / 2013, 19:26:04
Cons:
- increases core size
- setting up for dumping the whole RAM is not obvious (new menu entry needed ?)

Looks ok - core size increase is only ~600 bytes so no issue there.

Perhaps change the menu text slightly. I don't think you need 'RAM dump' in every line of text.
What about:
 - Start Address
 - Dump Size (0 = ALL RAM)
 - Dump delay (s)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 19 / April / 2013, 19:42:44
a3200 100d and 100a: patch to mute microphone if optical zoom is used during video recording.
(#define CAM_CAN_MUTE_MICROPHONE), and MakeAFScan address fix.
Tested on a3200 100d by ricardo28. 


Added in revision 2707 (trunk) and 2708 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 19 / April / 2013, 20:33:30
Looks ok - core size increase is only ~600 bytes so no issue there.

Perhaps change the menu text slightly. I don't think you need 'RAM dump' in every line of text.
What about:
 - Start Address
 - Dump Size (0 = ALL RAM)
 - Dump delay (s)
Good point. Since the submenu was the last thing implemented, I hadn't noticed the need for re-wording.
Thanks for the review, I'll correct the text and commit soon.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 19 / April / 2013, 20:56:48
a580: 100c port and new loader implementation.  Tested by javier_uy.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 19 / April / 2013, 21:28:43
a580: 100c port and new loader implementation.  Tested by javier_uy.


Added in revision 2709 (trunk) and 2710 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 20 / April / 2013, 14:44:47
I'll correct the text and commit soon.
Done, changeset 2711 (https://trac.assembla.com/chdk/changeset/2711/).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / April / 2013, 20:32:06
Added a propset value for the auto focus assist beam.   

Tested with propset 2,3,4 & 5 cameras. 
Code: [Select]
--[[
@title AF Assist Test
--]]
set_prop(5,0)
shoot()
set_prop(5,1)
shoot()
set_prop(5,0)
shoot()
set_prop(5,1)
shoot()


Values for propset1.h taken from PropertyCase wiki page (http://chdk.wikia.com/wiki/PropertyCase)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 21 / April / 2013, 20:27:52
First patch for emu.lua file.  Not sure how this needs to be organized ...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 21 / April / 2013, 21:19:17
Added a propset value for the auto focus assist beam. 
Added, trunk changeset 2721 (http://trac.assembla.com/chdk/changeset/2721), release changeset 2722 (http://trac.assembla.com/chdk/changeset/2722)

I verified the propset 1 value on a540

First patch for emu.lua file.  Not sure how this needs to be organized ...
Added, trunk changeset 2720 (http://trac.assembla.com/chdk/changeset/2720)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 22 / April / 2013, 06:42:26
CHDK for PowerShot G15 100b

Enabled BETA autobuild since it seems there's no issue
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 22 / April / 2013, 08:17:31
Since i already posted a big diff, here's a quick fix for CFAPattern and DNG exposure bias
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 22 / April / 2013, 09:50:46
edit: I now see active area is in converted EXIF data, I will use that value... patch soon

edit2: patch attached to match native raw active area and cfapattern
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / April / 2013, 05:25:19
CHDK for PowerShot G15 100b

Enabled BETA autobuild since it seems there's no issue
Since i already posted a big diff, here's a quick fix for CFAPattern and DNG exposure bias
edit: I now see active area is in converted EXIF data, I will use that value... patch soon

edit2: patch attached to match native raw active area and cfapattern

Added in revision 2725/2726 (trunk) and 2727 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 23 / April / 2013, 22:48:15
Added in revision 2725/2726 (trunk) and 2727 (release-1.1).
Note this broke the release autobuild, so I added skip_autobuild. Since I was on my lunch break, I didn't look closely, but I think it was related to changes in the trunk core that aren't in the release branch.

I encourage building before every checkin, even if it seems trivial.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / April / 2013, 23:18:10
Added in revision 2725/2726 (trunk) and 2727 (release-1.1).
Note this broke the release autobuild, so I added skip_autobuild. Since I was on my lunch break, I didn't look closely, but I think it was related to changes in the trunk core that aren't in the release branch.

I encourage building before every checkin, even if it seems trivial.

My bad - normally I do build before commit; will fix it tonight if I get time.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 24 / April / 2013, 06:06:20
Added in revision 2725/2726 (trunk) and 2727 (release-1.1).
Note this broke the release autobuild, so I added skip_autobuild. Since I was on my lunch break, I didn't look closely, but I think it was related to changes in the trunk core that aren't in the release branch.

I encourage building before every checkin, even if it seems trivial.

My bad - normally I do build before commit; will fix it tonight if I get time.

Phil.
sorry, I forgot to say I tested in trunk only :)

Anyway, here's another load of changes (yes, for trunk), this time for S100 (tested with s100 101b):
hacked loader, removed useless comments, fixed platform_camera

with the hacked loader now booting with power button short press works
fixed defines in platform_camera for correct dng generation
tested movie_rec and it works

link to patch: https://github.com/c10ud/CHDK/commit/bee5ee88f8c94a9fb6d708bde2db3f7fea9cb36c.patch (https://github.com/c10ud/CHDK/commit/bee5ee88f8c94a9fb6d708bde2db3f7fea9cb36c.patch)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / April / 2013, 05:03:24
Added in revision 2725/2726 (trunk) and 2727 (release-1.1).
Note this broke the release autobuild, so I added skip_autobuild. Since I was on my lunch break, I didn't look closely, but I think it was related to changes in the trunk core that aren't in the release branch.

I encourage building before every checkin, even if it seems trivial.

My bad - normally I do build before commit; will fix it tonight if I get time.

Phil.
sorry, I forgot to say I tested in trunk only :)

Anyway, here's another load of changes (yes, for trunk), this time for S100 (tested with s100 101b):
hacked loader, removed useless comments, fixed platform_camera

with the hacked loader now booting with power button short press works
fixed defines in platform_camera for correct dng generation
tested movie_rec and it works

link to patch: https://github.com/c10ud/CHDK/commit/bee5ee88f8c94a9fb6d708bde2db3f7fea9cb36c.patch (https://github.com/c10ud/CHDK/commit/bee5ee88f8c94a9fb6d708bde2db3f7fea9cb36c.patch)

I've added this to the trunk in revision 2730.

However the S100 platform_camera.h file contains the active area and color matrices from your G15 port - is this correct?

Once you've confirmed (or fixed) platform_camera.h I'll update release-1.1.

Phil.

Edit: Added to release-1.1 in revision 2733.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 26 / April / 2013, 05:53:05
Added in revision 2725/2726 (trunk) and 2727 (release-1.1).
Note this broke the release autobuild, so I added skip_autobuild. Since I was on my lunch break, I didn't look closely, but I think it was related to changes in the trunk core that aren't in the release branch.

I encourage building before every checkin, even if it seems trivial.

My bad - normally I do build before commit; will fix it tonight if I get time.

Phil.
sorry, I forgot to say I tested in trunk only :)

Anyway, here's another load of changes (yes, for trunk), this time for S100 (tested with s100 101b):
hacked loader, removed useless comments, fixed platform_camera

with the hacked loader now booting with power button short press works
fixed defines in platform_camera for correct dng generation
tested movie_rec and it works

link to patch: https://github.com/c10ud/CHDK/commit/bee5ee88f8c94a9fb6d708bde2db3f7fea9cb36c.patch (https://github.com/c10ud/CHDK/commit/bee5ee88f8c94a9fb6d708bde2db3f7fea9cb36c.patch)

I've added this to the trunk in revision 2730.

However the S100 platform_camera.h file contains the active area and color matrices from your G15 port - is this correct?

Once you've confirmed (or fixed) platform_camera.h I'll update release-1.1.

Phil.
I'm not at home (so I cannot check if I did something wrong) but I got the active area and color matrices from the CR2->DNG Adobe conversion of a S100 raw file

Looking at the diff with the previous S100 platform_camera active area looks the same, just with numbers explicited (I guess S100 and G15 probably have the same sensor or something?)

The color matrices are different, I also remember the S100 DNG missing the calibration info, probably you looked at the wrong diff?

Anyway once I'm home I'll double check this just to be sure

p.s. While we're at it, I didn't really get what the CAM_JPEG_{WIDTH, HEIGHT} are for and which value should the hold (e.g. 4000x3000 for 12Mpix? or CAM_ACTIVE_AREA_X2-CAM_ACTIVE_AREA_X1? or else?)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 27 / April / 2013, 04:04:21
a2400: 100c, 100d, and 100e blind port ALPHA

100c firmware dump was posted here (http://chdk.setepontos.com/index.php?topic=9513.msg99598#msg99598)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 28 / April / 2013, 03:17:20
a2400: 100c, 100d, and 100e blind port ALPHA

100c firmware dump was posted here (http://chdk.setepontos.com/index.php?topic=9513.msg99598#msg99598)

Added to trunk in revision 2734.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 28 / April / 2013, 11:33:07
Added in revision 2725/2726 (trunk) and 2727 (release-1.1).
Note this broke the release autobuild, so I added skip_autobuild. Since I was on my lunch break, I didn't look closely, but I think it was related to changes in the trunk core that aren't in the release branch.

I encourage building before every checkin, even if it seems trivial.

My bad - normally I do build before commit; will fix it tonight if I get time.

Phil.
sorry, I forgot to say I tested in trunk only :)

Anyway, here's another load of changes (yes, for trunk), this time for S100 (tested with s100 101b):
hacked loader, removed useless comments, fixed platform_camera

with the hacked loader now booting with power button short press works
fixed defines in platform_camera for correct dng generation
tested movie_rec and it works

link to patch: https://github.com/c10ud/CHDK/commit/bee5ee88f8c94a9fb6d708bde2db3f7fea9cb36c.patch (https://github.com/c10ud/CHDK/commit/bee5ee88f8c94a9fb6d708bde2db3f7fea9cb36c.patch)

I've added this to the trunk in revision 2730.

However the S100 platform_camera.h file contains the active area and color matrices from your G15 port - is this correct?

Once you've confirmed (or fixed) platform_camera.h I'll update release-1.1.

Phil.
I'm not at home (so I cannot check if I did something wrong) but I got the active area and color matrices from the CR2->DNG Adobe conversion of a S100 raw file

Looking at the diff with the previous S100 platform_camera active area looks the same, just with numbers explicited (I guess S100 and G15 probably have the same sensor or something?)

The color matrices are different, I also remember the S100 DNG missing the calibration info, probably you looked at the wrong diff?

Anyway once I'm home I'll double check this just to be sure

p.s. While we're at it, I didn't really get what the CAM_JPEG_{WIDTH, HEIGHT} are for and which value should the hold (e.g. 4000x3000 for 12Mpix? or CAM_ACTIVE_AREA_X2-CAM_ACTIVE_AREA_X1? or else?)
Just tried current vanilla trunk, everything's good ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 28 / April / 2013, 15:39:03
It probably appropriate to disable the hooks for capt_seq_hook_set_nr in capt_seq.c for the SX50HS - at least for now.

In the current build, they do not work  (i.e. you can not enable or disable dark frame subtraction)  and they cause an immediate crash when the camera is used in "Sports" mode  (continuous shooting).

I'll keep looking at it but in the meantime, best it's disabled.

Patch works for both 1.1.0 &  1.2.0 branches.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 29 / April / 2013, 16:21:25
A3100 related changes (trunk, 1.1).

1) 1.00b: fixed several sub <-> loc mixups, enabled autobuild
Tested by cheddar66 (see posts from here (http://chdk.setepontos.com/index.php?topic=5560.msg99613#msg99613)). I have left a note in source about the unsuccessful "override fix for short press" test.
2) all revisions: vid_get_viewport_live_fb() implemented using fw variables found by the sigfinder. This was not thoroughly tested, but zebra works seemingly the same (http://chdk.setepontos.com/index.php?topic=5560.msg99913#msg99913) as in the single buffered case. The code is like the other (older) implementations. There appear to be 3 normal buffers (see below), so that's what the routine expects.

DEF(viewport_buffers ,0xffae1430)

ffae1430:    106f3bc0
ffae1434:    107724c0
ffae1438:    107f0dc0
ffae143c:    1062c660
; 4th buffer: not consecutive

If this vid_get_viewport_live_fb() implementation seems risky, then please ignore all lib.c changes in the patch
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 29 / April / 2013, 21:12:44
A3300 patch
1) New loader implemented
2) 100a and 100c are compatible, so 100c directory was deleted and camera_list.csv was modified.
3) vid_bitmap_refresh() modified, call to draw_filled_rect() deleted
4) movie_rec.c modified to support: CAM_AF_SCAN_DURING_VIDEO_RECORD, CAM_CAN_MUTE_MICROPHONE and CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO

Tested on 100c by nemerdekel1, reports here (http://chdk.setepontos.com/index.php?topic=9797.msg99887#msg99887)



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / April / 2013, 21:21:01
It probably appropriate to disable the hooks for capt_seq_hook_set_nr in capt_seq.c for the SX50HS - at least for now.

In the current build, they do not work  (i.e. you can not enable or disable dark frame subtraction)  and they cause an immediate crash when the camera is used in "Sports" mode  (continuous shooting).

I'll keep looking at it but in the meantime, best it's disabled.

Patch works for both 1.1.0 &  1.2.0 branches.

Added in revision 2736 (trunk) and 2737 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 29 / April / 2013, 22:03:39
Added in revision 2736 (trunk) and 2737 (release-1.1).
Thanks philmoz!

Based on this :  http://chdk.setepontos.com/index.php?topic=9257.msg99951#msg99951 (http://chdk.setepontos.com/index.php?topic=9257.msg99951#msg99951) it might be worth making a similiar patch for the G15 for now? 

Its just a matter of commenting out
Code: [Select]
                "BL      capt_seq_hook_set_nr\n" // +++at line 433 in capt_seq.c.    Do you need a patch file? 
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / April / 2013, 04:45:06
A3100 related changes (trunk, 1.1).

1) 1.00b: fixed several sub <-> loc mixups, enabled autobuild
Tested by cheddar66 (see posts from here (http://chdk.setepontos.com/index.php?topic=5560.msg99613#msg99613)). I have left a note in source about the unsuccessful "override fix for short press" test.
2) all revisions: vid_get_viewport_live_fb() implemented using fw variables found by the sigfinder. This was not thoroughly tested, but zebra works seemingly the same (http://chdk.setepontos.com/index.php?topic=5560.msg99913#msg99913) as in the single buffered case. The code is like the other (older) implementations. There appear to be 3 normal buffers (see below), so that's what the routine expects.

DEF(viewport_buffers ,0xffae1430)

ffae1430:    106f3bc0
ffae1434:    107724c0
ffae1438:    107f0dc0
ffae143c:    1062c660
; 4th buffer: not consecutive

If this vid_get_viewport_live_fb() implementation seems risky, then please ignore all lib.c changes in the patch

Added in revision 2738 (trunk) and 2739 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / April / 2013, 05:06:10
A3300 patch
1) New loader implemented
2) 100a and 100c are compatible, so 100c directory was deleted and camera_list.csv was modified.
3) vid_bitmap_refresh() modified, call to draw_filled_rect() deleted
4) movie_rec.c modified to support: CAM_AF_SCAN_DURING_VIDEO_RECORD, CAM_CAN_MUTE_MICROPHONE and CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO

Tested on 100c by nemerdekel1, reports here (http://chdk.setepontos.com/index.php?topic=9797.msg99887#msg99887)

Added in revision 2740 (trunk) and 2741 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 30 / April / 2013, 06:56:03
Added in revision 2740 (trunk) and 2741 (release-1.1).
Thanks.

After implementing a3300 new loader, I forgot to delete loader/a3300/resetcode contents. Patch is attached.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / May / 2013, 13:49:53
Small patch for a bug in the hostlua stuff - a fix to camera_funcs.get_day_seconds() .
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / May / 2013, 16:00:01
Small patch for a bug in the hostlua stuff - a fix to camera_funcs.get_day_seconds() .
Added, trunk changeset 2755 (http://trac.assembla.com/chdk/changeset/2755)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 12 / May / 2013, 06:11:57
ixus125 101a: Small patch to fix nrflag.
Patch posted here (http://chdk.setepontos.com/index.php?action=dlattach;topic=8085.0;attach=8283)

Tested by geopig, report here: http://chdk.setepontos.com/index.php?topic=8085.msg100293#msg100293 (http://chdk.setepontos.com/index.php?topic=8085.msg100293#msg100293)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 12 / May / 2013, 06:44:49
ixus125 101a: Small patch to fix nrflag.
Patch posted here (http://chdk.setepontos.com/index.php?action=dlattach;topic=8085.0;attach=8283)

Tested by geopig, report here: http://chdk.setepontos.com/index.php?topic=8085.msg100293#msg100293 (http://chdk.setepontos.com/index.php?topic=8085.msg100293#msg100293)

Added in revision 2770 (trunk) and 2771 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 12 / May / 2013, 22:09:25
Some earlier VxWorks cameras don't enable any file operations (haven't actually checked whether open() or read()/write() is the function that doesn't return) while recording a movie. This can be really annoying, since any attempt to load/save something will hang the camera until movie recording is finished (only solution is to pull the battery). Attached patch tries to work around this by making open() and fopen() return with failure when a movie is being recorded.
Does this look acceptable? If anybody can come up with a better name for that #define, I'll gladly accept it. Two cameras are identified so far with the issue: a410, s80. This list may grow a little.
Patch is for trunk, but can be applied to 1.1 too.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 14 / May / 2013, 08:54:13
Patch to A810, A1300, A2300, A2400, A3400, A4000:
   - Delete unnecessary lookup table implementation used in vid_get_viewport_width() and vid_get_viewport_height()
   - Delete unnecessary functions vid_get_viewport_xoffset() and vid_get_viewport_yoffset() which returns 0
   - Delete 80 from iso_table[], it is not a valid value for these models.

A3400, A2300:
- CAM_USE_ALT_SET_ZOOM_POINT, CAM_USE_ALT_PT_MoveOpticalZoomAt defined in platform_camera.h

A3400
- Fix value passed to LEDDrive() called inside camera_set_led()

A1300.100d:
- PAUSE_FOR_FILE_COUNTER changed to 250. It is the value used in other a1300/a810 fw versions
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / May / 2013, 22:27:48
Patch to A810, A1300, A2300, A2400, A3400, A4000:
   - Delete unnecessary lookup table implementation used in vid_get_viewport_width() and vid_get_viewport_height()
   - Delete unnecessary functions vid_get_viewport_xoffset() and vid_get_viewport_yoffset() which returns 0
   - Delete 80 from iso_table[], it is not a valid value for these models.

A3400, A2300:
- CAM_USE_ALT_SET_ZOOM_POINT, CAM_USE_ALT_PT_MoveOpticalZoomAt defined in platform_camera.h

A3400
- Fix value passed to LEDDrive() called inside camera_set_led()

A1300.100d:
- PAUSE_FOR_FILE_COUNTER changed to 250. It is the value used in other a1300/a810 fw versions

Added in revision 2773 (trunk) and 2774 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / May / 2013, 18:25:40
Patch to fix A1200 UI overlay colors when using CHDKPTP.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / May / 2013, 19:32:03
Patch to fix A1200 UI overlay colors when using CHDKPTP.
Added, trunk changeset 2797 (http://trac.assembla.com/chdk/changeset/2797) release changeset 2798 (http://trac.assembla.com/chdk/changeset/2798)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 26 / May / 2013, 20:02:45
Fix for power up crashing of SX10 per this thread :
http://chdk.setepontos.com/index.php?topic=10009 (http://chdk.setepontos.com/index.php?topic=10009)
Patch works on both stable & dev trunks.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 27 / May / 2013, 15:15:09
Fix for power up crashing of SX10 per this thread :
http://chdk.setepontos.com/index.php?topic=10009 (http://chdk.setepontos.com/index.php?topic=10009)
Patch works on both stable & dev trunks.
Added to the release branch, enabled startup fix for all dryos cams in the trunk.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 30 / May / 2013, 11:54:42
ixus220_elph300hs: Patch to fix liveview. Tested by fronjd
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 31 / May / 2013, 06:50:24
ixus220_elph300hs: Patch to fix liveview. Tested by fronjd

Added in revision 2816 (trunk) and 2817 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 31 / May / 2013, 06:55:58
a495 patch:
- boot.c: task dispatcher hook used strcmp, now it compare addresses.
- capt_seq.c: known functions replaced with their named representation
- mute_on_zoom implemented

Tested on a495. 100f.
Thanks.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 31 / May / 2013, 08:50:47
D20 100b blind port ALPHA
Status and reports: D20 Porting thread (http://chdk.setepontos.com/index.php?topic=9722.msg99602#msg99602)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 31 / May / 2013, 18:50:20
a495 patch:
- boot.c: task dispatcher hook used strcmp, now it compare addresses.
- capt_seq.c: known functions replaced with their named representation
- mute_on_zoom implemented

Tested on a495. 100f.
Thanks.

Added in revision 2820 (trunk) and 2821 (release-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 31 / May / 2013, 18:59:03
D20 100b blind port ALPHA
Status and reports: D20 Porting thread (http://chdk.setepontos.com/index.php?topic=9722.msg99602#msg99602)

Missing definition for MODE_SCN_UNDERWATER_MACRO.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 31 / May / 2013, 19:20:07
D20 100b blind port ALPHA
Status and reports: D20 Porting thread (http://chdk.setepontos.com/index.php?topic=9722.msg99602#msg99602)

Missing definition for MODE_SCN_UNDERWATER_MACRO.

Phil.
Sorry, missing change in attachment.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 31 / May / 2013, 19:50:55
D20 100b blind port ALPHA
Status and reports: D20 Porting thread (http://chdk.setepontos.com/index.php?topic=9722.msg99602#msg99602)

Missing definition for MODE_SCN_UNDERWATER_MACRO.

Phil.
Sorry, missing change in attachment.

Added in revision 2822 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / June / 2013, 23:02:51
Patch to add custom palette colors to G10 and IXUS120_SD940.   

Thanks to philmoz for making this happen.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 08 / June / 2013, 23:47:11
Patch to add custom palette colors to G10 and IXUS120_SD940.   

Thanks to philmoz for making this happen.

Added in revision 2844 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 09 / June / 2013, 13:31:32
Small patch for the IXUS120_SD940 to set the palette info correctly for chdkptp.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / June / 2013, 19:17:20
Small patch for the IXUS120_SD940 to set the palette info correctly for chdkptp.

Added in revision 2852 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 10 / June / 2013, 09:08:46
Support for S110 101b and 102b. Patch attached for trunk

101b is still untested (I have 102b).

(I will submit a RFC patch for the new task hook in platform/generic soon :))
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / June / 2013, 03:27:44
Support for S110 101b and 102b. Patch attached for trunk

101b is still untested (I have 102b).

(I will submit a RFC patch for the new task hook in platform/generic soon :))

Added in revision 2858 (trunk).

I removed the G15 & S100 changes. Will apply these separately as the also apply to release-1.1.

Updated stubs_entry.S to the latest version, removed stubs_asm.h and sub/Makefile to align with current trunk.
Also changed the status for 1.01b version to ALPHA pending test results.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 11 / June / 2013, 05:31:16
Support for S110 101b and 102b. Patch attached for trunk

101b is still untested (I have 102b).

(I will submit a RFC patch for the new task hook in platform/generic soon :))

Added in revision 2858 (trunk).

I removed the G15 & S100 changes. Will apply these separately as the also apply to release-1.1.

Updated stubs_entry.S to the latest version, removed stubs_asm.h and sub/Makefile to align with current trunk.
Also changed the status for 1.01b version to ALPHA pending test results.

Phil.
sorry for that, i branched a while ago :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / June / 2013, 20:36:28
G1X patch for its notes.txt file
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / June / 2013, 22:17:23
G1X patch for its notes.txt file

Added in revision 2869 (trunk) and 2870 (revision-1.1).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 15 / June / 2013, 11:43:00
Custom palette colors for the IXUS100_SD780.   Tested by andrewhazelden (http://chdk.setepontos.com/index.php?action=profile;u=12040)

The SD780 has a completely unused palette row in shooting, playback and the Canon menus for those modes so it was possible to get the colors right when the CHDK menu overlays the Canon menus.

Update :  added a small patch file for the SD940 to make CHDK menus work over Canon menus
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / June / 2013, 20:14:24
Custom palette colors for the IXUS100_SD780.   Tested by andrewhazelden (http://chdk.setepontos.com/index.php?action=profile;u=12040)

The SD780 has a completely unused palette row in shooting, playback and the Canon menus for those modes so it was possible to get the colors right when the CHDK menu overlays the Canon menus.

Update :  added a small patch file for the SD940 to make CHDK menus work over Canon menus

Added in revision 2873 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 20 / June / 2013, 19:22:36
sx160is 100a port - beta.
This port includes code_gen files.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 20 / June / 2013, 22:45:57
patch to include White Balance Mode to propsets. (WB_MODE)
propset 3 and 5 were verified.
propset 2 and 4 were not verified. Values taken from http://chdk.wikia.com/wiki/PropertyCase (http://chdk.wikia.com/wiki/PropertyCase)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / June / 2013, 22:59:27
patch to include White Balance Mode to propsets. (WB_MODE)
propset 3 and 5 were verified.
propset 2 and 4 were not verified. Values taken from http://chdk.wikia.com/wiki/PropertyCase (http://chdk.wikia.com/wiki/PropertyCase)
I verified 2 on D10.  In addition to the listed values, 10 is underwater.

edit:
Added trunk changeset 2882 (http://trac.assembla.com/chdk/changeset/2882) release changeset 2883 (http://trac.assembla.com/chdk/changeset/2883)

Also verified & added for propset 1.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 21 / June / 2013, 07:53:38
sx160is 100a port - beta.
This port includes code_gen files.

Added in revision 2886 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 21 / June / 2013, 19:57:40
Small patch to release existing svn code for 1.00A firmware for ixus130_sd1400 to the autobuild.

Also, move camera to BETA status.

http://chdk.setepontos.com/index.php?topic=5034.msg101895#msg101895 (http://chdk.setepontos.com/index.php?topic=5034.msg101895#msg101895)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 22 / June / 2013, 08:44:53
I think that these two ports can be released to the autobuild:
* ixus125 100d (ALPHA). Some test results were posted here (http://chdk.setepontos.com/index.php?topic=8085.msg101344#msg101344)
* a4000 102a.  It is compatible with 101b, as reported here (http://chdk.setepontos.com/index.php?topic=9443.msg101790#msg101790)


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 22 / June / 2013, 18:28:25
Patch to propset5, verified on SX160
*DATE_STAMP
*MY_COLORS
*Custom color properties:  CUSTOM_SATURATION, CUSTOM_CONTRAST, CUSTOM_BLUE, CUSTOM_GREEN, CUSTOM_RED, CUSTOM_SKIN_TONE

Patch to propset3, verified on A495
*DATE_STAMP
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / June / 2013, 05:21:43
Small patch to release existing svn code for 1.00A firmware for ixus130_sd1400 to the autobuild.

Also, move camera to BETA status.

http://chdk.setepontos.com/index.php?topic=5034.msg101895#msg101895 (http://chdk.setepontos.com/index.php?topic=5034.msg101895#msg101895)
I think that these two ports can be released to the autobuild:
* ixus125 100d (ALPHA). Some test results were posted here (http://chdk.setepontos.com/index.php?topic=8085.msg101344#msg101344)
* a4000 102a.  It is compatible with 101b, as reported here (http://chdk.setepontos.com/index.php?topic=9443.msg101790#msg101790)
Patch to propset5, verified on SX160
*DATE_STAMP
*MY_COLORS
*Custom color properties:  CUSTOM_SATURATION, CUSTOM_CONTRAST, CUSTOM_BLUE, CUSTOM_GREEN, CUSTOM_RED, CUSTOM_SKIN_TONE

Patch to propset3, verified on A495
*DATE_STAMP

Added in revision 2893 (trunk) and 2894 (release-1.1).

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 23 / June / 2013, 09:35:40
Patch to propset5, verified on SX160
*DATE_STAMP
*MY_COLORS
*Custom color properties:  CUSTOM_SATURATION, CUSTOM_CONTRAST, CUSTOM_BLUE, CUSTOM_GREEN, CUSTOM_RED, CUSTOM_SKIN_TONE

Same for propset4, tested on SX220.

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / June / 2013, 11:22:49
Patch to propset5, verified on SX160
*DATE_STAMP
Same for propset4, tested on SX220.
Same for propset2, tested on G10.
Code: [Select]
--[[
@title timestamp
@param a Propcase 66 =
 @default a 0
 @range a 0 2
--]]
print("setting timestamp")
set_prop(66, a)
shoot()

This is quite exciting as the G10 Canon menus do not allow this to be enabled! From page of the G10 manual :

(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FmsQCZw6.png&hash=b925d8160ad33c52f148b2cc761ac403)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / June / 2013, 15:57:15
Fix to enable "dark frame subtraction" and "USB remote sync" for the IXUS100_SD780 per http://chdk.setepontos.com/index.php?topic=3995.msg101958#msg101958 (http://chdk.setepontos.com/index.php?topic=3995.msg101958#msg101958)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / June / 2013, 17:24:22
Patch to move the dark frame subtraction menu item from the RAW menu to the Enhanced Photo Operations menu.

http://chdk.setepontos.com/index.php?topic=8151.msg101960#msg101960 (http://chdk.setepontos.com/index.php?topic=8151.msg101960#msg101960)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 24 / June / 2013, 00:55:29
Same for propset4, tested on SX220.

Same for propset2, tested on G10.
Fix to enable "dark frame subtraction" and "USB remote sync" for the IXUS100_SD780 per http://chdk.setepontos.com/index.php?topic=3995.msg101958#msg101958 (http://chdk.setepontos.com/index.php?topic=3995.msg101958#msg101958)
Added the above + datestamp for propset1 and mycolors for propset 2 in trunk changesets 2899-2902 (http://trac.assembla.com/chdk/changeset?reponame=&new=2902%40trunk&old=2899%40trunk), release changeset 2904 (http://trac.assembla.com/chdk/changeset/2904)

Patch to move the dark frame subtraction menu item from the RAW menu to the Enhanced Photo Operations menu.
Trunk changeset 2903 (http://trac.assembla.com/chdk/changeset/2903)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: frantony on 25 / June / 2013, 03:28:03
This is a git formatted patch, so use 'patch -p1' to apply the patch.

=== patch comment start ===
makefile.inc: use CROSS_COMPILE variable for selecting a toolchain

By default CHDK uses toolchain with the 'arm-elf-' prefix.
If you want to change toolchain you need to change many
variables (e.g. CC, OBJCOPY etc).
In linux kernel the CROSS_COMPILE variable makes
this work easier. Let's use the same approach for CHDK too.

Usage. Just define CROSS_COMPILE in cmdline:

  make CROSS_COMPILE=/my/toolchain/path/and/arm-pre-fix-
=== patch comment end ===
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mipa87 on 29 / June / 2013, 15:49:33
Update for czech lng file.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / June / 2013, 21:32:15
This is a git formatted patch, so use 'patch -p1' to apply the patch.

=== patch comment start ===
makefile.inc: use CROSS_COMPILE variable for selecting a toolchain

By default CHDK uses toolchain with the 'arm-elf-' prefix.
If you want to change toolchain you need to change many
variables (e.g. CC, OBJCOPY etc).
In linux kernel the CROSS_COMPILE variable makes
this work easier. Let's use the same approach for CHDK too.

Usage. Just define CROSS_COMPILE in cmdline:

  make CROSS_COMPILE=/my/toolchain/path/and/arm-pre-fix-
=== patch comment end ===

Added to trunk in revision 2909.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / June / 2013, 21:38:18
Update for czech lng file.

Added to trunk in revision 2910.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 06 / July / 2013, 04:32:31
A1200 - Patch to mute mic if zoom during video recording.
Test and report here: http://chdk.setepontos.com/index.php?topic=6318.msg102484#msg102484 (http://chdk.setepontos.com/index.php?topic=6318.msg102484#msg102484)
Patch: http://chdk.setepontos.com/index.php?action=dlattach;topic=6318.0;attach=8561 (http://chdk.setepontos.com/index.php?action=dlattach;topic=6318.0;attach=8561)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 06 / July / 2013, 11:04:43
Croatian language update.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / July / 2013, 12:26:16
Patch file for Custom Auto ISO in dev trunk.  Discussion here : http://chdk.setepontos.com/index.php?topic=8467.msg102535#msg102535 (http://chdk.setepontos.com/index.php?topic=8467.msg102535#msg102535)

Edit : added a 2nd patch file to the language files to remove the (x10) strings

Edit 2 :  missed a change related to deleting (x10) from UI.  Combined patch file posted below.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 06 / July / 2013, 12:38:06
sx160 100a filewrite patch
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / July / 2013, 14:56:50
Note :  added a file to the Custom Auto ISO patch that I posted above.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 07 / July / 2013, 00:48:41
Update to Custom Auto ISO patch - previous patch failed to make a complete change for UI values not assumed to be (x10).

This version also rolls in the language file changes that I had posted seperately.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 07 / July / 2013, 01:54:19
A1200 - Patch to mute mic if zoom during video recording.
Test and report here: http://chdk.setepontos.com/index.php?topic=6318.msg102484#msg102484 (http://chdk.setepontos.com/index.php?topic=6318.msg102484#msg102484)
Patch: http://chdk.setepontos.com/index.php?action=dlattach;topic=6318.0;attach=8561 (http://chdk.setepontos.com/index.php?action=dlattach;topic=6318.0;attach=8561)
Croatian language update.
sx160 100a filewrite patch
Update to Custom Auto ISO patch - previous patch failed to make a complete change for UI values not assumed to be (x10).

This version also rolls in the language file changes that I had posted seperately.

Added to trunk in revision 2940.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 08 / July / 2013, 09:29:50
S110 and G15:
- moved code to code_gen tool usage
- new minimal taskhook code based on phil's hints
- filewrite hook (based on sx160)

S110 only:
- fixed memisostart value for 102b port
- fixed power on check for 101b port

tested with g15 100b and s110 102b

patch against today's trunk
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / July / 2013, 05:32:46
S110 and G15:
- moved code to code_gen tool usage
- new minimal taskhook code based on phil's hints
- filewrite hook (based on sx160)

S110 only:
- fixed memisostart value for 102b port
- fixed power on check for 101b port

tested with g15 100b and s110 102b

patch against today's trunk

Added to trunk in revision 2947.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 09 / July / 2013, 07:16:29
Filewrite patch SX220, thanks rudis help.

Successfully tested with 1.01a.

msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / July / 2013, 09:30:30
Filewrite patch SX220, thanks rudis help.

Successfully tested with 1.01a.

msl

Added to trunk in revision 2950.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 09 / July / 2013, 18:54:41
a590 patch:
- filewritetask implemented. Tested by blackhole on a590 101b.
- #undef  CAM_CAN_SD_OVER_NOT_IN_MF  added to platform_camera.h.  Report here (http://chdk.setepontos.com/index.php?topic=8263.msg88764#msg88764)


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / July / 2013, 21:52:20
a590 patch:
- filewritetask implemented. Tested by blackhole on a590 101b.
- #undef  CAM_CAN_SD_OVER_NOT_IN_MF  added to platform_camera.h.  Report here (http://chdk.setepontos.com/index.php?topic=8263.msg88764#msg88764)
Added, trunk changeset 2951 (http://trac.assembla.com/chdk/changeset/2951)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dvip on 09 / July / 2013, 23:24:11
The A590IS has a tendency to overexpose video (and images).
I think CAM_EV_IN_VIDEO is useful to correct for video overexposure.
 
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / July / 2013, 00:04:05
The A590IS has a tendency to overexpose video (and images).
I think CAM_EV_IN_VIDEO is useful to correct for video overexposure.
You should discuss in the development thread, see the posts starting at http://chdk.setepontos.com/index.php?topic=2361.msg102624#msg102624 (http://chdk.setepontos.com/index.php?topic=2361.msg102624#msg102624)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dvip on 10 / July / 2013, 00:28:05
Sounds good, reyalp, missed that thread.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: rudi on 11 / July / 2013, 06:28:24
Patch for S100:
- use Video button as Display button (thanks to msl)
- enable GPS Menu

All successful testet on S100-102a by Peter_A720 from german CHDK forum http://forum.chdk-treff.de/viewtopic.php?f=10&t=2651&start=45#p27962 (http://forum.chdk-treff.de/viewtopic.php?f=10&t=2651&start=45#p27962)

rudi
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 11 / July / 2013, 06:48:26
sx240 patch:
- New loader
- Code converted to code_gen
- filewritetask implemented
- function in platform/sx240hs/sub/*/kbd.c moved to  platform/sx240hs/kbd.c
Tested on sx240 101a
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 12 / July / 2013, 17:28:13
small patch to fix OSD zoom value behavior.
Bug reported and patch tested by dvip: http://chdk.setepontos.com/index.php?topic=2361.msg102713#msg102713 (http://chdk.setepontos.com/index.php?topic=2361.msg102713#msg102713)


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 12 / July / 2013, 23:33:30
Patch for S100:
- use Video button as Display button (thanks to msl)
- enable GPS Menu

All successful testet on S100-102a by Peter_A720 from german CHDK forum http://forum.chdk-treff.de/viewtopic.php?f=10&t=2651&start=45#p27962 (http://forum.chdk-treff.de/viewtopic.php?f=10&t=2651&start=45#p27962)

rudi
sx240 patch:
- New loader
- Code converted to code_gen
- filewritetask implemented
- function in platform/sx240hs/sub/*/kbd.c moved to  platform/sx240hs/kbd.c
Tested on sx240 101a
small patch to fix OSD zoom value behavior.
Bug reported and patch tested by dvip: http://chdk.setepontos.com/index.php?topic=2361.msg102713#msg102713 (http://chdk.setepontos.com/index.php?topic=2361.msg102713#msg102713)

Added to trunk in revision 2953.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 13 / July / 2013, 13:15:46
S100 patch:

- custom bitmap palette
- changed bitmap palette definition 7 => 13
- tested by by Peter_A720 from german CHDK forum: http://forum.chdk-treff.de/viewtopic.php?p=27980#p27980 (http://forum.chdk-treff.de/viewtopic.php?p=27980#p27980)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 16 / July / 2013, 06:21:49
S100 patch:

- custom bitmap palette
- changed bitmap palette definition 7 => 13
- tested by by Peter_A720 from german CHDK forum: http://forum.chdk-treff.de/viewtopic.php?p=27980#p27980 (http://forum.chdk-treff.de/viewtopic.php?p=27980#p27980)

Added to trunk in revision 2956.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: rudi on 17 / July / 2013, 07:18:25
S100 diff
- bugfix for DISPLAY_KEY, Changeset 2953
- tested on S100-102a

SX260 diff
- update equal to nafrafs patch for SX240, Changeset 2953
- code-gen, filewrite, delete kbd.c in /sub/
- tested on sx260-100b, include usb remote capture

rudi
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 17 / July / 2013, 07:52:37
S100 diff
- bugfix for DISPLAY_KEY, Changeset 2953
- tested on S100-102a

SX260 diff
- update equal to nafrafs patch for SX240, Changeset 2953
- code-gen, filewrite, delete kbd.c in /sub/
- tested on sx260-100b, include usb remote capture

rudi

Added to trunk in revision 2958.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 17 / July / 2013, 09:29:50
a2300 filewrite task support
Tested by tpont on a2300 100f: http://chdk.setepontos.com/index.php?topic=6231.msg102894#msg102894 (http://chdk.setepontos.com/index.php?topic=6231.msg102894#msg102894)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 18 / July / 2013, 23:31:24
a2300 filewrite task support
Added, trunk changeset 2961 (http://trac.assembla.com/chdk/changeset/2961)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 25 / July / 2013, 21:01:54
a490 update
- new loader
- mute on zoom
- code_gen
- filewrite task support

Tested on a490 100f by tpont.
http://chdk.setepontos.com/index.php?topic=5051.msg103086#msg103086 (http://chdk.setepontos.com/index.php?topic=5051.msg103086#msg103086)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / July / 2013, 02:12:42
a490 update
- new loader
- mute on zoom
- code_gen
- filewrite task support

Tested on a490 100f by tpont.
http://chdk.setepontos.com/index.php?topic=5051.msg103086#msg103086 (http://chdk.setepontos.com/index.php?topic=5051.msg103086#msg103086)

Added to trunk in revision 2979.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: msl on 26 / July / 2013, 17:04:43
A720 patch
 
- filewrite task support (with great help by rudi)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / July / 2013, 19:28:21
A720 patch
 
- filewrite task support (with great help by rudi)

Added to trunk in revision 2980.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 28 / July / 2013, 00:59:00
patch to remove unused spytask function.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 28 / July / 2013, 01:16:38
patch to remove unused spytask function.

Added to trunk in revision 2982.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 28 / July / 2013, 11:24:00
patch to platform/*/main.c to remove unused variable ptr
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 28 / July / 2013, 16:14:39
a530: fix the free space display related function addresses
Tested (http://forum.chdk-treff.de/viewtopic.php?f=3&t=3154&sid=b7e3beade2f7e8e6b65f4e219c83c130&p=28071#p28069) in the German forum.
I could commit this myself, but I don't want to clash with any restructure operation in the svn.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 28 / July / 2013, 16:34:29
patch to platform/*/main.c to remove unused variable ptr
Added, trunk changeset 2986 (http://trac.assembla.com/chdk/changeset/2986)

a530: fix the free space display related function addresses
Tested (http://forum.chdk-treff.de/viewtopic.php?f=3&t=3154&sid=b7e3beade2f7e8e6b65f4e219c83c130&p=28071#p28069) in the German forum.
I could commit this myself, but I don't want to clash with any restructure operation in the svn.
Added, trunk  changeset 2985 (http://trac.assembla.com/chdk/changeset/2985)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 28 / July / 2013, 16:49:56
sx240hs/sx260hs: Patch to remove unnecessary spytask function.
Tested on sx240hs 101a
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 28 / July / 2013, 17:06:02
sx240hs/sx260hs: Patch to remove unnecessary spytask function.
Added, trunk changeset 2987 (http://trac.assembla.com/chdk/changeset/2987)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 28 / July / 2013, 22:14:44
patch to platform/*/main.c to remove unused variable ptr
Added, trunk changeset 2986 (http://trac.assembla.com/chdk/changeset/2986)

This included a patch for the ixus500_elph520hs that is not in the trunk, SVN has created an empty directory for this camera?

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 28 / July / 2013, 22:18:29
This included a patch for the ixus500_elph520hs that is not in the trunk, SVN has created an empty directory for this camera?
Oops, you are right. Removed.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 31 / July / 2013, 21:05:33
a590 patch
- capt_seq.c using code_gen
- fix CAMERA_MIN_DIST/CAMERA_MAX_DIST
- Enabled REMOTE_SYNC_STATUS_LED

Discussion and report: http://chdk.setepontos.com/index.php?topic=2361.msg103386#msg103386 (http://chdk.setepontos.com/index.php?topic=2361.msg103386#msg103386)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / August / 2013, 01:10:37
a590 patch
- capt_seq.c using code_gen
- fix CAMERA_MIN_DIST/CAMERA_MAX_DIST
- Enabled REMOTE_SYNC_STATUS_LED

Discussion and report: http://chdk.setepontos.com/index.php?topic=2361.msg103386#msg103386 (http://chdk.setepontos.com/index.php?topic=2361.msg103386#msg103386)
Added trunk changeset 2996 (http://trac.assembla.com/chdk/changeset/2996) release changeset 2997 (http://trac.assembla.com/chdk/changeset/2997)

Note that this port hooks capt_seq task the old way inefficient way, by copying up to the point where the task is created. Doing it like exp_drive and movie_record would save a small amount of memory.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 02 / August / 2013, 12:41:08
a590 patch
- fix capt_seq task param override (bug in code_gen.txt)
- new hook implementation for capt_seq task and init_file_modules
- boot.c and movie_rec.c generated using code_gen

Tested by dvip, report here: http://chdk.setepontos.com/index.php?topic=2361.msg103431#msg103431 (http://chdk.setepontos.com/index.php?topic=2361.msg103431#msg103431)

patch: a590_code_gen_trunk2999_v2.patch.gz  (http://chdk.setepontos.com/index.php?action=dlattach;topic=2361.0;attach=8707)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / August / 2013, 23:03:37
a590 patch
- fix capt_seq task param override (bug in code_gen.txt)
- new hook implementation for capt_seq task and init_file_modules
- boot.c and movie_rec.c generated using code_gen
Added, trunk changeset 3000 (http://trac.assembla.com/chdk/changeset/3000) release changeset 3001 (http://trac.assembla.com/chdk/changeset/3001)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 08 / August / 2013, 20:07:34
sx160 patch
- Add keys VIDEO and ERASE
- Remove unnecessary spytask function
- Simpler hooks: CreateTask2_my removed.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 08 / August / 2013, 23:20:54
sx160 patch
Added, trunk changeset 3016 (http://trac.assembla.com/chdk/changeset/3016) release changeset 3017 (http://trac.assembla.com/chdk/changeset/3017)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 09 / August / 2013, 22:20:03
Patch to create "Port Under Development" versions.
Motivation: http://chdk.setepontos.com/index.php?topic=10259.msg103774#msg103774 (http://chdk.setepontos.com/index.php?topic=10259.msg103774#msg103774)

To enable it, add #define UNDER_DEV_PORT 1   in platform_camera.h.
CHDK works normally during 7 days, after that a message will remind user to post feedback.

Thanks to waterwingz for suggestions and test.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 09 / August / 2013, 22:43:55
Patch to create "Port Under Development" versions.
This forum doesn't have a "Like" button but if it did,  I'd be pressing it here.   This patch is not going to turn our new camera owners into dedicate testers all by itself,  but it will serve as a "not so gentle reminder" to those "Please port my camera,  I'm really really willing to test" people.

Worst case,  it adds some control to test versions not proliferating and becoming issues when people report problems back here one year (or longer)  later.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 11 / August / 2013, 18:35:18
Patch to fix definitions in plaform_camera.h
a3200: Define CAM_EXT_TV_RANGE, undefine CAM_HAS_IRIS_DIAPHRAGM and CAM_HAS_ERASE_BUTTON
a3000: Define CAM_EXT_TV_RANGE, undefine CAM_HAS_IRIS_DIAPHRAGM
ixus105: Undefine CAM_HAS_IRIS_DIAPHRAGM
ixus300: Define CAM_EXT_TV_RANGE

Fix comments in: a3000, a3100, ixus1000, ixus110, ixus115.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / August / 2013, 21:19:17
Patch to fix definitions in plaform_camera.h
Thanks. Added in trunk changeset 3027 (http://trac.assembla.com/chdk/changeset/3027), release changeset 3028 (http://trac.assembla.com/chdk/changeset/3028)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 21 / August / 2013, 19:39:56
D20: filewrite task
tested by lapser
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 21 / August / 2013, 22:49:38
D20: filewrite task
tested by lapser
Added, trunk changeset 3038 (http://trac.assembla.com/chdk/changeset/3038) release changeset  3039 (http://trac.assembla.com/chdk/changeset/3039)

FWIW I haven't forgotten about port-under-development patch from http://chdk.setepontos.com/index.php?topic=650.msg103904#msg103904 (http://chdk.setepontos.com/index.php?topic=650.msg103904#msg103904) just haven't got around to trying it yet. I'd also like to avoid the macro madness, which can probably be done by passing the date in simpler form using a command line define.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 25 / August / 2013, 11:51:31
a495 update
- fix remote shoot command in continuous mode
- define REMOTE_SYNC_STATUS_LED
- code rewritten using code_gen

Tested on A495 100f
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / August / 2013, 15:17:19
Split alt key discussion: http://chdk.setepontos.com/index.php?topic=10589.0 (http://chdk.setepontos.com/index.php?topic=10589.0)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: erikhallberg on 27 / August / 2013, 16:14:08
OSD shows "BRACKET:Off" instead of "BRACKET:-/+" (expo_type is one element short, so array index gets out of bounds).

Fixed in attached patch. Tested on my SX260.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 27 / August / 2013, 22:53:01
a495 update
Added, trunk changeset 3042 (http://trac.assembla.com/chdk/changeset/3043) release changeset 3044 (http://trac.assembla.com/chdk/changeset/3044)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 27 / August / 2013, 23:56:15
OSD shows "BRACKET:Off" instead of "BRACKET:-/+" (expo_type is one element short, so array index gets out of bounds).

Fixed in attached patch. Tested on my SX260.
Thanks, and welcome to the forum.

Added in trunk changeset 3045 (http://trac.assembla.com/chdk/changeset/3045) release changeset 3046 (http://trac.assembla.com/chdk/changeset/3046)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / August / 2013, 23:35:13
Patch to create "Port Under Development" versions.
Motivation: http://chdk.setepontos.com/index.php?topic=10259.msg103774#msg103774 (http://chdk.setepontos.com/index.php?topic=10259.msg103774#msg103774)

To enable it, add #define UNDER_DEV_PORT 1   in platform_camera.h.
CHDK works normally during 7 days, after that a message will remind user to post feedback.

Thanks to waterwingz for suggestions and test.
I have checked a heavily modified version of this into the trunk, changeset 3051 (http://trac.assembla.com/chdk/changeset/3051)

Both phil and I were uncomfortable effectively making the camera unusable with CHDK after expiration. I think a more moderate nagging will probably be enough for most of the users who would provide useful feedback. You are of course free to do something more aggressive in your own test builds.

The new code works by setting
OPT_EXPIRE_TEST=n
in your localbuildconf.inc to the number of days you want. If you want to do this only for particularly cameras, you can put it under something like
ifeq ($(PLATFORM),d10)

The build will show "TEST BUILD N DAYS LEFT" or "TEST BUILD EXPIRED!" under the splash screen.

After the build expires
1) In alt mode, the same message as the original patch will be shown. The alt mode help screen will not be shown (because it ended up fighting horribly with the nag screen on my camera and I CBA to spend more time on it).
2) In regular canon mode, only the first line will be shown, and it will be on a transparent background.

The message is not displayed when you are in CHDK menus or other GUIs.

I also isolated the expire code so there isn't the mass of ifdef code in the normal code path.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 31 / August / 2013, 06:13:46
Both phil and I were uncomfortable effectively making the camera unusable with CHDK after expiration. I think a more moderate nagging will probably be enough for most of the users who would provide useful feedback. You are of course free to do something more aggressive in your own test builds.
I tested, I think that it is enough. Thanks.

Patch for A495
- capt_seq_hdr.c and code_gen.txt files (I forgot to include them in previous patch).
- override GetBatteryTemperature() to prevent crash
- kbd.c clean up.
- notes.txt update
- key names for KEY_FACE, KEY_MODE, KEY_HELP included in modules/script_key_funcs.c
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: lapser on 31 / August / 2013, 18:08:24
Patch to create "Port Under Development" versions.
Motivation: http://chdk.setepontos.com/index.php?topic=10259.msg103774#msg103774 (http://chdk.setepontos.com/index.php?topic=10259.msg103774#msg103774)

To enable it, add #define UNDER_DEV_PORT 1   in platform_camera.h.
CHDK works normally during 7 days, after that a message will remind user to post feedback.

Thanks to waterwingz for suggestions and test.
My compiler (CHDK Shell) throws a warning from this line in gui.c when compiling the D20:
#warning OPT_EXPIRE_TEST enabled

I commented out the last line of localbuildconf.inc
//OPT_EXPIRE_TEST=7

Is this the right way to disable it? I don't want my custom builds to expire. Maybe it should be commented out by default?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 31 / August / 2013, 18:45:58
I commented out the last line of localbuildconf.inc
//OPT_EXPIRE_TEST=7

Is this the right way to disable it? I don't want my custom builds to expire. Maybe it should be commented out by default?
Are you saying CHDKSHELL enabled this option by default? If so, it shouldn't do that. If you checked it yourself, well, don't do that.

edit:
and no, // is not the correct syntax for a makefile comment. Try #

edit:
I can confirm chdkshell defaulted it to on for me. It looks like it will show up as blank in 3058

Thanks for spotting this, it could have made a lot of people unhappy and confused.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / September / 2013, 15:53:23
Patch for A495
- capt_seq_hdr.c and code_gen.txt files (I forgot to include them in previous patch).
- override GetBatteryTemperature() to prevent crash
- kbd.c clean up.
- notes.txt update
- key names for KEY_FACE, KEY_MODE, KEY_HELP included in modules/script_key_funcs.c
Thanks. Added  trunk changeset 3061 (http://trac.assembla.com/chdk/changeset/3061) release changeset 3062 (http://trac.assembla.com/chdk/changeset/3062)

Note this adds the additional keys to the stable branch.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 03 / September / 2013, 10:01:29
sx500is 100c/100d port beta.   Thanks to beta testers.





Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 03 / September / 2013, 19:24:32
Small patch to disable RAW/DNG when A1200 is in "Low Light" mode.   Thank to msl for pointing this out.

http://chdk.setepontos.com/index.php?topic=6318.msg104851#msg104851 (http://chdk.setepontos.com/index.php?topic=6318.msg104851#msg104851)

Technically a minor bug fix - patch works with both dev & stable trunks.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / September / 2013, 22:02:26
sx500is 100c/100d port beta.   Thanks to beta testers.
Added, trunk changeset 3075 (http://trac.assembla.com/chdk/changeset/3075) release changeset 3076 (http://trac.assembla.com/chdk/changeset/3076)

Small patch to disable RAW/DNG when A1200 is in "Low Light" mode.   Thank to msl for pointing this out.
Added, trunk changeset 3072 (http://trac.assembla.com/chdk/changeset/3072) release changeset 3074 (http://trac.assembla.com/chdk/changeset/3074) along with some similar fixes for d10, sx240 and sx260
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: greggyh on 07 / September / 2013, 10:47:26
Hello,

This patch adds support for firmware revision 100b of the ixus95_sd1200.  It is based on the changes to boot.c proposed by luddek in the SD1200 IS porting thread with the addition of stubs_entry.S and stubs_auto.S.  Tested with svn revision 3081
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 19 / September / 2013, 11:18:37
fix live view while recording video in g15 and s110
defined max sd for s110
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / September / 2013, 22:39:13
fix live view while recording video in g15 and s110
Added, trunk changeset 3120 (http://trac.assembla.com/chdk/changeset/3120), release changeset 3121 (http://trac.assembla.com/chdk/changeset/3121)

Quote
defined max sd for s110
Are you sure about this value? It seems very low. I haven't checked it in for now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / September / 2013, 01:17:39
Hello,

This patch adds support for firmware revision 100b of the ixus95_sd1200.  It is based on the changes to boot.c proposed by luddek in the SD1200 IS porting thread with the addition of stubs_entry.S and stubs_auto.S.  Tested with svn revision 3081
Added, trunk changeset 3122 (http://trac.assembla.com/chdk/changeset/3122) release changeset 3123 (http://)

Note, this port is pretty ugly (the 100c version as well, not specifically your work). Converting it to code-gen and new style task hooks would probably be a good idea.

Sorry for the delay adding this, I read the post and then forgot there was a patch waiting :(
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 20 / September / 2013, 03:39:13
fix live view while recording video in g15 and s110
Added, trunk changeset 3120 (http://trac.assembla.com/chdk/changeset/3120), release changeset 3121 (http://trac.assembla.com/chdk/changeset/3121)

Quote
defined max sd for s110
Are you sure about this value? It seems very low. I haven't checked it in for now.
well if you go in MF and move the Canon slider that's the last value before -1 (zoom = 0)
if I zoom in I get much bigger values but they mostly vary.. probably I misunderstood the meaning of this define
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / September / 2013, 16:39:43
well if you go in MF and move the Canon slider that's the last value before -1 (zoom = 0)
if I zoom in I get much bigger values but they mostly vary.. probably I misunderstood the meaning of this define
My understanding is it should be the largest value in the longest zoom.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 25 / September / 2013, 03:55:57
well if you go in MF and move the Canon slider that's the last value before -1 (zoom = 0)
if I zoom in I get much bigger values but they mostly vary.. probably I misunderstood the meaning of this define
My understanding is it should be the largest value in the longest zoom.
All right, then the value is 131579  :)

Can you add 0xF8000000 to dumputil too? Thank you
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 28 / September / 2013, 17:48:05
Update :  Patch withdrawn pending completion of set_chdk_osd() function, which should give a much nicer way to "cleanup" the LCD for advanced scripts.

Here's a small cosmetic patch proposal. 

When using the set_exit_key() function using "no_key" for the string,  the current 1.3 code changes the <ALT> icon to <EXIT=no_key>, which looks pretty goofy. 

This patch leaves the generic <ALT> symbol if "no_key" is passed as the exit key.  I suppose it could confuse some naive user running a script that uses "no_key",  but no more so that <EXIT=no_key>.   At some point, I believe there is a limit to what we can do to protect people.


(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fdev.wavemaker.com%2Fforums%2Ffiles%2Fany%2520key.jpg&hash=1f3ace8cf45b8e47edbaccadfc46bd8f)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 29 / September / 2013, 19:25:58
All right, then the value is 131579  :)

Can you add 0xF8000000 to dumputil too? Thank you
Done, 3127 and 3128
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: buttim on 08 / October / 2013, 09:14:02
I found some key mappings missing for the G15 and updated a couple of files consequently.
Here is the patch
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: buttim on 08 / October / 2013, 10:12:41
I added  some functionalities regarding the Eyefi SD cards.
In particular it should be possible to
Eyefi functionalities have been put in a loadable library (eyefi.flt).
My work is heavily based on the reverse engineereing done by Dave Hansen (http://sr71.net/~dave/projects/eyefi/ (http://sr71.net/~dave/projects/eyefi/)), as clearly stated in the comments opening the added files.
The modifications have been discussed with waterwingz and others in these threads:
http://chdk.setepontos.com/index.php?topic=10750.0 (http://chdk.setepontos.com/index.php?topic=10750.0)
http://chdk.setepontos.com/index.php?topic=6753.0 (http://chdk.setepontos.com/index.php?topic=6753.0)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / October / 2013, 00:19:25
I added  some functionalities regarding the Eyefi SD cards.
Excellent work, thank you.

I have added it to the trunk in changeset 3140 (http://trac.assembla.com/chdk/changeset/3140)

Since I don't have any eye-fi cards, I am unable to test it. If someone can document the functionality on the wiki in http://chdk.wikia.com/wiki/CHDK_1.3.0_User_Manual (http://chdk.wikia.com/wiki/CHDK_1.3.0_User_Manual) that would be useful.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / October / 2013, 00:30:57
I found some key mappings missing for the G15 and updated a couple of files consequently.
Here is the patch
Added, trunk changeset 3141 (http://trac.assembla.com/chdk/changeset/3141) release changeset 3142 (http://trac.assembla.com/chdk/changeset/3142)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: buttim on 10 / October / 2013, 03:02:32
A new patch for the Eyefi mod.
As discussed with Philmoz (http://chdk.setepontos.com/index.php?topic=10750.new;topicseen#new (http://chdk.setepontos.com/index.php?topic=10750.new;topicseen#new)):
The diff is relative to the 3118 release, not to the previous patch (hope i did the right thing)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / October / 2013, 17:05:31
The diff is relative to the 3118 release, not to the previous patch (hope i did the right thing)
Please make your patch relative the the current trunk, or at least a trunk revision after the original was applied.

Assuming you are using an svn working copy, you should be able to just svn update and make the new patch, although you might get some conflicts if you have made changes on top of that.

Thanks again for working on this.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: buttim on 10 / October / 2013, 18:21:14
Please make your patch relative the the current trunk, or at least a trunk revision after the original was applied.

Diff to version 3144 for Eyefi attached, sorry for the inconvenience
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / October / 2013, 00:38:46
Please make your patch relative the the current trunk, or at least a trunk revision after the original was applied.

Diff to version 3144 for Eyefi attached, sorry for the inconvenience
Thanks. Unfortunately, I think some bits may have been lost, the code for
> completed the 'default_libeyefi' structure with dummy functions
doesn't appear in this patch. I do see it in your previous patch, but it's probably better if I don't try to piece it together.

A couple comments on the code:
The enums in eyefi.h should be more unique if they are in the public header, e.g. eyefi_status and EYEFI_SUCCESS rather than status and SUCCESS.

I'm confused by
Code: [Select]
//big endian
#define host_to_be32(n) (n)
in eyefi.h, since the cameras are in fact little endian.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: buttim on 11 / October / 2013, 03:18:43
Sorry, I shouldn't try to do merges late at night.
Hope everything is ok now (but please do give a check...)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / October / 2013, 18:09:05
Sorry, I shouldn't try to do merges late at night.
Hope everything is ok now (but please do give a check...)

Added in revision 3147 (with some minor changes to the module.c code).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / October / 2013, 21:04:27
Patch to fix ND filter "flashing" problem with the G10.  Updates  propset2.h  with correct param for ND filter state and adds CAM_HAS_NATIVE_ND_FILTER to G10 platform_camera.h

As the G12 & G15 already have this patch,  I suspect the G11 and maybe G9 need it too but I have no way to test that.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / October / 2013, 22:51:16
Patch to fix ND filter "flashing" problem with the G10.  Updates  propset2.h  with correct param for ND filter state and adds CAM_HAS_NATIVE_ND_FILTER to G10 platform_camera.h

As the G12 & G15 already have this patch,  I suspect the G11 and maybe G9 need it too but I have no way to test that.

Added in revision 3150 (trunk) and 3151 (release-1.2).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / October / 2013, 23:36:35
Patch file to enable the G10 to use set_focus() in both MF and non-MF modes.

Should probably go in the 1.2.0 & 1.3.0 branches please.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / October / 2013, 00:12:18
Patch file to enable the G10 to use set_focus() in both MF and non-MF modes.
Added, trunk changeset 3166 (http://trac.assembla.com/chdk/changeset/3166) release changeset 3167 (http://trac.assembla.com/chdk/changeset/3167)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dvip on 20 / October / 2013, 00:24:48
>Patch file to enable the G10 to use set_focus() in both MF and
>non-MF modes.

Nice patch.
I know the A590IS always has to be in MF for this to work.
I wonder if this patch to enable the G10 to
use set_focus() in both MF and non-MF modes will do the same using the A590IS.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / October / 2013, 09:58:03
I know the A590IS always has to be in MF for this to work.  I wonder if this patch to enable the G10 to
use set_focus() in both MF and non-MF modes will do the same using the A590IS.
For what its worth,  the SD override code is pretty much the same for every camera.   There are five #defines that control when CHDK will try to use this code :

Code: [Select]
#define CAM_CAN_SD_OVERRIDE          1   // Camera allows to do subject distance override
 #define CAM_CAN_SD_OVER_NOT_IN_MF    1   // Camera allows subject distance (focus) override when not in manual focus mode
 #undef  CAM_CAN_SD_OVER_IN_AF_LOCK       // Camera allows subject distance (focus) override when in AF Lock mode
 #undef  CAM_CAN_SD_OVER_IN_AF_LOCK_ONLY  // Camera allows subject distance (focus) override only when in AF Lock mode OR in movie mode
 #define CAM_HAS_MANUAL_FOCUS         1   // Camera has manual focus mode
A particular camera's CHDK port will have some combination of these mode - testing is mostly trial & error to figure out which ones work and which don't.  After that,  its really only a question of the MoveFocusLensToDistance address in platform_camera.h
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / November / 2013, 17:42:26
Small patch for config file ID typo in 1.3.0.

Was causing the "Shutter halfpress show" menu item to not save / restore properly.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 07 / November / 2013, 03:13:08
Small patch for config file ID typo in 1.3.0.

Was causing the "Shutter halfpress show" menu item to not save / restore properly.

Added in revision 3202.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / November / 2013, 19:41:42
Small fix for the "circles of confusion" parameter for the G10 found here : http://www.dofmaster.com/digital_coc.html (http://www.dofmaster.com/digital_coc.html)

I spot checked a few other cameras but did not find problems although I may very well have missed them if they are there.

Should probably go in trunk and dev branches.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 08 / November / 2013, 23:35:49
Small fix for the "circles of confusion" parameter for the G10 found here : http://www.dofmaster.com/digital_coc.html (http://www.dofmaster.com/digital_coc.html)

I spot checked a few other cameras but did not find problems although I may very well have missed them if they are there.

Should probably go in trunk and dev branches.

Added in revision 3206 (trunk) and 3207 (release-1.2).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 09 / November / 2013, 11:46:46
Fix for variable OSD font sizes not drawing misc values and state display properly as reported by msl here :
http://chdk.setepontos.com/index.php?topic=10869.msg107011#msg107011 (http://chdk.setepontos.com/index.php?topic=10869.msg107011#msg107011)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 09 / November / 2013, 17:17:45
Fix for variable OSD font sizes not drawing misc values and state display properly as reported by msl here :
http://chdk.setepontos.com/index.php?topic=10869.msg107011#msg107011 (http://chdk.setepontos.com/index.php?topic=10869.msg107011#msg107011)

Added in revision 3209.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 13 / November / 2013, 11:10:27
Patch to fix a regression in raw_init_badpixel_bin() - CHDK 1.2 and 1.3.
Code: [Select]
Index: modules/dng.c
===================================================================
--- modules/dng.c (revision 3220)
+++ modules/dng.c (working copy)
@@ -845,6 +845,7 @@
                     fwrite(c, 1, 4, f);
                 }
                 count = count + len;
+                y += len - 1;
             }
         }
     }
Can somebody upload a real life badpixel.bin made on a CMOS camera (preferably after the fix)? I'd like to test something...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 13 / November / 2013, 19:43:58
Can somebody upload a real life badpixel.bin made on a CMOS camera (preferably after the fix)? I'd like to test something...
Sorry - not much help here.  Tried it on my only CMOS sensor camera (SX50 with BSI-CMOS sensor) both with and without the patch.  I get a zero bad pixel (and therefore zero file length badpixel.bin file) report from the camera either way. 

Note : camera has to be in P mode - creating badpixel.bin fails in AUTO mode.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / November / 2013, 03:00:52
Patch to fix a regression in raw_init_badpixel_bin() - CHDK 1.2 and 1.3.
Code: [Select]
Index: modules/dng.c
===================================================================
--- modules/dng.c (revision 3220)
+++ modules/dng.c (working copy)
@@ -845,6 +845,7 @@
                     fwrite(c, 1, 4, f);
                 }
                 count = count + len;
+                y += len - 1;
             }
         }
     }
Can somebody upload a real life badpixel.bin made on a CMOS camera (preferably after the fix)? I'd like to test something...

Thanks, can't believe I missed that :)

Added in revision 3221 (trunk) and 3222 (release-1.2).

IXUS310 badpixel.bin files attached (after patch).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nocaC_230 on 14 / November / 2013, 03:05:36
Sorry for my late reply!

On SX230HS 1.00c no Error.

By
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 14 / November / 2013, 11:22:11
@philmoz, @nocaC_230
Thanks for the files.

@nocaC_230
Don't forget to update your dng module ;) The issue knocked out the RLE compression of repeating bad pixels and made the camera report a higher badpixel count.

00000000  78 00 55 00
00000004  78 00 57 00
00000008  78 00 87 00
0000000C  78 00 FD 03
00000010  78 00 4F 06
00000014  78 00 20 67
00000018  78 00 21 47
0000001C  78 00 22 27
00000020  78 00 23 07
00000024  78 00 04 08
00000028  78 00 1C 29
0000002C  78 00 1D 09
00000030  79 00 AE 00
00000034  79 00 4D 01
00000038  79 00 E0 23
0000003C  79 00 E1 03
00000040  79 00 E3 03
00000044  79 00 E7 03
00000048  79 00 04 64
0000004C  79 00 05 44
00000050  79 00 06 24
00000054  79 00 07 04


Tried it on my only CMOS sensor camera (SX50 with BSI-CMOS sensor) both with and without the patch.  I get a zero bad pixel (and therefore zero file length badpixel.bin file) report from the camera either way.
Don't know how new cameras behave, it could be that bad pixels are now corrected before they reach the RAM...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nocaC_230 on 14 / November / 2013, 16:29:29
@srsa_4c

Thanks for the tip.
Don't forget to update your dng module ;) The issue knocked out the RLE compression of repeating bad pixels and made the camera report a higher badpixel count.
w new cameras behave, it could be that bad pixels are now corrected before they reach the RAM...

However, it is always displayed the same number of bad pixels.

It seems that
Quote
y + = len - 1;
has no effect on the number of bad pixels. At least not in my camera.

Bye
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 14 / November / 2013, 16:42:39
@srsa_4c

It seems that
Quote
y + = len - 1;
has no effect on the number of bad pixels. At least not in my camera.
The above hexdump is from the start of your file. The red blocks are "wrong", only their first line (4 bytes) should be present in the file when you re-create the badpixel.bin with the fixed dng module.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nocaC_230 on 14 / November / 2013, 17:16:07
@srsa_4c

With the old configuration data, it did not work. Now I have downloaded the latest dng.c and creates a new badpixel.bin.

This version seems to be better. But some red blocks are still found in the hex dump.

Bye

Attachment: New badpixel.bin
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 26 / November / 2013, 11:57:28
Attached is a patch for finsig_dryos to include ARAM_HEAP_START and ARAM_HEAP_SIZE in stubs_entry.S. I have intentionally not checked it in myself, in case the output or the code is not optimal.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / November / 2013, 00:20:32
Attached is a patch for finsig_dryos to include ARAM_HEAP_START and ARAM_HEAP_SIZE in stubs_entry.S. I have intentionally not checked it in myself, in case the output or the code is not optimal.

If these are written as 'DEF()' macros to stubs_entry.S then we should be able to remove the makefile related stuff for them. Might simplify usage.

Won't work as DEF macros - ARAM_HEAP_START is needed to set MEMISOSTART in the makefile.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / November / 2013, 17:34:31
Attached is a patch for finsig_dryos to include ARAM_HEAP_START and ARAM_HEAP_SIZE in stubs_entry.S. I have intentionally not checked it in myself, in case the output or the code is not optimal.

Added to trunk in revision 3252.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 01 / December / 2013, 14:41:48
Two patches, I'm not completely confident to check these in.

sx210:
[OK] keymap corrections, makes shoot (the script command) work
[??] I have changed two firmware variable addresses (simply enabled the automatically found ones), the test builds contained this change, but I didn't ask for confirmation
[??] I have enabled alternative ALT buttons, it's probably OK.

If the tester's words (http://chdk.setepontos.com/index.php?topic=10986.msg107569#msg107569) are not convincing enough, perhaps I / someone should ask him again?

sx230:
Enabled ARAM instead of EXMEM.
Here (http://chdk.setepontos.com/index.php?topic=10886.msg106918#msg106918)'s an early reaction (not my patch), here (http://chdk.setepontos.com/index.php?topic=6397.msg107201#msg107201)'s another (using a build with the v2 aram patch with sx230 added). edit: another report (http://chdk.setepontos.com/index.php?topic=6397.msg107653#msg107653).

I didn't touch anything else in the patched files to make the patches "noiseless", some of them look really ugly.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / December / 2013, 17:10:11
Sorry I haven't looked at the actual patches carefully yet.

SX230 in aram seems like it should be fine. It would be good to know how much canon heap is available, if it is really low exmem might still be required.

For SX210, keymap and adjustable alt should be fine. For the firmware variables, it would be good to either sanity check in the disassembly (look for equivalent code on a known working camera) or get a direct report from the test. recreview_hold being wrong in the original port would not be a surprise at all.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 06 / December / 2013, 11:59:26
SX230 in aram seems like it should be fine. It would be good to know how much canon heap is available, if it is really low exmem might still be required.
I have posted a request for malloc heap details. Enabling aram beside exmem would not bring much visible improvements, so I hope there's enough Canon heap...
Quote
For SX210, keymap and adjustable alt should be fine.
Committed.
Quote
For the firmware variables, it would be good to either sanity check in the disassembly (look for equivalent code on a known working camera) or get a direct report from the test. recreview_hold being wrong in the original port would not be a surprise at all.
Problem is, these may not be too easy to test (unless you have an idea), and I don't know whether the other r43 ports are a reliable source. I'll try to trace things in the disassembly...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 14 / December / 2013, 04:10:13
a530
PTP display stuff
Menu colors and digital zoom corrected.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / December / 2013, 21:28:47
a530
PTP display stuff
Menu colors and digital zoom corrected.
Add in trunk changeset 3272 (http://trac.assembla.com/chdk/changeset/3272) release changeset 3273 (http://trac.assembla.com/chdk/changeset/3273)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 30 / December / 2013, 00:33:01
Propcase left out of propset3 - PROPCASE_AF_LOCK.

Tested on ixus120_sd940.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / December / 2013, 00:51:37
Propcase left out of propset3 - PROPCASE_AF_LOCK.

Tested on ixus120_sd940.
Added,  trunk changeset 3286 (http://trac.assembla.com/chdk/changeset/3286) release changeset 3287 (http://trac.assembla.com/chdk/changeset/3287)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 30 / December / 2013, 08:42:35
Found the other two AF props for propset3 as well.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / December / 2013, 15:12:12
Found the other two AF props for propset3 as well.
Added, trunk changeset 3288 (http://trac.assembla.com/chdk/changeset/3288) release changeset 3289 (http://trac.assembla.com/chdk/changeset/3289)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 31 / December / 2013, 09:06:52
Patch to include more keys to ubtest.bas: zoom in, zoom out, mode, help, video, playback
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 01 / January / 2014, 23:22:54
Patch to add USB remote precision sync code to the 1.3.0 trunk.  Only enabled for A1200 at this point.  Details posted here in forum thread  :  http://chdk.setepontos.com/index.php?topic=8312.msg108644#msg108644 (http://chdk.setepontos.com/index.php?topic=8312.msg108644#msg108644)

Note : unused #define SYNCHABLE_REMOTE_NOT_ENABLED  in camera.hixus200_sd980/platform_carmera.h removed.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 01 / January / 2014, 23:54:53
Patch to add USB remote precision sync code to the 1.3.0 trunk.  Only enabled for A1200 at this point.  Details posted here in forum thread  :  http://chdk.setepontos.com/index.php?topic=8312.msg108644#msg108644 (http://chdk.setepontos.com/index.php?topic=8312.msg108644#msg108644)

Note : unused #define SYNCHABLE_REMOTE_NOT_ENABLED  in camera.hixus200_sd980/platform_carmera.h removed.

Currently usb_remote.c is built as platform independent code.
It should not include platform_camera.h or have any platform dependent #ifdef code.

Either make the decisions at run time from camera_info state variables, or move usb_remote.c to be part of the platform dependent code (platform/makefile_sub.inc).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / January / 2014, 00:01:42
Currently usb_remote.c is built as platform independent code. It should not include platform_camera.h or have any platform dependent #ifdef code. Either make the decisions at run time from camera_info state variables, or move usb_remote.c to be part of the platform dependent code (platform/makefile_sub.inc).
I think I know the answer to this,  but why?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / January / 2014, 00:07:34
Currently usb_remote.c is built as platform independent code. It should not include platform_camera.h or have any platform dependent #ifdef code. Either make the decisions at run time from camera_info state variables, or move usb_remote.c to be part of the platform dependent code (platform/makefile_sub.inc).
I think I know the answer to this,  but why?

Platform independent code is only compiled once for all cameras in the batch build. If it contains platform dependent stuff, then every camera will get the settings from the first one compiled.

It can also be converted to a module more easily.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / January / 2014, 00:13:50
Platform independent code is only compiled once for all cameras in the batch build. If it contains platform dependent stuff, then every camera will get the settings from the first one compiled. It can also be converted to a module more easily.
The second reason was my guess.  The first reason is (I think) a relatively new change but makes sense to me.

The patch will wait.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / January / 2014, 11:29:07
Either make the decisions at run time from camera_info state variables, or move usb_remote.c to be part of the platform dependent code (platform/makefile_sub.inc).
Phil :

Not sure we'd want to go with the run time selection until it's tested on a lot more cameras.

Is moving it into platform dependent code as simple as moving the USB remote file names from lib/core/Makefile to platform/makefile_sub.inc ?   The comments say it will be compiled as Thumb that way - do I need to make any other changes because of that? 

This patch file compiles but I don't know if it causes problems :

Code: [Select]
Index: lib/core/Makefile
===================================================================
--- lib/core/Makefile (revision 3301)
+++ lib/core/Makefile (working copy)
@@ -11,7 +11,7 @@
 
 OBJS = gui_batt.o gui_space.o gui_usb.o gui_mbox.o gps.o gui_script.o gui_menu.o gui_user_menu.o
 OBJS+= suba.o levent.o console.o gps_math.o live_view.o ptp.o action_stack.o script.o
-OBJS+= usb_input.o usb_module.o usb_remote.o autoiso.o
+OBJS+= autoiso.o
 OBJS+= $(topdir)modules/exportlist.inc module_load.o modules.o
 
 all: libcore.a
Index: platform/makefile_sub.inc
===================================================================
--- platform/makefile_sub.inc (revision 3301)
+++ platform/makefile_sub.inc (working copy)
@@ -16,7 +16,7 @@
 #add platform dependent 'core' files (build as THUMB)
 OBJS+=main.thm.o gui_draw.thm.o memmgmt.thm.o \
      gui.thm.o kbd_process.thm.o conf.thm.o gui_osd.thm.o raw.thm.o \
-     shot_histogram.thm.o shooting.thm.o camera_info.thm.o remotecap.thm.o
+     shot_histogram.thm.o shooting.thm.o usb_input.thm.o usb_module.thm.o usb_remote.thm.o camera_info.thm.o remotecap.thm.o
 
 libplatformsub.a: $(OBJS) bin_compat.h
 

Thanks.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / January / 2014, 15:34:47
I would suggest moving just that code to a function in a platform dependent file (core/usb_sync.c?). The function can be NOP if CAM_REMOTE_USES_PRECISION_SYNC is not defined.

I think your makefile is correct, but you should only have to move the one file, not the other usb remote related files. Being compiled as thumb is not a change, since the lib/core files are also thumb.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / January / 2014, 21:59:22
I would suggest moving just that code to a function in a platform dependent file (core/usb_sync.c?). The function can be NOP if CAM_REMOTE_USES_PRECISION_SYNC is not defined. I think your makefile is correct, but you should only have to move the one file, not the other usb remote related files. Being compiled as thumb is not a change, since the lib/core files are also thumb.
Moved wait_until_remote_button_is_released() into its own platform dependent file and added to platform/makefile_sub.inc .
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / January / 2014, 01:22:38
I would suggest moving just that code to a function in a platform dependent file (core/usb_sync.c?). The function can be NOP if CAM_REMOTE_USES_PRECISION_SYNC is not defined. I think your makefile is correct, but you should only have to move the one file, not the other usb remote related files. Being compiled as thumb is not a change, since the lib/core files are also thumb.
Moved wait_until_remote_button_is_released() into its own platform dependent file and added to platform/makefile_sub.inc .
Added in trunk changeset 3302 (http://trac.assembla.com/chdk/changeset/3302)

I changed the platform_camera.h include in usb_syn.c to camera.h.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: buttim on 14 / January / 2014, 19:48:47
A proposal patch to fix the eyefi functionalities I added. Relative to revision 3311.
- fixes a bug when user choses not to test a network being added
- more wait time network testing (it was often not enough)

I made extensive testing while traveling during 4 weeks, so it should be pretty stable right now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: buttim on 24 / January / 2014, 06:33:16
I published this patch more than a week ago but got no reply and the code didn't end up in the repository. Am I missing something/should have done something different?

A proposal patch to fix the eyefi functionalities I added. Relative to revision 3311.
- fixes a bug when user choses not to test a network being added
- more wait time network testing (it was often not enough)

I made extensive testing while traveling during 4 weeks, so it should be pretty stable right now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 24 / January / 2014, 07:14:06
I published this patch more than a week ago but got no reply and the code didn't end up in the repository. Am I missing something/should have done something different?

A proposal patch to fix the eyefi functionalities I added. Relative to revision 3311.
- fixes a bug when user choses not to test a network being added
- more wait time network testing (it was often not enough)

I made extensive testing while traveling during 4 weeks, so it should be pretty stable right now.

Thanks for the reminder - things get missed sometimes.

Added in revision 3333.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / March / 2014, 09:10:56
Change to custom_auto_iso discussed here : http://chdk.setepontos.com/index.php?topic=11118.msg108981#msg108981 (http://chdk.setepontos.com/index.php?topic=11118.msg108981#msg108981)

Applies cleanly to 1.3.0 trunk and with automatic patch offsets in 1.2.0.

Update : added 1/2000 shutter speed in response to this request : http://chdk.setepontos.com/index.php?topic=11118.msg110742#msg110742 (http://chdk.setepontos.com/index.php?topic=11118.msg110742#msg110742)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 06 / March / 2014, 03:43:22
Change to custom_auto_iso discussed here : http://chdk.setepontos.com/index.php?topic=11118.msg108981#msg108981 (http://chdk.setepontos.com/index.php?topic=11118.msg108981#msg108981)

Applies cleanly to 1.3.0 trunk and with automatic patch offsets in 1.2.0.

Update : added 1/2000 shutter speed in response to this request : http://chdk.setepontos.com/index.php?topic=11118.msg110742#msg110742 (http://chdk.setepontos.com/index.php?topic=11118.msg110742#msg110742)

Added to trunk in revision 3369, and release 1.2 in revision 3370.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: canontestit on 06 / March / 2014, 13:52:08
Hi,

thank you very much for the fast reaction and integration of 1/2000 in the auto-iso-code.
This is really very friendly!

One question concerning waterwingz statement here:
http://chdk.setepontos.com/index.php?topic=11259.msg110460#msg110460 (http://chdk.setepontos.com/index.php?topic=11259.msg110460#msg110460)

Will I have to make a special request for that?
Or will you consider that "bug" automatically in future releases?

Best regards
canontestit
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 07 / March / 2014, 13:05:36
One question concerning waterwingz statement here:
...
Will I have to make a special request for that? Or will you consider that "bug" automatically in future releases?
It's on my "to do" list but not at the top.  Given the recent renewed interest in the function,  I'll see if I can get to it this month.

Update :  I took a look and I no longer believe there is a bug related to not setting an Av value for cameras with adjustable apertures.   At the point where the autoiso code runs,  the Av value should already be set. The code just adjusts the Tv and Sv values proportionately.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / March / 2014, 11:49:55
Update patch to cleanup USB remote code in 1.3.0 prior to submitting separate changes for battery 3rd terminal triggering and high speed pulse width measurement.

Changes include :
1) moves usb_remote_key() calls from each camera's kbd.c routine to a common point in kbd_process()
2) white space cleanup of usb_xxxx.c files
3) multiple changes in anticipation of some day making the code run from an .flt module

Changes primarily from philmoz.  Thanks for that!

Tested on A1200 and G10.  Builds the 3395 tree without errors.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 23 / March / 2014, 18:08:15
Update patch to cleanup USB remote code in 1.3.0 prior to submitting separate changes for battery 3rd terminal triggering and high speed pulse width measurement.
Added, trunk changeset 3396 (http://trac.assembla.com/chdk/changeset/3396).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 28 / March / 2014, 14:51:35
This patch adjusts S110's kbd so it doesn't interfere with shooting (ptp) when keeping the KEY_POWER phisically pressed.
Also removed KEY_PRINT entry since I see a number of ports deprecated it.

Code: [Select]
diff --git a/platform/s110/kbd.c b/platform/s110/kbd.c
index 512c136..1f968a3 100644
--- a/platform/s110/kbd.c
+++ b/platform/s110/kbd.c
@@ -17,7 +17,7 @@ static long kbd_mod_state[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
 extern void _GetKbdState(long*);
 
 #define KEYS_MASK0 (0x000181EF)
-#define KEYS_MASK1 (0x00C00000)
+#define KEYS_MASK1 (0x00800000)
 #define KEYS_MASK2 (0x000000C0)
 
 #define SD_READONLY_FLAG    0x00000800 // Found @0xf864bc7c, levent 0x20a
@@ -46,9 +46,11 @@ static KeyMap keymap[] = {
     { 0, KEY_VIDEO           ,0x00000100 },
     { 0, KEY_ZOOM_OUT        ,0x00008000 }, // Found @0xf864bc2c, levent 0x03
     { 0, KEY_ZOOM_IN         ,0x00010000 }, // Found @0xf864bc34, levent 0x02
-    { 1, KEY_POWER           ,0x00400000 }, // Found @0xf864bc54, levent 0x100
+
+// Removed since it breaks when shooting with KEY_POWER pressed
+//    { 1, KEY_POWER           ,0x00400000 }, // Found @0xf864bc54, levent 0x100
     { 1, KEY_PLAYBACK        ,0x00800000 }, // Found @0xf864bc5c, levent 0x101
-    { 1, KEY_PRINT           ,0x00800000 }, // = Default ALT button
+
     { 2, KEY_SHOOT_FULL      ,0x000000c0 }, // Found @0xf864bc6c, levent 0x01
     { 2, KEY_SHOOT_FULL_ONLY ,0x00000080 }, // Found @0xf864bc6c, levent 0x01
     { 2, KEY_SHOOT_HALF      ,0x00000040 }, // Found @0xf864bc64, levent 0x00
diff --git a/platform/s110/platform_camera.h b/platform/s110/platform_camera.h
index fc80d34..3241060 100644
--- a/platform/s110/platform_camera.h
+++ b/platform/s110/platform_camera.h
@@ -37,8 +37,8 @@
     #define CAM_HAS_NATIVE_ND_FILTER            1   // Camera has built-in ND filter with Canon menu support for enable/disable
 
     #define CAM_ADJUSTABLE_ALT_BUTTON           1
-    #define CAM_ALT_BUTTON_NAMES            { "Playback", "Video", "Display" }
-    #define CAM_ALT_BUTTON_OPTIONS          { KEY_PRINT, KEY_VIDEO, KEY_DISPLAY }
+    #define CAM_ALT_BUTTON_NAMES            { "Display", "Video" }
+    #define CAM_ALT_BUTTON_OPTIONS          { KEY_DISPLAY, KEY_VIDEO }
 
     #undef  CAM_CAN_SD_OVER_NOT_IN_MF
     #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 28 / March / 2014, 15:26:01
Also removed KEY_PRINT entry since I see a number of ports deprecated it.
KEY_PRINT alias has been removed from some ports, it was discussed here (http://chdk.setepontos.com/index.php?topic=10659.msg105005#msg105005), but KEY_PLAYBACK is the "standard" button used for ALT mode in several models:
Code: [Select]
#define CAM_ALT_BUTTON_NAMES                { "Playback", "Video", "Display" }
#define CAM_ALT_BUTTON_OPTIONS              { KEY_PLAYBACK, KEY_VIDEO, KEY_DISPLAY }
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: c10ud on 29 / March / 2014, 13:37:11
Also removed KEY_PRINT entry since I see a number of ports deprecated it.
KEY_PRINT alias has been removed from some ports, it was discussed here (http://chdk.setepontos.com/index.php?topic=10659.msg105005#msg105005), but KEY_PLAYBACK is the "standard" button used for ALT mode in several models:
Code: [Select]
#define CAM_ALT_BUTTON_NAMES                { "Playback", "Video", "Display" }
#define CAM_ALT_BUTTON_OPTIONS              { KEY_PLAYBACK, KEY_VIDEO, KEY_DISPLAY }
whoops sorry, I always think playback=disp (and I know it's wrong!)
If you want you can add the right key to the define, otherwise I'll post an updated patch in the next days (the important part was the key_power one though)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 29 / March / 2014, 14:31:14
A patch for 1.3.0 to reset the behavior of the set_mf and set_focus uBASIC commands for backwards compatibility.  Currently they try to return a status value which needs to be used somehow.  This patch reverts them to no longer returning status.  See :  http://chdk.setepontos.com/index.php?topic=11373.msg111673#msg111673 (http://chdk.setepontos.com/index.php?topic=11373.msg111673#msg111673)

The Lua equivalent functions are not affected by this patch and will continue to return status.
 
There may very well be a better way to do this.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 29 / March / 2014, 16:51:10
A patch for 1.3.0 to reset the behavior of the set_mf and set_focus uBASIC commands for backwards compatibility.  Currently they try to return a status value which needs to be used somehow.  This patch reverts them to no longer returning status.  See :  http://chdk.setepontos.com/index.php?topic=11373.msg111673#msg111673 (http://chdk.setepontos.com/index.php?topic=11373.msg111673#msg111673)

The Lua equivalent functions are not affected by this patch and will continue to return status.
 
There may very well be a better way to do this.
Added, trunk changeset 3403 (http://trac.assembla.com/chdk/changeset/3403)

Further comments in the MF thread.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / March / 2014, 02:43:02
This patch adjusts S110's kbd so it doesn't interfere with shooting (ptp) when keeping the KEY_POWER phisically pressed.
Also removed KEY_PRINT entry since I see a number of ports deprecated it.
Added (adjusted per later comments) in trunk changeset 3404 (http://trac.assembla.com/chdk/changeset/3404) release 3405 (http://trac.assembla.com/chdk/changeset/3405)

For the power problem, is removing KEY_POWER from the key map necessary? I may have misunderstood the problem, but I would expect that just removing it from the mask would be enough.

The reason I ask is that quite a few ports have KEY_POWER in the key map. We should be consistent about how this is handled.

I would say this key should NOT ever be in the key mask. Pressing the power button should shut down whether you are in alt mode or not. I don't think it needs to be in the keymap either, since there are other ways to shut down, but if there is a reason to have it, that's OK with me.

edit:
Discussion split to http://chdk.setepontos.com/index.php?topic=11384 (http://chdk.setepontos.com/index.php?topic=11384)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / April / 2014, 17:59:30
I'd like to get the USB remote high precision timer code into the 1.3.0 trunk before its gets too far out of sync.   Some discussion is here :
and probably a few other places.

This patch adds all the functionality listed in the thread quoted above but does not enable actual operation for any camera (at least not yet).  Note that while the option is not enabled for any camera in the build,  almost all the code is included anyway (it's not a lot) to avoid adding camera specific stuff to core code.  Unless #define CAM_REMOTE_USB_HIGHSPEED 1 is enabled in platform_camera.h for a custom build, using the new enable_highspeed_usb() function simply results in nothing happening.  I know that's probably not desirable long term but I'd like to think the long term intention is to enable the option by default.

This does not address concerns about overloading the camera using the function, or trying to read the USB remote 5V status directly without going through kbd_read_keys_r2().  But it does capture something workable in the trunk - much like the precision sync code - for advanced users to experiment with.

Getting this in now will allow me to also test and submit a generic patch for "3rd battery terminal" triggering without stepping in my own changes.  The 3rd battery terminal trigger, in addition to freeing up the USB port for ptp,  let's you build remote switches that do not require a battery or other source of power.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / April / 2014, 10:48:46
This does not address concerns about overloading the camera using the function,
Updated patch file that adds a #define to camera.h for specifying the shortest interval to which a script can set the HP timer.   Defaults to 1000 uSec, which is a big speed-up from the standard USB remote timing and slower than the 500 uSec rate that my cameras all seemed to manage just fine with.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / April / 2014, 16:25:10
This does not address concerns about overloading the camera using the function,
Updated patch file that adds a #define to camera.h for specifying the shortest interval to which a script can set the HP timer.   Defaults to 1000 uSec, which is a big speed-up from the standard USB remote timing and slower than the 500 uSec rate that my cameras all seemed to manage just fine with.
Added in trunk changeset 3408 (http://trac.assembla.com/chdk/changeset/3408)

Note I think srsa_4c's concerns about calling kbd stuff inside the timer callback are probably valid, but I don't think it's any worse than a lot of other stuff CHDK does. The only way to know if it's really a problem is for people to try to use it. If there is an MMIO that can be polled directly to get USB power state, that would probably be better.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / April / 2014, 17:23:52
My last patch broke the build.  Made "just one little change too many" between r15 and r16.  And didn't rebuild everything to test it.

I hate it when that happens.

(https://pbs.twimg.com/media/BkHwlGBIgAEsSP7.jpg:small)
Fix attached.

Sorry.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / April / 2014, 17:28:33
Fix attached.
Added, trunk changeset 3410 (http://trac.assembla.com/chdk/changeset/3410)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / April / 2014, 09:36:28
Small patch to fix timing error in USB remote HP timer mode.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 06 / April / 2014, 14:46:01
Small patch to fix timing error in USB remote HP timer mode.
Added, trunk changeset 3414 (http://trac.assembla.com/chdk/changeset/3414)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bovirus on 10 / April / 2014, 03:11:08
Update italian language

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / April / 2014, 19:57:52
Update italian language

Translated strings # 560, 562 & 563 are too long.
See length instructions in the file.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bovirus on 12 / April / 2014, 02:43:50
Sorry. Your are right.

I reposted the file (patch).
If you need I can post also the language file

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mpetroff on 19 / April / 2014, 22:48:07
IXUS255 / ELPH330HS port for firmware 100f and 100h. See http://chdk.setepontos.com/index.php?topic=10150 (http://chdk.setepontos.com/index.php?topic=10150) and https://github.com/mpetroff/chdk-elph330hs. (https://github.com/mpetroff/chdk-elph330hs.)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mipa87 on 21 / April / 2014, 05:05:21
Update for czech lng file.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 21 / April / 2014, 06:03:13
Sorry. Your are right.

I reposted the file (patch).
If you need I can post also the language file

Sorry; but message 563 is still too long.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 21 / April / 2014, 06:04:54
IXUS255 / ELPH330HS port for firmware 100f and 100h. See http://chdk.setepontos.com/index.php?topic=10150 (http://chdk.setepontos.com/index.php?topic=10150) and https://github.com/mpetroff/chdk-elph330hs. (https://github.com/mpetroff/chdk-elph330hs.)

I was not able to cleanly apply this patch to either the current revision of 1.2 or 1.3.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 21 / April / 2014, 06:05:20
Update for czech lng file.

Is this for version 1.2 or 1.3?

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bovirus on 21 / April / 2014, 06:43:08
Sorry. Your are right.

I reposted the file (patch).
If you need I can post also the language file

Sorry; but message 563 is still too long.

Phil.


Hi. Msg 563 reduce. Sorry again...

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mpetroff on 21 / April / 2014, 11:50:09
IXUS255 / ELPH330HS port for firmware 100f and 100h. See http://chdk.setepontos.com/index.php?topic=10150 (http://chdk.setepontos.com/index.php?topic=10150) and https://github.com/mpetroff/chdk-elph330hs. (https://github.com/mpetroff/chdk-elph330hs.)

I was not able to cleanly apply this patch to either the current revision of 1.2 or 1.3.

Phil.

It applies cleanly for me from the root of the svn tree (i.e. the directory with the trunk, branches, and tags directories). Attached is a new version that applies cleanly for me using
Code: [Select]
patch -p0 < ixus255_elph330hs_v2.patch from the base directory of the development trunk (i.e, the directory containing README, COPYING, camera_list.csv, etc.).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 21 / April / 2014, 22:56:31
Small patch file to implement this :
... and some way to query the CAM_SD_OVER_IN* values.

Adds a get_sd_over_modes() function to Lua and uBASIC.   Returns a bit map where the bits are :

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / April / 2014, 00:53:11
Small patch file to implement this :
... and some way to query the CAM_SD_OVER_IN* values.

Adds a get_sd_over_modes() function to Lua and uBASIC.   Returns a bit map where the bits are :

  • = can set focus in Autofocus mode  (0x01)
  • = can set focus in AFL mode (0x02)
  • = can set focus in MF mode (0x04)
Added, trunk changeset 3423 (http://trac.assembla.com/chdk/changeset/3423/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 25 / April / 2014, 19:19:13
Sorry. Your are right.

I reposted the file (patch).
If you need I can post also the language file

Sorry; but message 563 is still too long.

Phil.


Hi. Msg 563 reduce. Sorry again...

Added in revision 3424.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 25 / April / 2014, 20:02:58
IXUS255 / ELPH330HS port for firmware 100f and 100h. See http://chdk.setepontos.com/index.php?topic=10150 (http://chdk.setepontos.com/index.php?topic=10150) and https://github.com/mpetroff/chdk-elph330hs. (https://github.com/mpetroff/chdk-elph330hs.)

I was not able to cleanly apply this patch to either the current revision of 1.2 or 1.3.

Phil.

It applies cleanly for me from the root of the svn tree (i.e. the directory with the trunk, branches, and tags directories). Attached is a new version that applies cleanly for me using
Code: [Select]
patch -p0 < ixus255_elph330hs_v2.patch from the base directory of the development trunk (i.e, the directory containing README, COPYING, camera_list.csv, etc.).

Added in revision 3425.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / May / 2014, 20:11:56
Fix for missing "core_spytask_can_start" call in boot.c for ixus960_sd950 per this thread :  http://chdk.setepontos.com/index.php?topic=11498 (http://chdk.setepontos.com/index.php?topic=11498)

Tested on 1.2.0, should also work on 1.3.0.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 12 / May / 2014, 01:47:36
Fix for missing "core_spytask_can_start" call in boot.c for ixus960_sd950 per this thread :  http://chdk.setepontos.com/index.php?topic=11498 (http://chdk.setepontos.com/index.php?topic=11498)

Tested on 1.2.0, should also work on 1.3.0.
Added, trunk changeset 3438 (http://trac.assembla.com/chdk/changeset/3438) release changeset 3439 (http://trac.assembla.com/chdk/changeset/3439)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / May / 2014, 01:26:18
Patch to remove menu items related to using battery third terminal remote if CAM_REMOTE_AtoD_CHANNEL is not defined.

Problem reported here : http://chdk.setepontos.com/index.php?topic=10385.msg112854#msg112854 (http://chdk.setepontos.com/index.php?topic=10385.msg112854#msg112854)

Tested on G10 (no AtoD channel defined) and SD940 (AtoD channel defined). Trunk 1.3.0 rebuilt with patch applied.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / May / 2014, 03:17:41
Patch to remove menu items related to using battery third terminal remote if CAM_REMOTE_AtoD_CHANNEL is not defined.

Problem reported here : http://chdk.setepontos.com/index.php?topic=10385.msg112854#msg112854 (http://chdk.setepontos.com/index.php?topic=10385.msg112854#msg112854)

Tested on G10 (no AtoD channel defined) and SD940 (AtoD channel defined). Trunk 1.3.0 rebuilt with patch applied.

Added to trunk in revision 3441.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 16 / May / 2014, 19:27:44
Per  msl's suggestion (http://chdk.setepontos.com/index.php?topic=7127.msg112912#msg112912), I think it's time to enable the HP timer function in scripts.

The attached patch does that for 1.3.0 but leaves the minimum timer interval at 1 mSec for safety.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 16 / May / 2014, 20:59:50
Per  msl's suggestion (http://chdk.setepontos.com/index.php?topic=7127.msg112912#msg112912), I think it's time to enable the HP timer function in scripts.

The attached patch does that for 1.3.0 but leaves the minimum timer interval at 1 mSec for safety.

Added in revision 3442.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / May / 2014, 07:38:07
Patch file for the S95 to enable the user defined <ALT> key function.

Forum thread > S95, S90 alt button (http://chdk.setepontos.com/index.php?topic=11515.0)

Also attached is an untested identical S90 patch - posted here for interest only pending somebody volunteering to test ( http://chdk.setepontos.com/index.php?topic=4509.msg112901#msg112901 (http://chdk.setepontos.com/index.php?topic=4509.msg112901#msg112901) ).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 17 / May / 2014, 18:50:08
Patch file for the S95 to enable the user defined <ALT> key function.

Forum thread > S95, S90 alt button (http://chdk.setepontos.com/index.php?topic=11515.0)

Also attached is an untested identical S90 patch - posted here for interest only pending somebody volunteering to test ( http://chdk.setepontos.com/index.php?topic=4509.msg112901#msg112901 (http://chdk.setepontos.com/index.php?topic=4509.msg112901#msg112901) ).

S95 added to trunk in revision 3443.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 01 / June / 2014, 17:36:43
Small patch to fix an issue with the RAW/DNG disabled warnings when OSD state display is not enabled.  The warnings still display in that case (as they should) but they scroll vertically down the screen.

AFAIK, this is only a problem in 1.3.0.   The code in 1.2.0 is a bit different.

edit :  1.2.0 has the same bug - it's just is a different place.  And the gui_osd in 1.2.0 is a mess anyway - I found another bug while fixing this one - there should be a law about using single letter variable names for global variables !  A somewhat more complicated patch file is attached.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / June / 2014, 18:27:32
Small patch to fix an issue with the RAW/DNG disabled warnings when OSD state display is not enabled.
Added, trunk changeset 3453 (http://trac.assembla.com/chdk/changeset/3453)

edit:
and release changeset 3454 (http://trac.assembla.com/chdk/changeset/3454)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 01 / June / 2014, 19:20:38
Here's a simple patch based on a conversation with reyalp on IRC the other day.

The idea is to force an error message on the screen if there are no modules on the SD card (i.e. typically due to an incorrect install). This should give a quick indication to a newbie that something is wrong and also make it easy to answer forum posts that initiate from an invalid install (especially those due to incorrect use of dual partition cards).  It uses the state display OSD space in much the same way that RAW exception warnings are displayed.

Currently the displayed string is ?No Modules? .  I'm open to anything else prettier and/or more descriptive that will fit in the 12 character space available (e.g  Bad Install / CHDK Borked / SDCard Error ?).   I suppose we could actually "internationalize" the string too.

Patch is for 1.3.0 - if it seems like a good idea I can do a 1.2.0 version.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / June / 2014, 22:07:11
Patches for problem with fast Ev switch mode where enabling the mode caused Canon menus to no longer respond to the Up/Down keys as reported here : http://chdk.setepontos.com/index.php?topic=11557 (http://chdk.setepontos.com/index.php?topic=11557)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / June / 2014, 22:53:11
Patches for problem with fast Ev switch mode where enabling the mode caused Canon menus to no longer respond to the Up/Down keys as reported here : http://chdk.setepontos.com/index.php?topic=11557 (http://chdk.setepontos.com/index.php?topic=11557)
Added, trunk changeset 3455 (http://trac.assembla.com/chdk/changeset/3455) release changeset 3456 (http://trac.assembla.com/chdk/changeset/3456) (adjusted slightly to compile)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 07 / June / 2014, 22:50:21
Here's a simple patch based on a conversation with reyalp on IRC the other day.

The idea is to force an error message on the screen if there are no modules on the SD card (i.e. typically due to an incorrect install).
Added in trunk changeset 3459 (http://trac.assembla.com/chdk/changeset/3459) with some further modification based on our discussion in irc.

The is "ERROR MISSING MODULES" and is drawn unconditionally. It only checks fselect at startup, but this should be enough to catch the cases where people got the modules in the wrong place etc.

It might be worth extending this at some point to show the error if any of the core modules (like script, dng, fselect...) fail to load due to missing file or mismatched version.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / June / 2014, 23:21:54
Patch for the ixus125_elph110hs to enable the Video key to perform the CHDK functions normally performed by the DISP key.  Code borrowed from the S100.

Discussion here : 
    http://chdk.setepontos.com/index.php?topic=8085.msg113632#msg113632 (http://chdk.setepontos.com/index.php?topic=8085.msg113632#msg113632)
and
    http://chdk.setepontos.com/index.php?topic=10361 (http://chdk.setepontos.com/index.php?topic=10361)

CHDK 1.3.0 only.

Update : patch file deleted pending update of other ixus125 functions.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: mipa87 on 19 / June / 2014, 13:00:18
It is for version 1.3, but in attachment is updated version  :).

Update for czech lng file.

Is this for version 1.2 or 1.3?

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 21 / June / 2014, 16:46:07
Patch for ixus125_elph110hs.  Upgrade to this (redacted) patch : http://chdk.setepontos.com/index.php?topic=650.msg113650#msg113650 (http://chdk.setepontos.com/index.php?topic=650.msg113650#msg113650)  to include better set_mf() functions and enable RAW shortcut toggling.

Tested here : http://chdk.setepontos.com/index.php?topic=11078.msg113791#msg113791 (http://chdk.setepontos.com/index.php?topic=11078.msg113791#msg113791)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: yotann on 21 / June / 2014, 21:55:01
Fixes for various issues with the IXUS1000/SD4500 port.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / June / 2014, 19:19:39
Patch for ixus125_elph110hs.  Upgrade to this (redacted) patch : http://chdk.setepontos.com/index.php?topic=650.msg113650#msg113650 (http://chdk.setepontos.com/index.php?topic=650.msg113650#msg113650)  to include better set_mf() functions and enable RAW shortcut toggling.

Tested here : http://chdk.setepontos.com/index.php?topic=11078.msg113791#msg113791 (http://chdk.setepontos.com/index.php?topic=11078.msg113791#msg113791)

Added in revision 3476 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / June / 2014, 19:23:38
It is for version 1.3, but in attachment is updated version  :).

Update for czech lng file.

Is this for version 1.2 or 1.3?

Phil.

Added in revision 3477 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / June / 2014, 19:37:01
Fixes for various issues with the IXUS1000/SD4500 port.
  • My 100b version seems identical to 100d except that it's called SD4500 instead of IXUS1000.
  • The alt mode key is configurable between Movie and Playback. Movie is still the default.
  • The DNG active area, color matrix, and white and black points are corrected.
  • Override subject distance should work.
  • Other minor fixes.

Thanks for that.

Can you provide a firmware dump please, just want to verify that it is compatible with 100d.

A couple of suggestions before I commit this:
- modelist.h already has MODE_SCN_WINK_SELF_TIMER and MODE_SCN_FACE_SELF_TIMER, do we really need two new entries?
- the color matrix entries (platform_camera.h) all have the denominator set to 1,000,000 (was done by the original port). A value of 10,000 probably makes more sense (e.g. first entry would be 1.4134, not 0.014134)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Microfunguy on 23 / June / 2014, 14:23:37
Submitted :  a patch file to add the IXUS115_ELPH100HS  fw  1.00c, 1.01a, 1.01b&1.01c  to the dev trunk & autobuild.

Someone asked me to compile an SDM test version for the IXUS115 101c.

So, I quickly ported a build for 101b, a fairly trivial task.

Except ..... it refuses to boot.
Absolutely nothing happens.
This has never happened with any earlier or later camera ports to SDM.
Because SDM still uses the loader code that has a separate resetcode folder, I tried using all the loader files from changeset 1977, but it makes no difference.
(I do not fully understand the loader code anyway.)

Have there been any changes to CHDK PLATFORM code that affects cameras whose firmware version (101c) is identical to another version (101b) ?

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / June / 2014, 20:01:18
Submitted :  a patch file to add the IXUS115_ELPH100HS  fw  1.00c, 1.01a, 1.01b&1.01c  to the dev trunk & autobuild.

Someone asked me to compile an SDM test version for the IXUS115 101c.

So, I quickly ported a build for 101b, a fairly trivial task.

Except ..... it refuses to boot.
Absolutely nothing happens.
This has never happened with any earlier or later camera ports to SDM.
Because SDM still uses the loader code that has a separate resetcode folder, I tried using all the loader files from changeset 1977, but it makes no difference.
(I do not fully understand the loader code anyway.)

Have there been any changes to CHDK PLATFORM code that affects cameras whose firmware version (101c) is identical to another version (101b) ?

No changes that I am aware of that would cause this.
There was some work done on checking platform and version at startup; but this has not yet made it into SVN.

Does CHDK work on the camera?
Are you sure it's an IXUS115 and not an ELPH115 (IXUS132)?

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: yotann on 23 / June / 2014, 23:14:08
Fixes for various issues with the IXUS1000/SD4500 port.
  • My 100b version seems identical to 100d except that it's called SD4500 instead of IXUS1000.
  • ...
Can you provide a firmware dump please, just want to verify that it is compatible with 100d.
https://yotann.org/~tmp/ixus1000_sd4500_100b.bin (https://yotann.org/~tmp/ixus1000_sd4500_100b.bin)
Quote
A couple of suggestions before I commit this:
- modelist.h already has MODE_SCN_WINK_SELF_TIMER and MODE_SCN_FACE_SELF_TIMER, do we really need two new entries?
There are already duplicates for many other modes because they aren't hidden under a SCN menu like in other cameras. Someone apparently thought that was important enough to make new modes. I've switched to the existing MODE_SCN_ entries, but I haven't changed the existing non-SCN duplicates, which are also used by a few other cameras.
Quote
- the color matrix entries (platform_camera.h) all have the denominator set to 1,000,000 (was done by the original port). A value of 10,000 probably makes more sense (e.g. first entry would be 1.4134, not 0.014134)
Fixed.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 23 / June / 2014, 23:33:55
Fixes for various issues with the IXUS1000/SD4500 port.
  • My 100b version seems identical to 100d except that it's called SD4500 instead of IXUS1000.
  • ...
Can you provide a firmware dump please, just want to verify that it is compatible with 100d.
https://yotann.org/~tmp/ixus1000_sd4500_100b.bin (https://yotann.org/~tmp/ixus1000_sd4500_100b.bin)
Quote
A couple of suggestions before I commit this:
- modelist.h already has MODE_SCN_WINK_SELF_TIMER and MODE_SCN_FACE_SELF_TIMER, do we really need two new entries?
There are already duplicates for many other modes because they aren't hidden under a SCN menu like in other cameras. Someone apparently thought that was important enough to make new modes. I've switched to the existing MODE_SCN_ entries, but I haven't changed the existing non-SCN duplicates, which are also used by a few other cameras.
Quote
- the color matrix entries (platform_camera.h) all have the denominator set to 1,000,000 (was done by the original port). A value of 10,000 probably makes more sense (e.g. first entry would be 1.4134, not 0.014134)
Fixed.

Added in revision 3478 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Microfunguy on 24 / June / 2014, 05:19:02
.
Are you sure it's an IXUS115 and not an ELPH115 (IXUS132)?

Thanks Phil, that is what the user claims and someone else describes his camera as an 'IXUS 117 (ELPH 100).

This has me completely baffled.

If you have time, could you explain (maybe as a separate topic) the loader code ?

Presumably, we can at least try to turn on an led at this extremely early stage of the boot process.


David
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Microfunguy on 24 / June / 2014, 05:28:08
I forgot to add, CHDK works perfectly.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Microfunguy on 24 / June / 2014, 16:15:19
It would seem the IXUS115 is the only camera supported by SDM that has the 'new' AgentRam.

I will investigate why it was added for this camera.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 24 / June / 2014, 17:28:39
It would seem the IXUS115 is the only camera supported by SDM that has the 'new' AgentRam.

I will investigate why it was added for this camera.
AdditionAgentRAM - an unused piece of memory? (http://chdk.setepontos.com/index.php?topic=10886.0)
This camera has only little available memory which isn't enough for CHDK to operate reliably.
The port used EXMEM (http://chdk.setepontos.com/index.php?topic=5980.0) before which results in over-compressed JPEGs on certain cameras - this model was affected by that.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Microfunguy on 24 / June / 2014, 17:43:24
.
The port used EXMEM (http://chdk.setepontos.com/index.php?topic=5980.0) before which results in over-compressed JPEGs on certain cameras - this model was affected by that.

Aaahh  ... thanks .... that is what the 'commit' notes seemed to imply.


David
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 28 / June / 2014, 11:58:59
Small extension to outslider's drawing.lua library to enable font scaling (via the 1.3.0 version of draw_string())
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 29 / June / 2014, 23:43:28
Small extension to outslider's drawing.lua library to enable font scaling (via the 1.3.0 version of draw_string())
Added, trunk changeset 3487 (http://trac.assembla.com/chdk/changeset/3487/trunk)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 01 / July / 2014, 17:16:25
A possible quick fix for this (http://chdk.setepontos.com/index.php?topic=11604.msg114050#msg114050) issue.

edit:
Decided to commit it: https://www.assembla.com/code/chdk/subversion/commit/3492 (https://www.assembla.com/code/chdk/subversion/commit/3492)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 12 / July / 2014, 18:02:13
Not exactly the world's most exciting change but here's a fixup for RAW/DNG directory naming conventions per : http://chdk.setepontos.com/index.php?topic=11615.msg113826#msg113826 (http://chdk.setepontos.com/index.php?topic=11615.msg113826#msg113826)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 12 / July / 2014, 22:15:35
Not exactly the world's most exciting change but here's a fixup for RAW/DNG directory naming conventions per : http://chdk.setepontos.com/index.php?topic=11615.msg113826#msg113826 (http://chdk.setepontos.com/index.php?topic=11615.msg113826#msg113826)
Added, trunk changeset 3499 (http://trac.assembla.com/chdk/changeset/3499)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 13 / July / 2014, 00:03:02
Not exactly the world's most exciting change but here's a fixup for RAW/DNG directory naming conventions per : http://chdk.setepontos.com/index.php?topic=11615.msg113826#msg113826 (http://chdk.setepontos.com/index.php?topic=11615.msg113826#msg113826)
Added, trunk changeset 3499 (http://trac.assembla.com/chdk/changeset/3499)
Too bad we don't have the equivalent of a mailing list for the good people who help maintain the language files.  I'm sure that they would respond quickly to small changes like this if they were aware of them.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: nafraf on 13 / July / 2014, 00:56:02
Two more language files were posted to c10ud's git fork: https://github.com/c10ud/CHDK/pull/1
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 30 / July / 2014, 19:17:57
Patch files for 1.2.0 & 1.3.0  to fix this long standing bug / missing functionality related to the USB remote not triggering wait_click(0) per  http://chdk.setepontos.com/index.php?topic=7127.msg115071#msg115071 (http://chdk.setepontos.com/index.php?topic=7127.msg115071#msg115071)

Tested on A1200 and by msl
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 31 / July / 2014, 01:08:01
Patch files for 1.2.0 & 1.3.0  to fix this long standing bug / missing functionality related to the USB remote not triggering wait_click(0) per  http://chdk.setepontos.com/index.php?topic=7127.msg115071#msg115071 (http://chdk.setepontos.com/index.php?topic=7127.msg115071#msg115071)

Tested on A1200 and by msl
Added, trunk changeset 3549 (http://trac.assembla.com/chdk/changeset/3549) release changeset 3550 (http://trac.assembla.com/chdk/changeset/3550)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / August / 2014, 21:10:19
Powershot N 1.00a BETA release per http://chdk.setepontos.com/index.php?topic=11460.msg115211#msg115211 (http://chdk.setepontos.com/index.php?topic=11460.msg115211#msg115211)

One integration item of note - I made kbd_blocked in core/kbd_process.c not static so that my touch task hack would know if CHDK was active or not.  Works well and doesn't seem to cause any issues with a complete trunk rebuild.  However, if there is a better way to do this I'd be happy to change it.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 02 / August / 2014, 22:53:25
Powershot N 1.00a BETA release per http://chdk.setepontos.com/index.php?topic=11460.msg115211#msg115211 (http://chdk.setepontos.com/index.php?topic=11460.msg115211#msg115211)

One integration item of note - I made kbd_blocked in core/kbd_process.c not static so that my touch task hack would know if CHDK was active or not.  Works well and doesn't seem to cause any issues with a complete trunk rebuild.  However, if there is a better way to do this I'd be happy to change it.

Added in revision 3558 (trunk).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 03 / August / 2014, 19:27:39
Update patch for A1300 SD override modes based on test submitted by an A1300 owner.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / August / 2014, 20:56:16
Update patch for A1300 SD override modes based on test submitted by an A1300 owner.
Added, trunk changeset 3563 (http://trac.assembla.com/chdk/changeset/3563)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / August / 2014, 20:49:19
Small patch file for Powershot N to fix RAW/DNG save folder and to correct zoom in / zoom out orientation.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 08 / August / 2014, 21:44:19
Small patch file for Powershot N to fix RAW/DNG save folder and to correct zoom in / zoom out orientation.
Added, trunk changeset 3576 (http://trac.assembla.com/chdk/changeset/3576)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / August / 2014, 21:58:29
Small fix for the Powershot "N"  ( failure to update a C&P'd value ... )
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / August / 2014, 22:26:11
Small fix for the Powershot "N"  ( failure to update a C&P'd value ... )
Added, trunk changeset 3579 (http://trac.assembla.com/chdk/changeset/3579)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 13 / August / 2014, 22:31:55
Second small fix for Powershot "N".  This time to enable starting in shooting mode when power button is held down during powerup.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / August / 2014, 00:46:43
Second small fix for Powershot "N".  This time to enable starting in shooting mode when power button is held down during powerup.
Added, trunk changeset 3582 (http://trac.assembla.com/chdk/changeset/3582)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / August / 2014, 11:20:20
Patch file for the Powershot N to correct three recently reported problems.



Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 23 / August / 2014, 21:09:51
Patch file for the Powershot N to correct three recently reported problems.
Added, trunk changeset 3593 (http://trac.assembla.com/chdk/changeset/3593)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / August / 2014, 22:11:27
Patch file to add the Powershot N Facebook addition as an ALPHA release.   

Issues with video mentioned in README.TXT.  There may also be PTP issues with palette and liveview crop.

http://chdk.setepontos.com/index.php?topic=11460.msg116097#msg116097 (http://chdk.setepontos.com/index.php?topic=11460.msg116097#msg116097)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 24 / August / 2014, 18:45:34
Patch file to add the Powershot N Facebook addition as an ALPHA release.   
Added, trunk changeset 3595 (http://trac.assembla.com/chdk/changeset/3595)

edit:
The n_facebook name seems to have confused the script that generates the download table on the autobuild server. The files are still accessible.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 31 / August / 2014, 18:23:53
Powershot N  & Powershot N Facebook

Fix for CAM_LOAD_CUSTOM_COLORS conflict with Canon Color Option setting as summarized here :

http://chdk.setepontos.com/index.php?topic=11460.msg116119#msg116119 (http://chdk.setepontos.com/index.php?topic=11460.msg116119#msg116119)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 31 / August / 2014, 19:45:40
Powershot N  & Powershot N Facebook

Fix for CAM_LOAD_CUSTOM_COLORS conflict with Canon Color Option setting as summarized here :

http://chdk.setepontos.com/index.php?topic=11460.msg116119#msg116119 (http://chdk.setepontos.com/index.php?topic=11460.msg116119#msg116119)
Added, trunk changeset 3602 (http://trac.assembla.com/chdk/changeset/3602)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 01 / September / 2014, 21:20:18
Patch file to correct SD override values in platform_camera.h and/or wrappers.c for various cameras based on test data supplied by koshy (and a few others).

Relevant link > http://chdk.setepontos.com/index.php?topic=11078.msg115678#msg115678 (http://chdk.setepontos.com/index.php?topic=11078.msg115678#msg115678)

Compiles okay when complete 1.3.0 trunk is rebuilt.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / September / 2014, 23:28:59
Patch file to correct SD override values in platform_camera.h and/or wrappers.c for various cameras based on test data supplied by koshy (and a few others).
Added, trunk changeset 3603 (http://trac.assembla.com/chdk/changeset/3603)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / September / 2014, 20:12:54
Nafraf's pre-ALPHA code for the SX170 based on discussion here : http://chdk.setepontos.com/index.php?topic=11164.msg116585#msg116585 (http://chdk.setepontos.com/index.php?topic=11164.msg116585#msg116585)

Not for inclusion in the autobuild - I'm just done with putting this together every so often on an ad-hoc basis.  This at least captures nafraf's code base.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 25 / September / 2014, 02:20:36
Patches for sx200is:
1. rewrite of taskCreateHook.
2. implementation of task_FileWrite.
3. OPT_RUN_WITH_BATT_COVER_OPEN.
All tested and working.

P.S. Patches are adjusted for svn by hand, since I use svn-git, I included original patches under git subdirectory.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 26 / September / 2014, 12:44:47
Rest of code_gen patches for sx200is
4. capt_seq
5. movie_rec
6. boot
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 26 / September / 2014, 22:58:15
Fix for Powershot N  & Powershot N Facebook  video crashing reported here :

http://chdk.setepontos.com/index.php?topic=11460.msg117059#msg117059 (http://chdk.setepontos.com/index.php?topic=11460.msg117059#msg117059)

Thanks to nafraf and srsa_4c for jumping on this right away.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / September / 2014, 23:06:12
Rest of code_gen patches for sx200is
4. capt_seq
5. movie_rec
6. boot
Patches for sx200is:
1. rewrite of taskCreateHook.
2. implementation of task_FileWrite.
3. OPT_RUN_WITH_BATT_COVER_OPEN.
All tested and working.

P.S. Patches are adjusted for svn by hand, since I use svn-git, I included original patches under git subdirectory.

Added to trunk (1.3) in revision 3626 - I applied the 6 patches in numerical order, please check that this is the expected result (compiles ok).

Also if you have time you might want to look at implementing the simplified loader code for the SX200 (http://chdk.setepontos.com/index.php?topic=9027.msg93857#msg93857 (http://chdk.setepontos.com/index.php?topic=9027.msg93857#msg93857)).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / September / 2014, 23:17:00
Fix for Powershot N  & Powershot N Facebook  video crashing reported here :

http://chdk.setepontos.com/index.php?topic=11460.msg117059#msg117059 (http://chdk.setepontos.com/index.php?topic=11460.msg117059#msg117059)

Thanks to nafraf and srsa_4c for jumping on this right away.

Added to trunk in revision 3627.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 27 / September / 2014, 22:20:53
Patch for 1.3.0 to allow the file select window to have different column widths on different cameras as discussed here :

http://chdk.setepontos.com/index.php?topic=11937 (http://chdk.setepontos.com/index.php?topic=11937)

Tested on Powershot N and A1200 with 1.3.0 version (complete 1.3.0 branch rebuilds properly as well).

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 28 / September / 2014, 03:12:27
Patch for 1.3.0 to allow the file select window to have different column widths on different cameras as discussed here :

http://chdk.setepontos.com/index.php?topic=11937 (http://chdk.setepontos.com/index.php?topic=11937)

Tested on Powershot N and A1200 with 1.3.0 version (complete 1.3.0 branch rebuilds properly as well).

Added to trunk in revision 3629.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 28 / September / 2014, 11:52:07
Another small fix for the two Powershot N models - corrects occasional issues with <ALT> key causing pseudo-random activities to happen at startup.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 28 / September / 2014, 14:27:07
Simplified loader code for the SX200is.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / September / 2014, 08:04:44
Another small fix for the two Powershot N models - corrects occasional issues with <ALT> key causing pseudo-random activities to happen at startup.

Added to trunk in revision 3630.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / September / 2014, 08:13:43
Simplified loader code for the SX200is.

Added to trunk in revision 3631.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 29 / September / 2014, 13:59:22
code_gen comments for sx200is
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / September / 2014, 04:38:32
code_gen comments for sx200is

Added to trunk in revision 3634.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 03 / October / 2014, 00:25:43
Powershot N & Powershot N Facebook :  Patch for pallete pointers needed for chdkptp liveview.

Props to reyalp for pointing out what was missing.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ADamb on 03 / October / 2014, 01:17:40
Cleanup of double code_gen comments for sx200is after r3636
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / October / 2014, 04:29:03
Powershot N & Powershot N Facebook :  Patch for pallete pointers needed for chdkptp liveview.

Props to reyalp for pointing out what was missing.

Added to trunk in revision 3637.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 03 / October / 2014, 05:00:14
Cleanup of double code_gen comments for sx200is after r3636

Added to trunk in revision 3638.

Note: diff file gave this error 'patch: **** malformed patch at line 58: @@ -60,13 +60,6'
Needed to add missing '@@' at the end of the line.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / October / 2014, 16:31:07
Patch files  to fix  the USB remote zoom function for "super zooms" as discussed here : Remote Zoom Strange Behavior w/A4000 (http://chdk.setepontos.com/index.php?topic=11954.0)

I think the 1.2.0 version qualifies as a bug fix.  Certainly being able to zoom in 10 to 12 discrete steps rather than 121 on cameras like the S100 is a big improvement (ignoring that it mostly would not work at all for super zooms using 1.2.0 )

Tested on S100 and A1200 (both 1.2.0 and 1.3.0 versions).

Update : patch files update to fix error spotted by reyalp  (and philmoz)  :-[

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / October / 2014, 16:33:03
Changes to the S100's platform_camera.h to improve CHDK driven zoom positioning.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / October / 2014, 21:18:48
Patch files  to fix  the USB remote zoom function for "super zooms" as discussed here : Remote Zoom Strange Behavior w/A4000 (http://chdk.setepontos.com/index.php?topic=11954.0)
Added, trunk changeset 3640 (http://trac.assembla.com/chdk/changeset/3640) release changeset 3641 (http://trac.assembla.com/chdk/changeset/3641)

I switched the nested ternaries to if/else, hopefully I didn't break it.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / October / 2014, 22:20:04
Changes to the S100's platform_camera.h to improve CHDK driven zoom positioning.

Added to trunk (3642) and release (3643).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 05 / October / 2014, 15:07:01
In discussing the CHDKplus.lua script today (http://chdk.setepontos.com/index.php?topic=11284.msg117360#msg117360 (http://chdk.setepontos.com/index.php?topic=11284.msg117360#msg117360)) the idea of being able to manage the PLAYBACK key was raised. 

Again.

link > playback key for script + key masks (http://chdk.setepontos.com/index.php?topic=10627.0)
link > Allowing scripts to trap full & half press shutter button activations (http://chdk.setepontos.com/index.php?topic=10580.msg104420#msg104420)

Not sure why this has been omitted so far - the change nafraf made to the uBASIC test script looking for the playback key has been in the autobuild for a while now.

Turns out to be a really nice addition to CHDKplus.lua for cameras that have the playback key defined in their keymask.  And even if PLAYBACK is selected as the <ALT> key, it still mostly works correctly.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / October / 2014, 20:59:33
Not sure why this has been omitted so far - the change nafraf made to the uBASIC test script looking for the playback key has been in the autobuild for a while now.
Just forgotten  I think. Added in trunk changeset 3644 (http://trac.assembla.com/chdk/changeset/3644).

Note that quite a few cameras that use it as the alt key have it aliases to KEY_PRINT. I don't think this will cause any actual problems.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / October / 2014, 22:09:36
A boring little patch to add the missing enter_alt function to uBASIC and a new get_alt_mode() function to both Lua and uBASIC per a new function to allow Lua to determine if CHDK is currently in <ALT> mode (http://chdk.setepontos.com/index.php?topic=11962)

(Test script in the zip file.)

Update :  patch updated per http://chdk.setepontos.com/index.php?topic=11962.msg117448#msg117448 (http://chdk.setepontos.com/index.php?topic=11962.msg117448#msg117448)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / October / 2014, 20:52:59
A small patch to correct how the jog dial direction is interpreted on the S100.   Currently,  turning the dial in the Canon menus moves through the selected menus in the opposite direction than when you turn the dial in the CHDK menus.

Annoying.

This patch fixes that.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / October / 2014, 21:20:17
A small patch to correct how the jog dial direction is interpreted on the S100.   Currently,  turning the dial in the Canon menus moves through the selected menus in the opposite direction than when you turn the dial in the CHDK menus.

Annoying.

This patch fixes that.

Added in revision 3658 (trunk) and 3659 (release).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / December / 2014, 21:46:48
Fixes for video mode issues discussed here : http://chdk.setepontos.com/index.php?topic=9986.msg118892#msg118892 (http://chdk.setepontos.com/index.php?topic=9986.msg118892#msg118892)

Corrects the Powershot N,  Powershot N Facebook,  S100, and A1200.   

All tested  on 1.3.0 (except n_facebook camera) with vidtest.lua and now perform properly (i.e. no reported errors).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 06 / December / 2014, 22:06:09
Corrects the Powershot N,  Powershot N Facebook,  S100, and A1200.   

All tested  on 1.3.0 (except n_facebook camera) with vidtest.lua and now perform properly (i.e. no reported errors).
Added, trunk changeset 3775
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 12 / December / 2014, 19:05:35
I'd like to request / propose that the GPS changes documented here be added to 1.3.0  : New GPS functionality for the SX230 (http://chdk.setepontos.com/index.php?topic=7791.msg118806#msg118806) .

My rationale is that the changes :

I'd also like to see it get into 1.3 prior to it becoming stable so that I only have to write one addition to the user manual for 1.3.0 & 1.4.0.

There are several updates still to do as suggested in the forum thread linked above.  But those can wait and become part of 1.4.0
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / December / 2014, 20:03:25
Before this gets "stepped on" again,  patch file for the GPS code suitable for 1.4.0.

Builds cleanly against the new 1.4.0 trunk.

Once this is in,  I'll work on the enhancements mentioned in the GPS thread.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 19 / December / 2014, 21:25:01
Before this gets "stepped on" again,  patch file for the GPS code suitable for 1.4.0.

Builds cleanly against the new 1.4.0 trunk.

Once this is in,  I'll work on the enhancements mentioned in the GPS thread.

Added to 1.4 in revision 3828.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / December / 2014, 23:39:26
It is probably worth adding rudi's patch from here :  http://chdk.setepontos.com/index.php?topic=12076.msg118315#msg118315 (http://chdk.setepontos.com/index.php?topic=12076.msg118315#msg118315) to the 1.3.0 build.

I've tested his changes as part of the 1.4.0 patch and encorporated them there.  It fixes the bug mentioned in the thread linked here.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 20 / December / 2014, 15:33:16
It is probably worth adding rudi's patch from here :  http://chdk.setepontos.com/index.php?topic=12076.msg118315#msg118315 (http://chdk.setepontos.com/index.php?topic=12076.msg118315#msg118315) to the 1.3.0 build.

I've tested his changes as part of the 1.4.0 patch and encorporated them there.  It fixes the bug mentioned in the thread linked here.

Added in revision 3832.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / January / 2015, 12:36:52
Several minor/cosmetic cleanups to 1.4.0 GPS code. 
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 04 / January / 2015, 17:08:18
Several minor/cosmetic cleanups to 1.4.0 GPS code.

Added in revision 3883.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 13 / January / 2015, 21:09:22
Fix for video button interaction with Canon shooting mode per this discussion :  http://chdk.setepontos.com/index.php?topic=12163.msg119879#msg119879 (http://chdk.setepontos.com/index.php?topic=12163.msg119879#msg119879)

Has no effect on cameras without video button (none needed).

On camera with video button that have no CHDK defined Canon shooting modes that contain the 0x0400 video bit, it prevents the return of a null shooting mode.  Tested on S100 using USB Remote Control Mode [ Video ].

On camera with video button but with defined Canon modes that contain the 0x0400 video bit,  everything works as before.  Tested on Powershot N using USB Remote Control Mode [ Video ].
.
Edit : deleted 1.3.0 patch file - contents were bizarre
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 13 / January / 2015, 23:09:32
Fix for video button interaction with Canon shooting mode per this discussion :  http://chdk.setepontos.com/index.php?topic=12163.msg119879#msg119879 (http://chdk.setepontos.com/index.php?topic=12163.msg119879#msg119879)

Has no effect on cameras without video button (none needed).

On camera with video button that have no CHDK defined Canon shooting modes that contain the 0x0400 video bit, it prevents the return of a null shooting mode.  Tested on S100 using USB Remote Control Mode [ Video ].

On camera with video button but with defined Canon modes that contain the 0x0400 video bit,  everything works as before.  Tested on Powershot N using USB Remote Control Mode [ Video ].
.

1.3 patch uses VID_REC_ACTIVE_BIT in shooting.c instead of CAM_MASK_VID_REC_ACTIVE. It also includes spurious changes for SX240 & SX260 (looks like a partial failed patch).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 13 / January / 2015, 23:36:29
Fix for video button interaction with Canon shooting mode per this discussion :  http://chdk.setepontos.com/index.php?topic=12163.msg119879#msg119879 (http://chdk.setepontos.com/index.php?topic=12163.msg119879#msg119879)

Has no effect on cameras without video button (none needed).

On camera with video button that have no CHDK defined Canon shooting modes that contain the 0x0400 video bit, it prevents the return of a null shooting mode.  Tested on S100 using USB Remote Control Mode [ Video ].

On camera with video button but with defined Canon modes that contain the 0x0400 video bit,  everything works as before.  Tested on Powershot N using USB Remote Control Mode [ Video ].
.

1.3 patch uses VID_REC_ACTIVE_BIT in shooting.c instead of CAM_MASK_VID_REC_ACTIVE. It also includes spurious changes for SX240 & SX260 (looks like a partial failed patch).

Phil.
Wow - bizarre patch file.  Please ignore the 1.3.0 patch - no idea what happened there.  1.3.0 users can struggle on with the way it has been for years I guess.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / January / 2015, 03:50:21
Fix for video button interaction with Canon shooting mode per this discussion :  http://chdk.setepontos.com/index.php?topic=12163.msg119879#msg119879 (http://chdk.setepontos.com/index.php?topic=12163.msg119879#msg119879)

Has no effect on cameras without video button (none needed).

On camera with video button that have no CHDK defined Canon shooting modes that contain the 0x0400 video bit, it prevents the return of a null shooting mode.  Tested on S100 using USB Remote Control Mode [ Video ].

On camera with video button but with defined Canon modes that contain the 0x0400 video bit,  everything works as before.  Tested on Powershot N using USB Remote Control Mode [ Video ].
.
Edit : deleted 1.3.0 patch file - contents were bizarre

1.4 changes added in revision 3916.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / January / 2015, 18:21:48
A couple more updates to shooting modes per http://chdk.setepontos.com/index.php?topic=12163.msg119906#msg119906 (http://chdk.setepontos.com/index.php?topic=12163.msg119906#msg119906) and conversations with reyalp on IRC.

The 1.3.0 patch file is the corrected version of what I meant to post earlier to fix USB remote video mode lockups for cameras with a seperate video button (patch already applied to 1.4.0)

The 1.4.0 patch file removes mode definitions that can't actually be set via set_capture_mode().

Edit : complete trunk build was completed for both patches.  Results tested on Powershot N and S100 using USB remote video control mode.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 17 / January / 2015, 19:59:43
A couple more updates to shooting modes per http://chdk.setepontos.com/index.php?topic=12163.msg119906#msg119906 (http://chdk.setepontos.com/index.php?topic=12163.msg119906#msg119906) and conversations with reyalp on IRC.

The 1.3.0 patch file is the corrected version of what I meant to post earlier to fix USB remote video mode lockups for cameras with a seperate video button (patch already applied to 1.4.0)

The 1.4.0 patch file removes mode definitions that can't actually be set via set_capture_mode().

Edit : complete trunk build was completed for both patches.  Results tested on Powershot N and S100 using USB remote video control mode.

Added in revision 3927 (1.4) and 3928 (1.3).

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 23 / January / 2015, 19:32:49
MF mode patches for ixus132_elph115 per http://chdk.setepontos.com/index.php?topic=12200.msg120152#msg120152 (http://chdk.setepontos.com/index.php?topic=12200.msg120152#msg120152)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 23 / January / 2015, 21:05:14
MF mode patches for ixus132_elph115 per http://chdk.setepontos.com/index.php?topic=12200.msg120152#msg120152 (http://chdk.setepontos.com/index.php?topic=12200.msg120152#msg120152)
Added, trunk 3946 stable 3947
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / February / 2015, 20:42:29
User menu mods to expand how scripts are handled.   Pressing the shutter button runs the script when it's selected in the User Menu.  Pressing Func/Set brings up a dialog box to allow the script to be loaded and then jump to the Script menu, or to cancel.

From the Script menu, selecting Back returns you to the User Menu.

forum thread : alternative ways to start a script (http://chdk.setepontos.com/index.php?topic=10933.msg120427#msg120427)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 07 / February / 2015, 05:12:39
User menu mods to expand how scripts are handled.   Pressing the shutter button runs the script when it's selected in the User Menu.  Pressing Func/Set brings up a dialog box to allow the script to be loaded and then jump to the Script menu, or to cancel.

From the Script menu, selecting Back returns you to the User Menu.

forum thread : alternative ways to start a script (http://chdk.setepontos.com/index.php?topic=10933.msg120427#msg120427)

Added in revision 3979.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / February / 2015, 18:52:26
Patch file (1.4.0) to cleanup USB remote code per the discussion here : http://chdk.setepontos.com/index.php?topic=7127.msg120508#msg120508 (http://chdk.setepontos.com/index.php?topic=7127.msg120508#msg120508)

Patch simplifies the code by removing unnecessary interlocks,  fixes some issues with debug mode, and adds a usb_sync_wait() function to Lua and uBASIC for scripting use with multi-camera setups.

Updates to the usb_force_active() function per this discussion : http://chdk.setepontos.com/index.php?topic=7127.msg120539#msg120539 (http://chdk.setepontos.com/index.php?topic=7127.msg120539#msg120539)  deferred pending reyalp updates to kbd.c files.



 
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / February / 2015, 19:54:08
Patch file (1.4.0) to cleanup USB remote code per the discussion here : http://chdk.setepontos.com/index.php?topic=7127.msg120508#msg120508 (http://chdk.setepontos.com/index.php?topic=7127.msg120508#msg120508)
Added, trunk changeset 4002 (https://www.assembla.com/code/chdk/subversion/commit/4002)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 14 / February / 2015, 20:08:41
Patch file (1.4.0) to cleanup USB remote code per the discussion here : http://chdk.setepontos.com/index.php?topic=7127.msg120508#msg120508 (http://chdk.setepontos.com/index.php?topic=7127.msg120508#msg120508)

Patch simplifies the code by removing unnecessary interlocks,  fixes some issues with debug mode, and adds a usb_sync_wait() function to Lua and uBASIC for scripting use with multi-camera setups.

Updates to the usb_force_active() function per this discussion : http://chdk.setepontos.com/index.php?topic=7127.msg120539#msg120539 (http://chdk.setepontos.com/index.php?topic=7127.msg120539#msg120539)  deferred pending reyalp updates to kbd.c files.

For consistency the 'usb_sync_wait_flag' entry in module_exportlist.c should be '&usb_sync_wait_flag' - this generates a variable reference instead of a function reference in module_hashlist.c.

(Both generate the same code with current compilers.)

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / February / 2015, 20:25:28
For consistency the 'usb_sync_wait_flag' entry in module_exportlist.c should be '&usb_sync_wait_flag' - this generates a variable reference instead of a function reference in module_hashlist.c.
Patch  :-X
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / February / 2015, 20:41:30
done in 4003
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / February / 2015, 20:01:34
Patch for S100 ND filter as discussed here : http://chdk.setepontos.com/index.php?topic=7887.msg120563#msg120563 (http://chdk.setepontos.com/index.php?topic=7887.msg120563#msg120563)

Tested on S100.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / February / 2015, 23:38:30
Patch to re-enable the creation of a ps.fi2 file for the S100.   Tested on the 1.02A  and thus assumed to likely work on the other versions.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 21 / February / 2015, 00:18:44
Patch for S100 ND filter as discussed here :
Added in trunk 3028, stable 4029
Quote
Patch to re-enable the creation of a ps.fi2 file for the S100.   Tested on the 1.02A  and thus assumed to likely work on the other versions.
Added in trunk 4030. As you suggested in IRC, I'll leave it there for people to try other firmware versions before enabling in 1.3
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: TobiMarg on 23 / February / 2015, 10:02:22
Patch to show gps errors (no signal, no gps info in image, ...) using the message box instead of writing directly to the screen and wait/block for a few seconds. Because of the limited string length in the message box I had to insert some newlines (only fixed english and german).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 28 / February / 2015, 14:48:19
Patch to show gps errors (no signal, no gps info in image, ...) using the message box instead of writing directly to the screen and wait/block for a few seconds. Because of the limited string length in the message box I had to insert some newlines (only fixed english and german).
This was definitely on my list of things to clean up but I'm currently traveling with almost no internet access so have not had a chance to test it.  Perhaps it would have been better to post to the forum thread for the GPS code first? I try to make it a point to submit my patches that way in case there is any discussion.

Having said that, rudi also sent me a list of things he wanted to do but can't currently find the time for. When I get back next week I'll get a combined list to the forum to discuss?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / March / 2015, 15:23:54
Patch file to add codegen for the G10.  Includes the addition of filewrite.c

Tested on 1.02a and by using arm-elf-objdump to compare the new boot.o, capt_seq.o, movie_rec.o files to the originals (after tweaking chdk_disasm.c to remove some of the optimization for nullsub and double jump removal for the validation only).

Would be good to add only to unstable until the 1.03b & 1.04a are tried.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / March / 2015, 16:45:48
Patch file to add codegen for the G10.  Includes the addition of filewrite.c
Added, trunk 4066. Did you check remote capture, including -cont?
Quote
Would be good to add only to unstable until the 1.03b & 1.04a are tried.
Added to testing needed page. That said, diffing the files between platforms and verifying that only offsets change is probably good enough.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / March / 2015, 17:55:17
Did you check remote capture, including -cont?
Yes & yes.   Works great!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / March / 2015, 18:56:06
kbd.c 1.4.0 changes for G10 (with jog dial)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / March / 2015, 19:23:21
kbd.c 1.4.0 changes for G10 (with jog dial)
Added, trunk 4068.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / March / 2015, 21:45:20
Tested kbd.c 1.4.0 patch for the S100.   Adds the necessary hooks for the current GPS code to kbd_common.c as well.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / March / 2015, 23:10:31
Tested kbd.c 1.4.0 patch for the S100.   Adds the necessary hooks for the current GPS code to kbd_common.c as well.
Added, trunk 4069
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 15 / March / 2015, 11:30:24
CHDK 1.4.0 kbd patch file for S90, S95, & S110.   Builds but not tested.

S80 uses older style kbd code - was not comfortable blind converting that one.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / March / 2015, 15:41:29
CHDK 1.4.0 kbd patch file for S90, S95, & S110.   Builds but not tested.

S80 uses older style kbd code - was not comfortable blind converting that one.
Thanks. Added in trunk 4077, with the addition of SD_READONLY_IDX for s90, s95.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / March / 2015, 18:18:11
Patch to show gps errors (no signal, no gps info in image, ...) using the message box instead of writing directly to the screen and wait/block for a few seconds. Because of the limited string length in the message box I had to insert some newlines (only fixed english and german).
Thanks.

Added in trunk 4081. I added a few newlines to some of the other lng files, but I'm sure I missed some.

Sorry for the delay, not having a GPS enabled cam or really knowing how the GPS code works, I like to get a little feedback before adding.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 19 / March / 2015, 20:23:24
CHDK 1.4.0 kbd patch file for ixus120_sd940.    Tested on f/w 1.03C.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / March / 2015, 23:51:27
CHDK 1.4.0 kbd patch file for ixus120_sd940.    Tested on f/w 1.03C.
Thanks. Added in trunk 4099-4100.

As noted in the commit log, this patched made the battery door hack no longer hard coded. I added the OPT_RUN_WITH_BATT_COVER_OPEN to the corresponding parts of boot.c, so people not using the hack won't get the boot delay.

The patch also removed some code involving altDownTimer in kbd.c. I'm not clear what it did, but figured I'd mention it in case you didn't mean to get rid of it.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / March / 2015, 08:16:46
As noted in the commit log, this patched made the battery door hack no longer hard coded. I added the OPT_RUN_WITH_BATT_COVER_OPEN to the corresponding parts of boot.c, so people not using the hack won't get the boot delay.
My patch did not do that so I assume you made that choice?  I guess it's fine for "standardization" but it will make things a little harder on script writers if they haven't figured out how to use chdkptp to xfer script files.   It really does not "cost" much to build it in and it does not really work in a non-standard manner if you don't actually use the feature.

Quote
The patch also removed some code involving altDownTimer in kbd.c. I'm not clear what it did, but figured I'd mention it in case you didn't mean to get rid of it.
My bad - in converting everything to match the other ports revised code I missed this. 

The Canon firmware for the ixus120 (and I presume some other cams) natively allows you to "short press" on the DISP key to change view in playback mode and "long press" to change display brightness.  Prior to us standardizing somewhat on the PLAYBACK key as the ALT key,  the ixus120 used the DISP key for ALT.   So that bit of code allowed a click to enter ALT,  short press to toggle playback display mode, and long press to toggle the brightness.  Useful but again not "standard".

Not sure how to handle this (or how many other cameras could use this)? Build as a custom kbd.c or modify the standard my_kbd_read_keys() to allow this as an option?

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / March / 2015, 17:24:25
Continued in the kbd.c discussion, since this looks like more than a 2 post conversation: http://chdk.setepontos.com/index.php?topic=12245.msg121236#msg121236 (http://chdk.setepontos.com/index.php?topic=12245.msg121236#msg121236)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: adong on 14 / April / 2015, 03:42:00
New dancing bits and keysys for DryOS r55. Made against 4150.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / April / 2015, 01:39:55
New dancing bits and keysys for DryOS r55. Made against 4150.
Thanks, added in trunk r4151, stable r4152.

This patched contained a change to makefile.inc, which I did not include.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 03 / July / 2015, 16:26:16
Patch file to add sx530hs to the 1.4.0 svn.  Marked SKIP_AUTOBUILD for now.

Based on jeronymoGustavo (http://chdk.setepontos.com/index.php?action=profile;u=28443)'s work in the Porting a camera sx530hs (http://chdk.setepontos.com/index.php?topic=12418.msg123262#msg123262) thread.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / July / 2015, 17:39:16
Patch file to add sx530hs to the 1.4.0 svn.  Marked SKIP_AUTOBUILD for now.

Based on jeronymoGustavo (http://chdk.setepontos.com/index.php?action=profile;u=28443)'s work in the Porting a camera sx530hs (http://chdk.setepontos.com/index.php?topic=12418.msg123262#msg123262) thread.
Added, trunk 4181. Comments in http://chdk.setepontos.com/index.php?topic=12418.msg123295#msg123295 (http://chdk.setepontos.com/index.php?topic=12418.msg123295#msg123295)
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 09 / August / 2015, 11:22:37
A small patch file for CHDK 1.3.0 so that uBASIC scripts don't throw a syntax error if there is an @chdk_version statement in the script.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 09 / August / 2015, 11:59:23
Two more small patch files for uBASIC.   

Changes  set_remote_timing  to be a statement rather than a factor.   I believe this is more consistent with uBASIC style (i.e. does not force user to check the return value).

Also a small parsing fix for usb_sync_wait in 1.4.0
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / August / 2015, 17:40:20
A small patch file for CHDK 1.3.0 so that uBASIC scripts don't throw a syntax error if there is an @chdk_version statement in the script.
Added in 4216
Two more small patch files for uBASIC.   

Changes  set_remote_timing  to be a statement rather than a factor.   I believe this is more consistent with uBASIC style (i.e. does not force user to check the return value).

Also a small parsing fix for usb_sync_wait in 1.4.0
Added in trunk 4217, release 1.3 4218. As discussed in IRC, I changed the 1.3 version to continue allowing the old syntax. I doubt anyone is using this, but may as well stick to the "stable versions script compatible" where possible.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 06 / February / 2016, 17:25:22
Wow - first submitted patch in almost six months.  That must be something of a record.

Patch to fix OSD keyboard for Powershot N & Powershot N Facebook when CHDK OSD is rotated 180 deg.

(per http://chdk.setepontos.com/index.php?topic=12684.msg126574#msg126574 (http://chdk.setepontos.com/index.php?topic=12684.msg126574#msg126574))

Also removed a bit of dead code just because.  As noted elsewhere,  the touchscreen code for the four or five ported cameras needs to be harmonized at some point.

Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 06 / February / 2016, 17:36:47
Wow - first submitted patch in almost six months.  That must be something of a record.

Patch to fix OSD keyboard for Powershot N & Powershot N Facebook when CHDK OSD is rotated 180 deg.

(per http://chdk.setepontos.com/index.php?topic=12684.msg126574#msg126574 (http://chdk.setepontos.com/index.php?topic=12684.msg126574#msg126574))

Also removed a bit of dead code just because.  As noted elsewhere,  the touchscreen code for the four or five ported cameras needs to be harmonized at some point.

Added in revision 4425.

Phil.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 20 / March / 2016, 21:31:44
Patch to enable the RAW exception for "Sports" mode on the SX50hs per Disable raw in Sports Mode on SX50? (https://chdk.setepontos.com/index.php?topic=12800)

Patch works for both 1.4 and the dev trunks.  Tested on 1.00c firmware. 
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / March / 2016, 21:51:25
Patch to enable the RAW exception for "Sports" mode on the SX50hs per Disable raw in Sports Mode on SX50? (https://chdk.setepontos.com/index.php?topic=12800)

Patch works for both 1.4 and the dev trunks.  Tested on 1.00c firmware.
Added, trunk 4562, stable 4563
Title: Patch, check for installed toolset
Post by: de-wolff on 15 / May / 2016, 08:55:12
Just starting with some development, and it is annoying for me that I need to set the OPT_USE_GCC_EABI, while it can be detected easily.
Yes, I know that it can be put in buildconf.inc, but I like to minimize the number of necessary settings.

Jaap
Title: A hint for language ids?
Post by: de-wolff on 15 / May / 2016, 09:00:55
Hello,

The default.lua script does not work correct when the user uses another display language as german or english.
While this is not a show stopper, I would like to modify this script, so all languages are supported. But can someone give me a hint where I can find the language numbers for all other languages?
Title: Re: A hint for language ids?
Post by: srsa_4c on 15 / May / 2016, 11:18:30
The default.lua script does not work correct when the user uses another display language as german or english.
While this is not a show stopper, I would like to modify this script, so all languages are supported. But can someone give me a hint where I can find the language numbers for all other languages?
The script (https://www.assembla.com/spaces/chdk/subversion/source/HEAD/trunk/CHDK/SCRIPTS/default.lua) reads (http://chdk.wikia.com/wiki/Lua/Lua_Reference#get_prop) property case (http://chdk.wikia.com/wiki/PropertyCase) 196 or 61 (depending on the cam's propset). It then tries to work out the correct offset for the recognized languages.

Problem is:
- we don't know the correct propcase number for some propsets (this propcase is not in the propcasex.h headers)
- I'm not sure we know all details about how Canon has been expanding the list of supported languages

I've been thinking about using a different method. There is a firmware function I named "get_string_by_id". For ID=0, I think it returns the name of the currently active interface language as UTF-8(?) string. Problem is,
- this function is not currently identified for early (VxWorks) cameras
- it's not exposed to scripts
- it has only been tested on a few models

Should this discussion continue, it's better in a separate thread.


About auto-recognizing the toolchain: I'm neutral on this. Let reyalp decide.
Title: Re: A hint for language ids?
Post by: reyalp on 15 / May / 2016, 14:54:16
About auto-recognizing the toolchain: I'm neutral on this. Let reyalp decide.
I don't care much one way or the other about auto-detection, but I think eabi should be the default and should be used for all normal CHDK development now. It's already the default on the autobuild and required for D6, and pre-built toolchains are available for most platforms. We could still use the auto-detect logic.

I'd be tempted to remove elf support either before the 1.5 release or for 1.6.
Title: CAM_MAX_ISO_OVERRIDE
Post by: srsa_4c on 03 / June / 2016, 20:21:40
Posting this here before commit, so there's a chance someone will notice if there's something obviously wrong with it.
CAM_MAX_ISO_OVERRIDE, introduced specifically for the sx520/530 port which has problems with high ISO values.
I simply searched for CAM_MIN_ISO_OVERRIDE and added the optional upper limit where the lower limit is enforced.

Patch (with slightly different comments) was originally posted here: https://chdk.setepontos.com/index.php?topic=12418.msg128758#msg128758
Code: [Select]
Index: core/shooting.c
===================================================================
--- core/shooting.c (revision 4635)
+++ core/shooting.c (working copy)
@@ -304,6 +304,11 @@
     // Some cameras will crash if flash used and ISO set lower than this value (most easily tested in AUTO mode)
     if ((iso > 0) && (iso < CAM_MIN_ISO_OVERRIDE)) iso = CAM_MIN_ISO_OVERRIDE;
 #endif
+#ifdef CAM_MAX_ISO_OVERRIDE
+    // Limit max ISO
+    // Some cameras will crash if ISO set higher than this value (dependence on flash is unclear)
+    if (iso > CAM_MAX_ISO_OVERRIDE) iso = CAM_MAX_ISO_OVERRIDE;
+#endif
     return shooting_iso_market_to_real(iso);    // return real value (after limits applied)
 }
 
@@ -416,6 +421,10 @@
             // Limit min (non-zero) ISO
             if ((iso > 0) && (iso < ISO_MARKET_TO_REAL(CAM_MIN_ISO_OVERRIDE))) iso = ISO_MARKET_TO_REAL(CAM_MIN_ISO_OVERRIDE);
 #endif
+#ifdef CAM_MAX_ISO_OVERRIDE
+            // Limit max ISO
+            if (iso > ISO_MARKET_TO_REAL(CAM_MAX_ISO_OVERRIDE)) iso = ISO_MARKET_TO_REAL(CAM_MAX_ISO_OVERRIDE);
+#endif
             shooting_set_sv96(shooting_get_sv96_from_iso(iso), is_now);
         }
     }
Index: include/camera.h
===================================================================
--- include/camera.h (revision 4635)
+++ include/camera.h (working copy)
@@ -207,6 +207,7 @@
     #undef  CAM_DISABLE_RAW_IN_DIGITAL_IS       // For cameras with 'Digital IS' mode that does not work with raw define this   
     #undef  CAM_DISABLE_RAW_IN_SPORTS           // For cameras that corrupt DNG/JPEG in Sports mode
     #undef  CAM_ISO_LIMIT_IN_HQ_BURST           // Defines max 'market' ISO override value for HQ Burst mode (higher values crash camera)
+    #undef  CAM_MAX_ISO_OVERRIDE                // Defines max 'market' (non-zero) ISO override value - higher value may crash
     #undef  CAM_MIN_ISO_OVERRIDE                // Defines min 'market' (non-zero) ISO override value - lower value may crash if flash used [0 = AUTO, so always allowed]
     
     #undef  CAM_HAS_GPS                         // for cameras with GPS reseiver: includes the GPS coordinates in in DNG file
Index: platform/sx520hs/platform_camera.h
===================================================================
--- platform/sx520hs/platform_camera.h (revision 4635)
+++ platform/sx520hs/platform_camera.h (working copy)
@@ -142,7 +142,10 @@
     #define CAM_SD_OVER_IN_AFL              1
     #define CAM_SD_OVER_IN_MF               1
 
+    #define CAM_MIN_ISO_OVERRIDE            100     // https://chdk.setepontos.com/index.php?topic=12314.msg128518#msg128518
+    #define CAM_MAX_ISO_OVERRIDE            3200    // https://chdk.setepontos.com/index.php?topic=12314.msg128683#msg128683
 
+
     #undef DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY  //jeronymo
     #define DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY 1
 //----------------------------------------------------------
Index: platform/sx530hs/platform_camera.h
===================================================================
--- platform/sx530hs/platform_camera.h (revision 4635)
+++ platform/sx530hs/platform_camera.h (working copy)
@@ -142,7 +142,10 @@
     #define CAM_SD_OVER_IN_AFL              1
     #define CAM_SD_OVER_IN_MF               1
 
+    #define CAM_MIN_ISO_OVERRIDE            100     // https://chdk.setepontos.com/index.php?topic=12314.msg128518#msg128518
+    #define CAM_MAX_ISO_OVERRIDE            3200    // https://chdk.setepontos.com/index.php?topic=12314.msg128683#msg128683
 
+
     #undef DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY  //jeronymo
     #define DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY 1
 //----------------------------------------------------------
Title: Re: CAM_MAX_ISO_OVERRIDE
Post by: reyalp on 04 / June / 2016, 16:37:21
Posting this here before commit, so there's a chance someone will notice if there's something obviously wrong with it.
Looks fine to me.
Title: Re: CAM_MAX_ISO_OVERRIDE
Post by: srsa_4c on 04 / June / 2016, 20:27:50
Looks fine to me.
Thanks, I checked it in (https://www.assembla.com/spaces/chdk/subversion/commits/4638).
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 24 / August / 2016, 23:28:11
Patch for Powershot N and Powershot N Facebook to add script control of the focus assist / camera flash lamp on the front of the camera via the set_led() function.

See Re: Powershot N Porting Thread (https://chdk.setepontos.com/index.php?topic=11460.msg129702#msg129702)

Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / August / 2016, 22:40:16
Patch for Powershot N and Powershot N Facebook to add script control of the focus assist / camera flash lamp on the front of the camera via the set_led() function.

See Re: Powershot N Porting Thread (https://chdk.setepontos.com/index.php?topic=11460.msg129702#msg129702)
Thanks. Added in trunk 4677, stable 4678.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 11 / September / 2016, 05:11:05
Files for sx410is, firmware version 100c.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / September / 2016, 19:03:30
Files for sx410is, firmware version 100c.
Thanks. Checked into the trunk r4686, followed by some additions to notes.txt. Comments will go in the porting thread.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: 62ndidiot on 16 / October / 2016, 15:07:39
Posting a patch for SX60HS to update 4706.  Correct stubs for live view video clips, recreviewhold.

See SX60HS porting thread:

https://chdk.setepontos.com/index.php?topic=12532.new (https://chdk.setepontos.com/index.php?topic=12532.new)

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / October / 2016, 17:00:28
Posting a patch for SX60HS to update 4706.  Correct stubs for live view video clips, recreviewhold.

See SX60HS porting thread:

https://chdk.setepontos.com/index.php?topic=12532.new (https://chdk.setepontos.com/index.php?topic=12532.new)
Thanks for that.

I haven't checked it in because I'm confused about the intent of the platform_camera.h define KBD_ZOOM_FOR_MF_USE_MF_KEY

Since this code uses #ifdef, #define 0 will be treated as ON. If the intent is to have it ON, please use 1, as CHDK code isn't very consistent with the use of #ifdef vs #if (#if with an undefined value acts the same as 0.) If the intent is to have it OFF, please leave it undefined.

Whatever the desired value, this define belongs in platform_kbb.h (as in the other ports that use it), since it's only relevant to the low level keyboard files.

I'm also a bit confused by
"Correct stubs for live view video clips"
I guess this refers to vid_get_viewport_fb_d. If so, I would refer it to "playback viewport buffer".
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: 62ndidiot on 16 / October / 2016, 19:17:46
Hopefully I've corrected things to your satisfaction:  :)
Posting a patch for SX60HS to update 4706.  Correct playback viewport buffer for vid_get_viewport_fb_d (used in  live view video clips), implement recreviewhold.

See SX60HS porting thread:

https://chdk.setepontos.com/index.php?topic=12532.new
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / October / 2016, 21:22:03
Hopefully I've corrected things to your satisfaction:  :)
Thanks. Checked in.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: 62ndidiot on 25 / October / 2016, 12:37:12
Posting a patch for SX60HS to update 4712.  Include support for firmware version 100c. Shortcut key replaces Wifi for a substitute ALT key.

See SX60HS porting thread:

https://chdk.setepontos.com/index.php?topic=12532.new
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / October / 2016, 00:09:36
Posting a patch for SX60HS to update 4712.  Include support for firmware version 100c. Shortcut key replaces Wifi for a substitute ALT key.

See SX60HS porting thread:

https://chdk.setepontos.com/index.php?topic=12532.new
Thanks. Checked in.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 04 / January / 2017, 04:06:55
SX410_100c NR_hook patch.
Related with this discussion. (https://chdk.setepontos.com/index.php?topic=12144.msg130865#msg130865)

EDIT:Patch is replaced. (https://chdk.setepontos.com/index.php?topic=12144.msg130868#msg130868)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 04 / January / 2017, 20:58:43
SX410_100c NR_hook patch.
Related with this discussion. (https://chdk.setepontos.com/index.php?topic=12144.msg130865#msg130865)

EDIT:Patch is replaced. (https://chdk.setepontos.com/index.php?topic=12144.msg130868#msg130868)
Thanks. Committed (https://app.assembla.com/spaces/chdk/subversion/commits/4749) with some modifications (moved the hooks closer to sub_FF9B4AF8 where the nr flag is evaluated).
Title: change to allow user enable/disable of RAW toggle keyboard shortcut
Post by: waterwingz on 07 / January / 2017, 16:10:22
Attached is a small patch to allow user activation/deactivation of the RAW toggle keyboard shortcut. 

This removes a major annoyance that happens when RAW is accidentally enabled by unknowingly pressing the secret RAW toggle shortcut key in shooting mode.

The patch allows three choices :

The third option is a handy way to remember that you have enabled RAW (other than finding out when your memory card fills up really quickly).

I chose option 0 (Off) to be the default.  This is a change from the  current CHDK operation but I think it's the correct option as this "feature" is better disabled unless you consciously select it.

edit :  fixed comment about default option = 1 (should have been 0).
Title: Re: change to allow user enable/disable of RAW toggle keyboard shortcut
Post by: reyalp on 07 / January / 2017, 22:53:49
Attached is a small patch to allow user activation/deactivation of the RAW toggle keyboard shortcut. 
Nice. Checked in, trunk r4751.

Quote
This is a change from the  current CHDK operation but I think it's the correct option as this "feature" is better disabled unless you consciously select it.
I agree with having it disabled by default. It's a behavior change, but far less likely to frustrate new users.

I'm not entirely fond of tying in the OSD, since the OSD only shows when raw is enabled anyway, but I do see the logic of ensuring the OSD shows when you use the shortcut, so I left it in for now.
Title: Re: change to allow user enable/disable of RAW toggle keyboard shortcut
Post by: waterwingz on 07 / January / 2017, 22:59:14
I'm not entirely fond of tying in the OSD, since the OSD only shows when raw is enabled anyway, but I do see the logic of ensuring the OSD shows when you use the shortcut, so I left it in for now.
Understood. 

Another limitation is that it does nothing if the OSD is not enabled. So you get no warning even though you might have believed you'd selected a "warning" option.

So it's not perfect but then again, a user does not have to enable it. And compared to many of he other "historical" secret shortcut keys I updated the documented for in the CHDK 1.4.0 manual today, it's pretty innocuous.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: 62ndidiot on 09 / April / 2017, 14:57:43
Here is a SX60HS patch for v4785. It standardizes the loader code,  changes the direction of the jogdial, and adds CAM_QUALITY_OVERRIDE.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / April / 2017, 19:13:45
Here is a SX60HS patch for v4785. It standardizes the loader code,  changes the direction of the jogdial, and adds CAM_QUALITY_OVERRIDE.
Thanks. Added in trunk 4786

A couple questions:
* Usually, we add CAM_QUALITY_OVERRIDE for cameras that don't expose "super fine" in the Canon UI. According the manual, the SX60 has "Fine" and "Super Fine", but not "Normal". Are the PROPACASE_QUALITY values set via the Canon menu the same as the equivalent item in the CHDK menu (so 1 = Fine, 2 = Super Fine, CHDK adds the ability to set lower quality "normal")? Or is what Canon calls "Super Fine" the same as "Normal" in the CHDK menu?

* CAM_VIDEO_QUALITY_ONLY is enabled, but CAM_CHDK_HAS_EXT_VIDEO_MENU and the actual video override code is not.  I'd suggest leaving this undefined, and removing the unused movie_rec files as in the g7x port.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Ant on 15 / April / 2017, 14:07:55
EOS M3:
SV96 fixed
focal_length functions reworked
get_zoom_x implemented
iso 100 added
black level changed to 2047
semaphore related stubs modified
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / April / 2017, 17:06:12
EOS M3:
Thanks, added in r4789

A few comments:
Quote
focal_length functions reworked
If you describe how this works, that would be useful for anyone else trying to support interchangeable lens cameras.

From stubs_entry.s it appears the mode map still needs some correction. CHDK doesn't support "C" modes, but the others should be fixed.

You can also remove any stubs from stubs_entry_2.S which are found correctly by the sig finder. These are noted with == or < veneer in stubs_entry.S

The notes still says "movie_status is wrong". I'd suggest implementing "simple_movie_status" like the other digic 6 cams if possible.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Ant on 16 / April / 2017, 02:07:00
If you describe how this works, that would be useful for anyone else trying to support interchangeable lens cameras.

Now it geting focal_length from canon's variable(like M10 port). Previously it was getting focal_length directly from lens.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: 62ndidiot on 11 / May / 2017, 20:29:01
Patch for SX60HS v4805..
implements more/correct complete raw_addr usage in capt_seq.c  (copying g7x)
implements SD card initialization ( copying g7x )

Fixes some incorrect assembly code for v 100b, 100c in filewrite.c that would/could affect the capture of images directly to a PC using CHDKPTP.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 12 / May / 2017, 01:38:46
Patch for SX60HS v4805..
Thanks. In trunk 4806.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Ant on 21 / May / 2017, 08:04:30
You can also remove any stubs from stubs_entry_2.S which are found correctly by the sig finder. These are noted with == or < veneer in stubs_entry.S
Done.
+ fw 120f.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 21 / May / 2017, 15:19:28
Done.
+ fw 120f.
Thanks. Is a 120f firmware dump posted somewhere?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Ant on 21 / May / 2017, 15:35:02
Is a 120f firmware dump posted somewhere?
AFAIK, no.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 10 / June / 2017, 18:53:32
Small patch to clean up the boot splash logo for D6 cameras.  The CHDK logo bitmap needs to be slightly higher on the splash screen to align with the text box using srsa_4c's new font scaling.

There might be a better way to do this - I just adjusted the hard coded offset in gui.c for D6 builds - i.e.:
Code: [Select]
#ifdef THUMB_FW
        int offset_y = ((camera_screen.height-LOGO_HEIGHT)>>1) - 66 ;
#else
        int offset_y = ((camera_screen.height-LOGO_HEIGHT)>>1) - 42 ;
#endif

A better way to do this could be either logo scaling code or a new D6 logo.dat file.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 10 / June / 2017, 19:20:38
There might be a better way to do this - I just adjusted the hard coded offset in gui.c for D6 builds - i.e.:
Thanks. Added in trunk 4824
Quote
A better way to do this could be either logo scaling code or a new D6 logo.dat file.
Your workaround seems fine to me, but I admit I've never cared much about the splash logo.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 11 / June / 2017, 16:33:30
Proper patch to hide Games and Tools if all relevant modules are missing.

The next step should be to move module-specific menus into their respective modules.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: 62ndidiot on 17 / June / 2017, 20:03:29
Patch for SX60HS to make Play the default ALT-KEY.  The Shortcut key is eliminated as a possible choice for ALT mode at this time.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 17 / June / 2017, 21:07:43
Patch for SX60HS to make Play the default ALT-KEY.  The Shortcut key is eliminated as a possible choice for ALT mode at this time.
Thanks, added in trunk 4831. Will appear in the autobuild shortly.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 19 / June / 2017, 18:11:35
Patch to include a separate camnotes.txt in the ZIP.

This is meant to enable CHIMP to show camera-specific notes upon completion of a CHDK install (very old screenshot (https://chdk.setepontos.com/index.php?action=dlattach;topic=13091.0;attach=13869;image)).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 20 / June / 2017, 19:04:47
Patch to localize the remaining module names (not included in the previous patch (https://chdk.setepontos.com/index.php?topic=13154.msg133096#msg133096) due to false perception of the existence of "system modules").
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / June / 2017, 23:58:16
Patch to include a separate camnotes.txt in the ZIP.
Added in trunk 4832.

I'm tempted to remove it from the autobuilt readme and just make that section say "see camnotes.txt for camera specific notes". Then we wouldn't need to build the readme any more either.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 21 / June / 2017, 09:37:25
Added in trunk 4832.

Thanks. I'll update CHIMP as soon as it's merged.

Quote
I'm tempted to remove it from the autobuilt readme and just make that section say "see camnotes.txt for camera specific notes". Then we wouldn't need to build the readme any more either.

The problem is that some cameras have quite useless notes. When those are part of the readme they don't look that bad ;)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 22 / June / 2017, 20:37:48
Patch to localize the remaining module names (not included in the previous patch (https://chdk.setepontos.com/index.php?topic=13154.msg133096#msg133096) due to false perception of the existence of "system modules").
  • Added strings:
    • "RAW Operations"
    • "Shot Histogram"
    • "Hex Number Editor"
    • "Text Box"
  • Replaced "dll" names with existing menu strings.
  • Included Russian translation.

This is meant for CHIMP to read the module names directly from the .flt files.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 23 / June / 2017, 18:50:39
Patch to localize the remaining File Browser strings.

Edit: Removed, see updated patch below.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / June / 2017, 16:56:41
Thanks. I'll update CHIMP as soon as it's merged.
Merged to 1.4

Quote
The problem is that some cameras have quite useless notes.
Yes. FWIW, this is an area where non-developers could make a significant contribution, updating each one to at least note camera specifics like the default alt button, features defined in platform_camera.h and a link to the development thread.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 25 / June / 2017, 18:10:35
Merged to 1.4

Thanks again.

Quote
Yes. FWIW, this is an area where non-developers could make a significant contribution, updating each one to at least note camera specifics like the default alt button, features defined in platform_camera.h and a link to the development thread.

Maybe add those remarks to camnotes.txt during build?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 25 / June / 2017, 18:13:21
Patch to localize the remaining File Browser strings.

This replaces the previously posted one, since the "Compute hash" submenu is no longer relevant (https://chdk.setepontos.com/index.php?topic=13178.0).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / June / 2017, 19:19:32
Done.
+ fw 120f.
Added now that 120f dump has been posted.

Note bin_comp_fix.h should not be needed any more. If you can confirm that builds without this still boot OK, let me know. The sig finder generates 0xfff20040 as the PID address while the current bin_compat_fix.h uses 0xfdf20040, but if it's like other cameras either should work.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 25 / June / 2017, 20:20:39
Patch to fix the partition type being incorrectly reported by get_partitionInfo() as discussed (https://chdk.setepontos.com/index.php?topic=13091.msg133505#msg133505).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 25 / June / 2017, 21:16:16
Patch to localize the remaining module names (not included in the previous patch (https://chdk.setepontos.com/index.php?topic=13154.msg133096#msg133096) due to false perception of the existence of "system modules").
Something is wrong with this patch file, saved in some unicode format maybe?

edit:
Quote
This replaces the previously posted one, since the "Compute hash" submenu is no longer relevant.
This one too.

As far as the partition info patch goes, I don't understand what the underlying problem was, or why the proposed patch is a valid solution.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 25 / June / 2017, 21:27:31
Something is wrong with this patch file, saved in some unicode format maybe?

Strange. I just did git diff.

I pushed both branches:

https://github.com/dmitry-shechtman/CHDK/tree/module_loc
https://github.com/dmitry-shechtman/CHDK/tree/fselect_loc

The latter derives from the former, so you may do a direct diff from master.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 25 / June / 2017, 21:31:05
As far as the partition info patch goes, I don't understand what the underlying problem was, or why the proposed patch is a valid solution.

The partition type is read directly from the MBR, where the active partition is always the first one.

The patch has been tested, see my last CHIMP post.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 26 / June / 2017, 11:34:32
Patch to fix the partition type being incorrectly reported by get_partitionInfo() as discussed (https://chdk.setepontos.com/index.php?topic=13091.msg133505#msg133505).

I fixed the partition size as well. I'll post an updated patch as soon as we settle on backwards compatibility (https://chdk.setepontos.com/index.php?topic=13179.msg133545#msg133545).

Edit: Updated link.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / June / 2017, 13:42:34
The latter derives from the former, so you may do a direct diff from master.
I'm not going to go digging around your github to try to figure out what you wanted added. If you want to submit a change, please post a patch that can be applied to the current trunk.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 26 / June / 2017, 15:04:35
Since this seems to be a recurring issue (https://chdk.setepontos.com/index.php?topic=13174.msg133464#msg133464), I shall take this opportunity and urge you to migrate CHDK to a modern VCS. If you find git too complex, go for hg, which is what both SDM and ML have been using. Both git and hg predate CHDK.

As for the patches, they are indeed Unicode, which is what Git for Windows seems to be generating. I will see if removing russian.lng helps.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / June / 2017, 16:59:33
Since this seems to be a recurring issue (https://chdk.setepontos.com/index.php?topic=13174.msg133464#msg133464), I shall take this opportunity and urge you to migrate CHDK to a modern VCS. If you find git too complex, go for hg, which is what both SDM and ML have been using.
In the abstract, a VCS like git would probably be a better fit for CHDK, but switching would involve a significant amount of time and effort.

Producing a plain vanilla patch from SVN or a regular source tree is not that hard to do. Certainly learning to do that should be a lot less effort than would be required for us to switch the whole project.
Quote
As for the patches, they are indeed Unicode, which is what Git for Windows seems to be generating. I will see if removing russian.lng helps.
This sounds like a mis-configuration or bug. CHDK not support unicode or use unicode encoded files in the source tree. The text of lang files has to be encoded for the appropriate code page. This will cause "mojibake" when viewed in other encodings, but that is not a problem. A good editor will let you select the appropriate encoding when editing those files.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / June / 2017, 17:52:06
Patch to fix the partition type being incorrectly reported by get_partitionInfo() as discussed (https://chdk.setepontos.com/index.php?topic=13091.msg133505#msg133505).


I recommend rejecting this patch, as IMHO the current code is working - although perhaps not doing what dmitrys want.
Changing behaviour that could have unexpected side effects is not a good idea, no matter how innocuous it might seem.
See - https://chdk.setepontos.com/index.php?topic=13091.msg133556#msg133556


Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 26 / June / 2017, 18:14:18
If you find git too complex, go for hg...


Please take the time to read your own posts and ask yourself, 'how would I react if this was directed at me?'.


This is a very condescending post to make to people, many of whom were coding long before you were born.


Anyone can have a simple idea - and moving away from SVN has been brought up before. Implementation is not always that easy.
It is not as simple as you might think - there is a huge history in SVN that should not be lost, as well as tools (like the autobuild system and parts of the CHDK build itself) that use SVN.


Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 26 / June / 2017, 18:44:39
I recommend rejecting this patch, as IMHO the current code is working - although perhaps not doing what dmitrys want.
Changing behaviour that could have unexpected side effects is not a good idea, no matter how innocuous it might seem.
See - https://chdk.setepontos.com/index.php?topic=13091.msg133556#msg133556

Please take the time to read other people's posts before replying.
See - https://chdk.setepontos.com/index.php?topic=13179.msg133545#msg133545 (https://chdk.setepontos.com/index.php?topic=13179.msg133545#msg133545)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 27 / June / 2017, 11:07:13
Patch to localize the remaining module names (not included in the previous patch (https://chdk.setepontos.com/index.php?topic=13154.msg133096#msg133096) due to false perception of the existence of "system modules").
  • Added strings:
    • "RAW Operations"
    • "Shot Histogram"
    • "Hex Number Editor"
    • "Text Box"
  • Replaced "dll" names with existing menu strings.
  • Included Russian translation.

Attached are two separate patches - one without the russian.lng changes and a separate one with those isolated.

As for the File Browser localization patch, I suggest that I submit it along with the revamped File Browser (https://chdk.setepontos.com/index.php?topic=13178) changes.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 27 / June / 2017, 16:09:05
Patch to fix the partition type being incorrectly reported by get_partitionInfo() as discussed (https://chdk.setepontos.com/index.php?topic=13091.msg133505#msg133505).

I fixed the partition size as well. I'll post an updated patch as soon as we settle on backwards compatibility (https://chdk.setepontos.com/index.php?topic=13179.msg133545#msg133545).

Patch with a backward-compatible implementation attached.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / June / 2017, 18:03:19
Patch with a backward-compatible implementation attached.


For a dual partition card, this appears to change the 'size' value returned by luaCB_get_partitionInfo from the size of the large partition where photos will be saved, to the size of the small (bootable) partition.


Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 27 / June / 2017, 18:22:05
For a dual partition card, this appears to change the 'size' value returned by luaCB_get_partitionInfo from the size of the large partition where photos will be saved, to the size of the small (bootable) partition.


Phil.

That's partially correct. That value has nothing to do with partition info (it doesn't even return the size of a partition). Anyway, this should "fix" that.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / June / 2017, 18:30:31
Patch to localize the remaining module names (not included in the previous patch (https://chdk.setepontos.com/index.php?topic=13154.msg133096#msg133096) due to false perception of the existence of "system modules").
  • Added strings:
    • "RAW Operations"
    • "Shot Histogram"
    • "Hex Number Editor"
    • "Text Box"
  • Replaced "dll" names with existing menu strings.
  • Included Russian translation.

Attached are two separate patches - one without the russian.lng changes and a separate one with those isolated.

As for the File Browser localization patch, I suggest that I submit it along with the revamped File Browser (https://chdk.setepontos.com/index.php?topic=13178) changes.


AFAIK, the ModuleName field, for modules with a type of 'MTYPE_EXTENSION', is not used in the core CHDK code.
In this case, moving these strings to the language file(s) serves no purpose, and just wastes memory.


Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / June / 2017, 18:35:19
For a dual partition card, this appears to change the 'size' value returned by luaCB_get_partitionInfo from the size of the large partition where photos will be saved, to the size of the small (bootable) partition.


Phil.

That's partially correct. That value has nothing to do with partition info (it doesn't even return the size of a partition). Anyway, this should "fix" that.


The return value from GetTotalCardSpaceKb is the size of the photos partition in kilobytes - how is that not the size of the partition?


Patch is in unicode (again).


Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 27 / June / 2017, 18:36:36
AFAIK, the ModuleName field, for modules with a type of 'MTYPE_EXTENSION', is not used in the core CHDK code.
In this case, moving these strings to the language file(s) serves no purpose, and just wastes memory.


Phil.

Purpose. (https://chdk.setepontos.com/index.php?topic=13154.msg133054#msg133054)

As for memory use, do these couple of dozens extra bytes really matter? If I may remind you, the entire main menu is kept in memory for reasons that are still beyond me.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 27 / June / 2017, 18:50:21
The return value from GetTotalCardSpaceKb is the size of the photos partition in kilobytes - how is that not the size of the partition?

Actually, it's the size of the file system, which is different from partition size. See screenshots attached.

Quote
Patch is in unicode (again).

Damn git diff. Reuploaded both.

P.S. Does the BOM actually prevent patch from succeeding?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 27 / June / 2017, 18:53:36
AFAIK, the ModuleName field, for modules with a type of 'MTYPE_EXTENSION', is not used in the core CHDK code.
In this case, moving these strings to the language file(s) serves no purpose, and just wastes memory.


Phil.

Purpose. (https://chdk.setepontos.com/index.php?topic=13154.msg133054#msg133054)


No purpose for CHDK.


Quote
As for memory use, do these couple of dozens extra bytes really matter?


Yes.


Quote
If I may remind you, the entire main menu is kept in memory for reasons that are still beyond me.


Simplicity, speed, ensuring the menu is always displayed (not affected by bad installation, missing files, file system corruption, ...).


If I may remind you, you are dealing with people who have thousands of hours of experience with CHDK.
Be polite or risk getting banned.


Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 27 / June / 2017, 19:02:39
No purpose for CHDK.

I believe providing a user-friendly installer for CHDK ultimately serves CHDK.

Quote
If I may remind you, you are dealing with people who have thousands of hours of experience with CHDK.
Be polite or risk getting banned.

I meant no offense or disrespect. I see nothing impolite in questioning design choices.

Nevertheless, if any of my previous remarks had hurt your feelings, I hereby offer my apology.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / June / 2017, 18:01:32
For a dual partition card, this appears to change the 'size' value returned by luaCB_get_partitionInfo from the size of the large partition where photos will be saved, to the size of the small (bootable) partition.


Phil.

That's partially correct. That value has nothing to do with partition info (it doesn't even return the size of a partition). Anyway, this should "fix" that.


I'm not comfortable with changing the behaviour of get_partitionInfo by adding a magic parameter, and further complicating the already messy partition code in wrappers.c.


I think it would be better to add a new Lua function to retrieve all of the SD card related information as a single table.
This would include all the data from get_partitionInfo, plus:
- free space on the photo storage partition
- sector size (although this is currently a constant I think it is worth including for completeness)
- an array of partition data, for each partition include a table with status, type, start LBA sector and sector count values


Corresponding functions in wrappers.c would return this information to the Lua code.


This way any existing script code is unaffected, and new scripts can access all of the SD card details more easily.
It can also be extended with additional data if needed.


Although this could be done by simply extending the table returned from get_partitionInfo, I think it is also worth renaming the fields to make it clearer what they are (doing this in get_partitionInfo makes it incompatible).
Field name changes could be (suggestions welcome):
- count --> partition_count
- active --> bootable_partition
- type --> bootable_partition_type
- size --> photo_partition_sizeMB


I have almost completed testing this, if there are no changes/objections I will commit over the weekend.


Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 29 / June / 2017, 18:26:19
Great idea overall, but may I politely offer my remarks?

Although this could be done by simply extending the table returned from get_partitionInfo, I think it is also worth renaming the fields to make it clearer what they are (doing this in get_partitionInfo makes it incompatible).

I'm not sure if field renaming alone warrants an entirely new interface, but I suppose that's a matter of personal taste.

Quote
Field name changes could be (suggestions welcome):
- count --> partition_count
- active --> bootable_partition
- type --> bootable_partition_type
- size --> photo_partition_sizeMB

I'd suggest boot_partition and boot_partition_type, since "bootable" could be interpreted as signifying the presence of the bootflag.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 29 / June / 2017, 19:22:11
Great idea overall, but may I politely offer my remarks?

Although this could be done by simply extending the table returned from get_partitionInfo, I think it is also worth renaming the fields to make it clearer what they are (doing this in get_partitionInfo makes it incompatible).

I'm not sure if field renaming alone warrants an entirely new interface, but I suppose that's a matter of personal taste.
I see three options:
- keep existing field names and extend get_partitionInfo. Main issue is that the field names are confusing.
- rename fields and extend get_partitionInfo. May break existing scripts.
- leave get_partitionInfo alone and add new function with new interface. Doesn't break anything and allows us to create a more intuitive interface.

I think the 3rd option is preferable, if we can decide on good field names.

Quote
Quote
Field name changes could be (suggestions welcome):
- count --> partition_count
- active --> bootable_partition
- type --> bootable_partition_type
- size --> photo_partition_sizeMB

I'd suggest boot_partition and boot_partition_type, since "bootable" could be interpreted as signifying the presence of the bootflag.

Either way may cause some level of confusion. If partitions have been swapped on a dual-partition card then this is no longer the 'boot' partition; but it is still potentially the auto-bootable partition (although may not be). This is why I chose 'bootable' rather than 'boot'. Perhaps something else entirely might be needed; but I can't think of an alternative.

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 29 / June / 2017, 20:22:00
Either way may cause some level of confusion. If partitions have been swapped on a dual-partition card then this is no longer the 'boot' partition; but it is still potentially the auto-bootable partition (although may not be). This is why I chose 'bootable' rather than 'boot'. Perhaps something else entirely might be needed; but I can't think of an alternative.

"service partition" maybe?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 29 / June / 2017, 23:30:50
I see three options:
- keep existing field names and extend get_partitionInfo. Main issue is that the field names are confusing.
- rename fields and extend get_partitionInfo. May break existing scripts.
- leave get_partitionInfo alone and add new function with new interface. Doesn't break anything and allows us to create a more intuitive interface.
FWIW, we do have @chdk_version to handle #2. If it's only a matter of more/renamed fields, a <=1.4 compatibility wrapper would be trivial. I'm pretty agnostic whether this is better, though all else being equal I'd rather not proliferate functions that return similar info.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / June / 2017, 01:54:18
I see three options:
- keep existing field names and extend get_partitionInfo. Main issue is that the field names are confusing.
- rename fields and extend get_partitionInfo. May break existing scripts.
- leave get_partitionInfo alone and add new function with new interface. Doesn't break anything and allows us to create a more intuitive interface.
FWIW, we do have @chdk_version to handle #2. If it's only a matter of more/renamed fields, a <=1.4 compatibility wrapper would be trivial. I'm pretty agnostic whether this is better, though all else being equal I'd rather not proliferate functions that return similar info.


That's another option, I forgot about the version wrappers. If the changes are applied to both 1.4 & 1.5, then it probably only needs a wrapper in wrap13.lua.


Phil

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 30 / June / 2017, 02:55:55
That's another option, I forgot about the version wrappers. If the changes are applied to both 1.4 & 1.5, then it probably only needs a wrapper in wrap13.lua.
I was thinking wrapper for <= 1.4, with the new function only existing in 1.5. Changing the interface for scripts using @chdk_version 1.4 would not be good, since the "stable" in stable release is mostly the interfaces.

Making this change only for 1.5 doesn't help dmitrys problem though, which would argue for a separate function. Even that's pushing the definition of bug fixes only. We could still replace the old interface with a compatibility wrapper in 1.5
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / June / 2017, 04:36:35
That's another option, I forgot about the version wrappers. If the changes are applied to both 1.4 & 1.5, then it probably only needs a wrapper in wrap13.lua.
I was thinking wrapper for <= 1.4, with the new function only existing in 1.5. Changing the interface for scripts using @chdk_version 1.4 would not be good, since the "stable" in stable release is mostly the interfaces.

Making this change only for 1.5 doesn't help dmitrys problem though, which would argue for a separate function. Even that's pushing the definition of bug fixes only. We could still replace the old interface with a compatibility wrapper in 1.5

Damn compatibility!

Agree, technically not a bug fix; but not a huge change either.

I'm thinking:
- for 1.4 (release) - add new function with new interface for CHIMP to use, keep existing get_partitionInfo as is.
- for 1.5 - add new function with new interface, remove existing get_partitionInfo from luascript.c and add to wrap14.lua.

Will this work or am I still missing something?

Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 30 / June / 2017, 05:45:35
Will this work or am I still missing something?

This will probably work, but will be of little to no use as far as CHIMP is concerned, due to the fact that the latter still has to support existing versions. This also applies to my patch, albeit with one distinction: mine was a relatively small and isolated change.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / June / 2017, 05:48:40
Will this work or am I still missing something?

This will probably work, but will be of little to no use as far as CHIMP is concerned, due to the fact that the latter still has to support existing versions. This also applies to my patch, albeit with one distinction: mine was a relatively small and isolated change.


Can you not check the build number?
If it is greater than when the change is made call the new function - if earlier then you can still call the old function; but will get incorrect values, which is the case regardless.


Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 30 / June / 2017, 06:10:48
Can you not check the build number?

If get_partitionInfo() returns nil, the card isn't partitioned.
Otherwise, if count == 1, the card isn't partitioned.
Otherwise, if active == 1, the card is partitioned, and the service partition is active.
Otherwise, the card is partitioned, and the photos partition is active.

Aren't these correct regardless of the build number?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / June / 2017, 06:28:31
Can you not check the build number?

If get_partitionInfo() returns nil, the card isn't partitioned.
Otherwise, if count == 1, the card isn't partitioned.
Otherwise, if active == 1, the card is partitioned, and the service partition is active.
Otherwise, the card is partitioned, and the photos partition is active.

Aren't these correct regardless of the build number?


Yes, but prior to the build with any changes (either yours or mine), the type and size values may be wrong - I thought you needed these values?


Technically, if get_partitionInfo returns nil, then the port does not support partitioned cards in CHDK. The card could still be partitioned outside CHDK; but there is no way to tell in the CHDK code. This applies to post 2011 cameras that can boot from FAT32 partitions - these don't need to implement partitioning support.


It is also possible to have up to four partitions on the card - the swap_partitions function allows the user to rotate though them.


Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 30 / June / 2017, 07:00:55
Yes, but prior to the build with any changes (either yours or mine), the type and size values may be wrong - I thought you needed these values?

They could be handy, but since they are unreliable, I can do just fine without them. Better yet, if type != 1, I may safely assume that there is no service partition.

Quote
Technically, if get_partitionInfo returns nil, then the port does not support partitioned cards in CHDK. The card could still be partitioned outside CHDK; but there is no way to tell in the CHDK code. This applies to post 2011 cameras that can boot from FAT32 partitions - these don't need to implement partitioning support.

I thought they did regardless. I'll have to add a check to the install logic.

Quote
It is also possible to have up to four partitions on the card - the swap_partitions function allows the user to rotate though them.

Presumably the CHDK directory is either on the first or on the second one, depending on the "active" value?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / June / 2017, 07:48:33
Yes, but prior to the build with any changes (either yours or mine), the type and size values may be wrong - I thought you needed these values?

They could be handy, but since they are unreliable, I can do just fine without them.
So none of these changes are really needed then?
Quote
Better yet, if type != 1, I may safely assume that there is no service partition.
Umm no - most cameras can autoboot from FAT12 and FAT16 partitions. So at least types 1 and 6 and probably 4, possibly others.
Quote
Quote
Technically, if get_partitionInfo returns nil, then the port does not support partitioned cards in CHDK. The card could still be partitioned outside CHDK; but there is no way to tell in the CHDK code. This applies to post 2011 cameras that can boot from FAT32 partitions - these don't need to implement partitioning support.

I thought they did regardless. I'll have to add a check to the install logic.

Quote
It is also possible to have up to four partitions on the card - the swap_partitions function allows the user to rotate though them.

Presumably the CHDK directory is either on the first or on the second one, depending on the "active" value?
Or could be all partitions - to use partition swapping on a dual partition card you need to copy at least the firmware update file to all partitions that you want to swap to. That way when the camera is restarted you can use the firmware update boot method to get back into CHDK.

The 'active' value could be anything from 1 - 4 depending on how many partitions and how may swaps have been done.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 30 / June / 2017, 18:50:55
So none of these changes are really needed then?

Strictly speaking, no, but I still believe there's a bug that should be fixed.

Quote
Quote
Better yet, if type != 1, I may safely assume that there is no service partition.
Umm no - most cameras can autoboot from FAT12 and FAT16 partitions. So at least types 1 and 6 and probably 4, possibly others.

By "service partition" I was referring to a partition that should get the files from / and _HDKMETA/PS/, but not from CHDK/.

Quote
Quote
Presumably the CHDK directory is either on the first or on the second one, depending on the "active" value?
Or could be all partitions - to use partition swapping on a dual partition card you need to copy at least the firmware update file to all partitions that you want to swap to. That way when the camera is restarted you can use the firmware update boot method to get back into CHDK.

The 'active' value could be anything from 1 - 4 depending on how many partitions and how may swaps have been done.

I think it's safe to assume that if there are more than two, the user should be able to update those manually.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 30 / June / 2017, 19:26:28
By "service partition" I was referring to a partition that should get the files from / and _HDKMETA/PS/, but not from CHDK/.


Sorry, you've lost me there.


There is only ever one partition visible to the firmware/CHDK at any given time - all the files are loaded from this partition after the camera has finished booting.


The purpose of the small 'autoboot' partition is just that - a way to autoboot a card >4GB on cameras that can't boot off FAT32. CHDK is loaded from this partition by the firmware; but the CHDK boot code then swaps to the other partition - this happens before the file system is re-initialised. After this is done every file is then loaded from the larger partition.

Once CHDK is started, the small 'autoboot' partition is no longer accessible in any way.

Phil.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: dmitrys on 06 / July / 2017, 19:44:59
Patch to add m3_120f to camera_list.csv.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 06 / July / 2017, 23:01:55
Patch to add m3_120f to camera_list.csv.
Thanks for catching that. Added.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 08 / July / 2017, 23:25:02
Updates for ixus300_sd4000 based on recent issues identified by Robert1975.

link > Start in recording mode - SD4000/IXUS 300 HS (https://chdk.setepontos.com/index.php?topic=13159)
link > CHDK on SD4000/IXUS 300 HS (https://chdk.setepontos.com/index.php?topic=13160)
link > Automatic Playback button press - SD4000 (https://chdk.setepontos.com/index.php?topic=13168)

Changes:

Note that most chdkptp functionality seems to work with the exception of LiveView.  Attempting to use LiveView does not crash but the image is unusable.  Fixing this looks like much more work than I have time for right now - the ixus300_sd400 has what appears to be a somewhat unique extra wide LCD.  Might be an issue - might not.

The following newer entries from stubs_entry.S were accepted over the original port's stubs_entry_2.S values. In testing, the AFL calls seem to work the same but the ND filter calls were an improvement (no Canon exposure changes from the ND filter being inserted) The MoveFocusLensToDistance corrected SD override crashes. I went on faith for the other ones lacking any specific tests or time to research frankly.

stubs_entry.S same as stubs_entry_2.S
Code: [Select]
NHSTUB(GetDrive_FreeClusters,       0xFF871E90 -> 0xff871e90
Accept new stub_entry.S values

Code: [Select]
NHSTUB(DoAFLock,                    0xFF87A910 -> 0xff8382e4
NHSTUB(UnlockAF,                    0xFF87A920 -> 0xff83831c
NHSTUB(PutInNdFilter,               0xFFB2056C -> 0xffab69c8
NHSTUB(PutOutNdFilter,              0xFFB205A4 -> 0xffab69ec
NHSTUB(ScreenLock,                  0xFFA1356C -> 0xffa13354
NHSTUB(GetImageFolder,              0xFF94337C -> 0xff94345c
NHSTUB(MoveFocusLensToDistance,     0xFFB2289C -> 0xffb228b0
NHSTUB(SetScriptMode,               0xFF810F6C -> 0xff895904
DEF(zoom_status,                    0x0000315B -> 0x0000cea4
DEF(recreview_hold,                 0x0000780E -> 0x00003a20
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 08 / July / 2017, 23:36:26
Attempting to use LiveView does not crash but the image is unusable.  Fixing this looks like much more work than I have time for right now - the ixus300_sd400 has what appears to be a somewhat unique extra wide LCD.


From photos on the web, the LCD looks similar to the IXUS 310.
There's less than 12 months between their release dates, so the viewport values I used for that might help.


Phil.

Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 09 / July / 2017, 09:24:03
Attempting to use LiveView does not crash but the image is unusable.  Fixing this looks like much more work than I have time for right now - the ixus300_sd400 has what appears to be a somewhat unique extra wide LCD.
From photos on the web, the LCD looks similar to the IXUS 310.
There's less than 12 months between their release dates, so the viewport values I used for that might help.
Thanks for that!

I checked the dpreview stats for LCD info - the ixus310 has 2x the number of pixels.  But the code for the 310 is easy to follow once I cleaned up the 300's messy lib.c and sub/lib.c files.  After a little disassembly work for things the sigfinder doesn't recognize and some trial&error with the height and width constants, I now have something that seems to do LiveView pretty well.  There is sometimes a short "initialization" delay with a snowy live screen but that clears up in a few seconds.

Now I'm looking for other side effects from the changes.  Reading this recent posts about the ixus300 (https://www.dpreview.com/forums/thread/4166466#forum-post-59721731) on dpreview points out some other historical issues I was not aware of with edge overlay, histogram, and zebra. Sigh.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / July / 2017, 15:28:58
Updates for ixus300_sd4000 based on recent issues identified by Robert1975.
Thanks, added in trunk 4863 and release-1_4 4864

Note as usual, I used the 1.5 patch and merged it to 1.4.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Ant on 11 / July / 2017, 15:52:25
Here is current_fb_d patch for EOS M3. Not tested on fw 120f but should work.

P.S.
Does setting of address 0x1011C to 0x00000001 enable focus peaking on G7X?
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / July / 2017, 20:35:16
Second patch for the ixus300_sd4000.

Changes :

When I get a few moments,  I'll go through and cleanup any of the ToDo items flagged by pixeldoc2000 in the code.  But for now, the big bugs are hopefully now all very much dead  :haha

Edit :  and or course thanks to reyalp & philmoz for their help in making this happen
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / July / 2017, 23:35:41
Second patch for the ixus300_sd4000.

Thanks. Added in trunk 4867, release-1_4 4869

Quote
Move all code from platform/ixus300_sd4000/sub/100d/lib.c to platform/ixus300_sd4000/lib.c as it's not firmware version specific (the sub/100d/lib.c file can be deleted - didn't do that as I was not sure it that would affect the autobuild)
In general, can be removed as long as you remove it from Makefile too.  However, I moved a couple functions back to the sub lib.c because they directly access firmware variables. Purely cosmetic in this case since there's only one sub, but maybe less chance of someone using it as an inappropriate example.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / July / 2017, 23:58:20
Here is current_fb_d patch for EOS M3. Not tested on fw 120f but should work.
Thanks. Added in trunk 4870.

Quote
P.S.
Does setting of address 0x1011C to 0x00000001 enable focus peaking on G7X?
Yes.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 12 / July / 2017, 10:07:22
However, I moved a couple functions back to the sub lib.c because they directly access firmware variables.
Thanks for that - makes sense.

My real goal was to combine all the image buffer stuff in one place and in some kind of order that makes sense.  philmoz's  ixus310 lib.c is quite well done - I wanted the ixus300 to be sorted and clear as well (and not divided across multiple files if possible).

This is the fifth palette color & live view buffer port update I've done.  It's hard to keep track of what is needed and what constants (240, 280, 480, 960 etc) affect what.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 14 / July / 2017, 19:34:11
Final clean-up and testing of "ToDo" items from ixus300_sd4000 port.   

I hereby suggest removing the BETA status from this port.  It's never going to be perfect but I'm done and I think it's pretty darn good.  Props to pixeldoc2000 (https://chdk.setepontos.com/index.php?action=profile;u=3152)  for creating the port.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / July / 2017, 22:58:58
Final clean-up and testing of "ToDo" items from ixus300_sd4000 port.   

I hereby suggest removing the BETA status from this port.  It's never going to be perfect but I'm done and I think it's pretty darn good.  Props to pixeldoc2000 (https://chdk.setepontos.com/index.php?action=profile;u=3152)  for creating the port.
Thanks. Added in trunk 4874, release-1_4 4875 and beta status removed.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 15 / July / 2017, 17:18:05
New platform_camera.h files updated for better DNG exif data for SX50hs, S100, G10.   Created using images created with each camera's native RAW capability and then converting to DNG using Adobe's tool.

Tested to ensure the resulting images (of a color target) looked reasonable.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / July / 2017, 19:01:14
New platform_camera.h files updated for better DNG exif data for SX50hs, S100, G10. 
Added, trunk 4876, release-1_4 4877
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / July / 2017, 23:48:32
Patch to add the following to capt_seq.c for the ixus300_sd4000 :
Code: [Select]
#define PAUSE_FOR_FILE_COUNTER 250 to correct issues with saving DNG identified by  Robert1975 (https://chdk.setepontos.com/index.php?action=profile;u=29494) here Re: CHDK on SD4000/IXUS 300 HS (https://chdk.setepontos.com/index.php?topic=13160.msg133997#msg133997)

Props to reyalp for suggesting the hooktest.lua script.  Delay value based in just slighly longer than the results posted there.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 18 / July / 2017, 00:35:22
Patch to add the following to capt_seq.c for the ixus300_sd4000 :
Added. Trunk 4882, release-1_4 4883
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: 62ndidiot on 05 / August / 2017, 22:15:06
Patch for SX60HS to use transfer_src_overlay instead of display_busy logic in lib.c as discussed in
https://chdk.setepontos.com/index.php?topic=12788.msg134040#msg134040 (https://chdk.setepontos.com/index.php?topic=12788.msg134040#msg134040)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 06 / August / 2017, 00:29:59
Patch for SX60HS to use transfer_src_overlay instead of display_busy logic in lib.c as discussed in
Thanks, added in trunk 4893. Hotshoe override is also enabled (discussed in the porting thread https://chdk.setepontos.com/index.php?topic=12532.msg133613#msg133613)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Ant on 06 / August / 2017, 06:16:57
Patch for EOS M3 to use new screen refresh method and dark frame control.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 06 / August / 2017, 16:03:50
Patch for EOS M3 to use new screen refresh method and dark frame control.
Thanks. Added in trunk 4894
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 01 / September / 2017, 12:02:06
Fix for zoom issue found in ixus300_sd4000.   The use of set_zoom( ) in any script will move the zoom correctly but leave the camera's zoom lever disabled afterwards.

First mentioned here :  Re: CHDK on SD4000/IXUS 300 HS (https://chdk.setepontos.com/index.php?topic=13160.msg134430#msg134430)

Torture tested with a souped up version of this script : Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing (https://chdk.setepontos.com/index.php?topic=7071.msg76172#msg76172)

edit :  also added CAM_MIN_ISO_OVERRIDE 126 after experimentally determining this is the low limit (per this discussion (http://ttps://chdk.setepontos.com/index.php?topic=13160.msg134468#msg134468))
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / September / 2017, 23:43:30
Fix for zoom issue found in ixus300_sd4000.
Added in trunk 4904, release 4905
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 02 / September / 2017, 16:59:45
Another zoom related patch for the ixus300 

(ref https://chdk.setepontos.com/index.php?topic=13160.msg134493#msg134493)
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 02 / September / 2017, 17:36:27
Another zoom related patch for the ixus300 

(ref https://chdk.setepontos.com/index.php?topic=13160.msg134493#msg134493)
Added in trunk 4906, release 4907
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: bovirus on 04 / September / 2017, 06:35:07
New Italian language update.

https://chdk.setepontos.com/index.php?topic=13240.new#new

Please include it in next release.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / September / 2017, 11:33:43
Fix for two grid issues reported here :  Re: Grids : issues and challenges (https://chdk.setepontos.com/index.php?topic=13239)

Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / September / 2017, 18:20:58
Fix for two grid issues reported here :  Re: Grids : issues and challenges (https://chdk.setepontos.com/index.php?topic=13239)
Thanks. Added in trunk 4911-4912, release 4913.

I changed the fix for the crash make it self contained in the module.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / September / 2017, 18:34:25
I changed the fix for the crash make it self contained in the module.
That was my original fix too. But then I wondered about a race condition where the module gets unloaded before grid_loading = 1 is executed?

Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 04 / September / 2017, 18:51:05
That was my original fix too. But then I wondered about a race condition where the module gets unloaded before grid_loading = 1 is executed?
In theory maybe, but that's how most of the other modules with a "running" state work. If we need to resolve that, we should add some kind of delay or to the module_tick_unloader process.

I think in practice the window for problems there is nanoseconds, where the original grid loading could take tens of milliseconds and involved blocking IO calls that would yield to other tasks.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 04 / September / 2017, 18:53:06
I think in practice the window for problems there is nanoseconds, where the original grid loading could take tens of milliseconds and involved blocking IO calls that would yield to other tasks.
Good enough.  I noticed that the bug occurred much more frequently on my older cameras and also with larger files.  All leading me to the race condition conclusion.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 05 / September / 2017, 17:22:24
Hello!
Attached is an updated lang file for Polish language.
Thanks!
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 05 / September / 2017, 23:04:12
Hello!
Attached is an updated lang file for Polish language.
Thanks!
Thanks. Is the ?? intended in #258?
Code: [Select]
258 "W??czenie Lua Native Calls pozwala\numozliwia uszkodzenie aparatu.\nJesli nie jestes pewien\nNIE WLACZAJ TEJ OPCJI.\nJestes pewien wlaczyc Native Calls?"
I thought it might be an encoding issue, but it looks like it's really ASCII '?' in the file. (The file should be in windows 1250 encoding)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: outslider on 06 / September / 2017, 13:50:11
Thanks. Is the ?? intended in #258?


Indeed, this was a mistake, thanks. Here is the corrected file.





Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 06 / September / 2017, 23:40:07
Indeed, this was a mistake, thanks. Here is the corrected file.
Thanks, added in trunk 4916
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 11 / December / 2017, 18:09:25
Port for the G16 attached.  :xmas I've probably procrastinated long enough about releasing this.

Firmware versions 1.00h  & 1.01a are marked ALPHA - SKIP_AUTOBUILD.  Test builds have been downloaded more than 20x each but limited feedback received.

Firmware version 1.01b is marked PREALPHA - SKIP_AUTOBUILD.  Test build recently made available but no feedback so far.

Firmware version 1.01c is marked BETA and it's ready for the autobuild as I've been using it sometime now with no issues.


Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / December / 2017, 23:51:51
Port for the G16 attached.  :xmas I've probably procrastinated long enough about releasing this.
Added in trunk r4958, with some cosmetic cleanup in r4959
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 17 / December / 2017, 14:54:21
Patch file to update G16 port per G16 Porting Thread (https://chdk.setepontos.com/index.php?topic=13054.msg135619#msg135619)
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 17 / December / 2017, 17:28:02
Patch file to update G16 port per G16 Porting Thread (https://chdk.setepontos.com/index.php?topic=13054.msg135619#msg135619)
Thanks. Added in trunk 4961.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 31 / January / 2018, 09:40:05
Patch for JPEG setting not available in menu, build 1.4.1-4976 on A480/A490 (https://chdk.setepontos.com/index.php?topic=13342.0)
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 01 / February / 2018, 16:52:12
Patch for JPEG setting not available in menu, build 1.4.1-4976 on A480/A490 (https://chdk.setepontos.com/index.php?topic=13342.0)
Added, trunk 4987, release 4988
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 15 / March / 2018, 21:07:14
Patch for possible UHS SD Card issues per this post :  https://chdk.setepontos.com/index.php?topic=13054.msg136417#msg136417

Tested on the 1.01c - does not cause anything bad to happen but I can't confirm that it fixes anything.

I checked the disassemblies of all four G16 versions and the added address is the same for each.
Title: Re: Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 16 / March / 2018, 00:53:32
Patch for possible UHS SD Card issues per this post :  https://chdk.setepontos.com/index.php?topic=13054.msg136417#msg136417
Added in trunk 5002
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 21 / April / 2018, 15:35:48
Movie mode support for DIGIC 6 ports. Previous patches and notes were posted here (https://chdk.setepontos.com/index.php?topic=11316.msg136612#msg136612) and in the preceding posts.

I would like to commit this in, say, 1-2 weeks. In case anyone has reservations, objections or suggestions, do not hesitate to post (here or in the D6 thread linked above).

A partial explanation about changes contained in the patch is below. Platform code related (porting) notes are missing at the moment.

Global changes:
- [camera.h] a define (CAM_MOVIEREC_NEWSTYLE) was added to separate D6 related movie support code
- [camera.h] video quality defaults (defines) moved from include/conf.h to include/camera.h due to their dependency on the newly introduced CAM_MOVIEREC_NEWSTYLE define
- [conf.c] video mode/bitrate/quality conf entries are now reset when a different camera's configuration is loaded. This was done mainly because the CAM_MOVIEREC_NEWSTYLE interpretation of those entries was made different. Worth to note that quality settings have not been uniform among existing ports anyway.
- conf.video_quality is no longer used directly in CAM_MOVIEREC_NEWSTYLE platform code. New functions are introduced, similar to the existing shooting_video_bitrate_change() + change_video_tables().
- CAM_MOVIEREC_NEWSTYLE: "Video mode" (conf.video_mode) is interpreted differently. When not "Default", it can be: "CBR", "VBR HI", "VBR MID", "VBR LOW". The VBR variants differ in their middle bitrate. When recording a scene that is lacking details and movement, the middle bitrate does have some influence over the resulting bitrate. The encoder's quality factor can't be influenced currently (so the decision over raising the bitrate is in the encoder's hands).
- CAM_MOVIEREC_NEWSTYLE: The bitrate selector menu entry is always effective when "video mode" is not set to "default". In VBR modes, the bitrate selected here will be the maximum bitrate.
- CAM_MOVIEREC_NEWSTYLE: A new (localized) menu entry was added to let the user specify relative minimum bitrate (10% ... 100%, in 10% increments).
- CAM_MOVIEREC_NEWSTYLE: Bitrate adjustment during recording ("video quality control" in menu) is not possible, the UI was therefore removed.
- CAM_MOVIEREC_NEWSTYLE: Recording bitrate information comes directly from a platform callback. Reason for doing this is that D6 cameras do not update filesystem statistics during recording. The callback provides both recorded size and momentary bitrate. Unfortunately, the current firmware hook only provides fresh information once a chunk of movie data is passed to the card writer routines (that's 3 MB granularity on the sx280, painful on lower bitrates).


edit:
patch updated to v5, changes:
- Momentary bitrate calculation removed due to irregularly arriving movie chunks. Bitrate calculation will now match the pre-D6 code.
- Example (untested) sx60 changes removed.
- Ant's M3 patches integrated.

edit2:
Patch committed (https://app.assembla.com/spaces/chdk/subversion/commits/5013) with some minor changes.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: 62ndidiot on 03 / June / 2018, 14:50:02
attached is a patch to include sx60hs/sub/100h.  I have had no further feedback re any problems. Thread is here:
https://chdk.setepontos.com/index.php?topic=12532.new#new (https://chdk.setepontos.com/index.php?topic=12532.new#new)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / June / 2018, 22:18:41
attached is a patch to include sx60hs/sub/100h.  I have had no further feedback re any problems. Thread is here:
https://chdk.setepontos.com/index.php?topic=12532.new#new (https://chdk.setepontos.com/index.php?topic=12532.new#new)
Thanks, added in trunk 5027, enabled in autobuild labeled alpha.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 04 / June / 2018, 14:02:42
Source code for sx610hs, firmware version 100a.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 06 / June / 2018, 02:00:23
Source code for sx610hs, firmware version 100a.
Added, trunk 5034.

Also added to http://chdk.wikia.com/wiki/Test_releases_not_available_in_autobuilds
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 17 / June / 2018, 14:43:27
Source code for ixus170/elph170, firmware version 100a.

Original code from @srsa_4c : https://chdk.setepontos.com/index.php?topic=12471.msg123718#msg123718
Some changes in boot.c : https://chdk.setepontos.com/index.php?topic=12471.msg132041#msg132041
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 23 / June / 2018, 15:43:22
Source code for ixus170/elph170, firmware version 100a.
Thanks, I checked it in (https://app.assembla.com/spaces/chdk/subversion/commits/5056), with autobuild disabled.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: ryan85 on 21 / August / 2018, 14:59:48
The JPEG dimensions for sx710hs is wrong. The attached patch fixes it.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 21 / August / 2018, 16:14:21
The JPEG dimensions for sx710hs is wrong. The attached patch fixes it.
Oops :-[ thanks for catching that.

Added in trunk r5095.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 21 / November / 2018, 12:04:43
Propset11 from this post:
https://chdk.setepontos.com/index.php?topic=13569.msg138526#msg138526
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 21 / November / 2018, 12:06:21
Source code for sx420is, firmware version 100a.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 21 / November / 2018, 21:28:18
Propset11 from this post:
https://chdk.setepontos.com/index.php?topic=13569.msg138526#msg138526
Added in trunk 5123
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 21 / November / 2018, 23:55:48
Source code for sx420is, firmware version 100a.
Checked in, trunk 5124. I left it disabled in the autobuild, let me know if you think it should be enabled.

Thanks for all the contributions :)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 24 / November / 2018, 18:01:25
SX420is_100a:
changed status from PREALPHA to ALPHA
CAM_ACTIVE_AREA customized to the right dimensions
CAM_AV_OVERRIDE_IRIS_FIX and the associated changes
WIFI button as an option for ALT
removed CAM_SD_OVER_IN_AF, the camera allows SD override only when AFL or MF is set

I think we can add this camera to autobuild.
The CHDK for this camera has been used for several months, and we have no problems with it.

The same goes for sx610hs, test build is dawnloaded 89 times without reporting problems so we can assume that everything works well.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 24 / November / 2018, 18:02:27
Source code for sx430is, firmware version 100b.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 24 / November / 2018, 20:54:55
Source code for sx430is, firmware version 100b.
Checked in, trunk 5127. Note I disabled FI2 building in makefile.inc until I can verify the autobuild has the right key. You'll need to comment out the override OPT_FI2= line if you want to build an FI2 locally.

edit:
Autobuild is not enabled for this port at the moment anyway, but I don't want to forget and have it break the build.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 25 / April / 2019, 01:20:14
Patch for finsig_thumb2 & capdis to work with capstone version 4.


Tested with unpatched version of capstone 4.0.1 library on MacOS and Mint LMDE3 - all stubs rebuild ok (although I can't test SX60HS 1.00h since I don't have the FW dump).
Also tested capdis with extracting G5X code from the FW dump - seems to work ok.



Should still build and work for capstone 3 as well.


Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 26 / April / 2019, 01:12:42
Patch for finsig_thumb2 & capdis to work with capstone version 4.

Tested with unpatched version of capstone 4.0.1 library on MacOS and Mint LMDE3 - all stubs rebuild ok (although I can't test SX60HS 1.00h since I don't have the FW dump).
Also tested capdis with extracting G5X code from the FW dump - seems to work ok.
Thanks for doing this. Checked in, trunk 5169

On windows, I was able to use the pre-built 32 bit libraries from http://www.capstone-engine.org/download.html but only linking to the import library, like
Code: [Select]
CAPSTONE_TOOLS_LINK=-Ld:/devel/capstone-4.0.1-win32 -lcapstone_dll
CAPSTONE_TOOLS_INC=-Id:/devel/capstone-4.0.1-win32/include/capstone
msys and msys2 compilers didn't like the supplied static library. This means the DLL has to be on the path.

I compared output of the unpatched version with the patched version, with both capstone 3 and 4. No difference for any model I have dumps for. I also did full disassembly of g7x and sx710, and got effectively identical output. On sx710, a few literal pools where garbage previously  disassembled as ssat/usat failed to disassemble instead. All other differences were due CHDK code/stubs changes since the last time I did a full disassembly.

IMO, we should drop capstone 3 support fairly quickly, since it requires a source patch and there's a risk of getting different output from things like the differences in handling invalid code.

I'll post an SX60HS 1.00h dump in the dumps thread if I can't find an existing link.
Edit: one here https://chdk.setepontos.com/index.php?topic=12532.msg136787#msg136787

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / May / 2019, 20:45:04
Patch for live view for review.
This removes the calls to malloc & free for the header/desc buffers and the memcpy for the palette data. The palette data is sent with a seperate data_send call from the original palette memory buffer.
This reduces the risk of heap fragmentation when using LV in chdkptp (it gets called a lot).
There does not seem to be any negative impact from adding another send_data call on cameras with 256 palette entries; but I'm not sure of the impact on cameras with only 16 palette entries (64 bytes).

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / May / 2019, 22:11:34
This removes the calls to malloc & free for the header/desc buffers and the memcpy for the palette data.
That's a good idea.
Quote
There does not seem to be any negative impact from adding another send_data call on cameras with 256 palette entries; but I'm not sure of the impact on cameras with only 16 palette entries (64 bytes).
I'd expect it's negligible compared to the time required to send the actual framebuffer.

I wondered if stack size might be a concern, since the header is moderately large (36 bytes per buffer desc, plus 32 for header), but PTPSession seems to get a pretty generous size: 0x1000 on a540, 0x1800 on g7x and the stock PTP handlers are pretty complicated.

edit:
I tried it on a540 (16 entry palette) and it seems to be fine.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 12 / May / 2019, 02:52:30
I wondered if stack size might be a concern, since the header is moderately large (36 bytes per buffer desc, plus 32 for header), but PTPSession seems to get a pretty generous size: 0x1000 on a540, 0x1800 on g7x and the stock PTP handlers are pretty complicated.


I considered that; but after testing it did not seem to be an issue.
It could be a static buffer; but I thought that was just wasting memory needlessly. Another option would be to malloc the buffer only once and not free it (or free it in the ptp code when the session is closed); but that was more complex. If it works on the A540 then it's probably safe to use the stack.


I missed a couple of initialisations when sections are not being sent - updated patch attached.
If you're happy with this I'll check it in.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 12 / May / 2019, 19:56:51
I missed a couple of initialisations when sections are not being sent - updated patch attached.
If you're happy with this I'll check it in.
Seems fine to me.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 15 / November / 2019, 18:42:55
Spytask dereferences a NULL pointer during its startup.
gui_init() -> gui_set_mode() -> the gui_mode pointer is NULL initially

Does the following patch look good enough to fix this?
Code: [Select]
Index: core/gui.c
===================================================================
--- core/gui.c (revision 5293)
+++ core/gui.c (working copy)
@@ -2401,7 +2401,7 @@
 }
 
 //-------------------------------------------------------------------
-static gui_handler *gui_mode=0; // current gui mode. pointer to gui_handler structure
+static gui_handler *gui_mode = &altGuiHandler; // current gui mode. pointer to gui_handler structure
 
 static int gui_osd_need_restore = 0;    // Set when screen needs to be erase and redrawn
 static int gui_mode_need_redraw = 0;    // Set if current mode needs to redraw itself
I just pointed to one of the existing gui_handler instances, thought the pointer gets updated immediately anyway.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / November / 2019, 21:45:36
Spytask dereferences a NULL pointer during its startup.
gui_init() -> gui_set_mode() -> the gui_mode pointer is NULL initially

Does the following patch look good enough to fix this?
Code: [Select]
Index: core/gui.c
===================================================================
--- core/gui.c (revision 5293)
+++ core/gui.c (working copy)
@@ -2401,7 +2401,7 @@
 }
 
 //-------------------------------------------------------------------
-static gui_handler *gui_mode=0; // current gui mode. pointer to gui_handler structure
+static gui_handler *gui_mode = &altGuiHandler; // current gui mode. pointer to gui_handler structure
Without testing/digging too much, I think I'd use defaultGuiHandler, since the camera normally starts in non-alt mode. Or figure out where the initialized value is used.  Or adjust gui_set_mode to deal with null old_mode.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 20 / November / 2019, 12:16:57
I think I'd use defaultGuiHandler
That would not work very well because gui_init() would fail to initialize the gui mode.
Quote
Or adjust gui_set_mode to deal with null old_mode.
I tried that first and failed due to my insufficient knowledge about the inner workings of the CHDK GUI. Also, any change there would lead to an increase in core size.

Using &altGuiHandler as initial value of that pointer would mean no increase in core size. This does not mean CHDK would start in ALT mode, that struct would only provide values that (IMO) allow a successful transition to default GUI mode.
I don't think I see any related glitches on the M100.
Currently, the first few words at address zero are used as initial value when members of that struct are accessed.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / November / 2019, 13:27:27
I think I'd use defaultGuiHandler
That would not work very well because gui_init() would fail to initialize the gui mode.
Yeah, that makes sense, I didn't think through the if mode == current mode logic.

Quote
Quote
Or adjust gui_set_mode to deal with null old_mode.
I tried that first and failed due to my insufficient knowledge about the inner workings of the CHDK GUI. Also, any change there would lead to an increase in core size.

Using &altGuiHandler as initial value of that pointer would mean no increase in core size. This does not mean CHDK would start in ALT mode, that struct would only provide values that (IMO) allow a successful transition to default GUI mode.
I don't think I see any related glitches on the M100.
Currently, the first few words at address zero are used as initial value when members of that struct are accessed.
If it works, that's good enough for me. It should be better than the current behavior. My initial reaction was that I'd prefer not to have it initialized in an inconsistent state (that is gui_mode is "alt" but various other gui and alt state variables initialized as non-alt).

FWIW, I'm not at all concerned about increasing core size by a few hundreds of bytes if it makes things clearer or easier to maintain.

One thing that might thinking about more is if any of the gui_mode stuff might be accessed in other tasks before gui_init is run, since that happens quite late after the filesystem is ready and CHDK settings have been initialized.
The fact that your solution works on M100 suggests it isn't on that camera. One possible exception is cameras with touch screen support (n, ixus310, ixus240) which reference it in the touch task. I doubt your change will hurt those, but it would probably be better to have chdk_process_touch immediately return if gui_init hasn't run yet. I don't think this needs to be done to check your change in.

Startup scripts are run from spytask after gui_init, so they shouldn't be a concern.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 20 / November / 2019, 15:03:07
I think I'd use defaultGuiHandler
That would not work very well because gui_init() would fail to initialize the gui mode.
Yeah, that makes sense, I didn't think through the if mode == current mode logic.

Quote
Quote
Or adjust gui_set_mode to deal with null old_mode.
I tried that first and failed due to my insufficient knowledge about the inner workings of the CHDK GUI. Also, any change there would lead to an increase in core size.

Using &altGuiHandler as initial value of that pointer would mean no increase in core size. This does not mean CHDK would start in ALT mode, that struct would only provide values that (IMO) allow a successful transition to default GUI mode.
I don't think I see any related glitches on the M100.
Currently, the first few words at address zero are used as initial value when members of that struct are accessed.
If it works, that's good enough for me. It should be better than the current behavior. My initial reaction was that I'd prefer not to have it initialized in an inconsistent state (that is gui_mode is "alt" but various other gui and alt state variables initialized as non-alt).

FWIW, I'm not at all concerned about increasing core size by a few hundreds of bytes if it makes things clearer or easier to maintain.

One thing that might thinking about more is if any of the gui_mode stuff might be accessed in other tasks before gui_init is run, since that happens quite late after the filesystem is ready and CHDK settings have been initialized.
The fact that your solution works on M100 suggests it isn't on that camera. One possible exception is cameras with touch screen support (n, ixus310, ixus240) which reference it in the touch task. I doubt your change will hurt those, but it would probably be better to have chdk_process_touch immediately return if gui_init hasn't run yet. I don't think this needs to be done to check your change in.

Startup scripts are run from spytask after gui_init, so they shouldn't be a concern.


After looking at the code it seems the de-reference issue comes from two areas:
- the touch screen code in lines 2460-2461 of gui.c
- keyboard processing on cameras with touch screens where gui_get_mode() may get called before gui_init()


I can't see any other cases - am I missing anything?


The first case is easily fixed with a check for gui_mode == NULL added to the current checks (should set redraw_buttons to 1 in this case).
The second case can be fixed by using camera_info.state.gui_mode instead of gui_get_mode() in the platform code (the IXUS 310 does this). This also removes the need for gui_get_mode altogether.


Setting the initial value of gui_mode will work; but feels wrong IHMO.


Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / November / 2019, 15:23:42
I can't see any other cases - am I missing anything?
Perhaps stating the obvious, but I assume the ones srsa_4c is hitting is the ones gui_set_mode where it references old_mode->... on 2474 and 2477
It seems like those could just be skipped if old_mode is null, though I'm not immediately sure whether redraw / restore stuff should be called on the first call.

gui_set_mode also returns old_mode, which would be NULL in this case, but the value isn't used in gui_init.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 20 / November / 2019, 16:04:19
I can't see any other cases - am I missing anything?
Perhaps stating the obvious, but I assume the ones srsa_4c is hitting is the ones gui_set_mode where it references old_mode->... on 2474 and 2477
It seems like those could just be skipped if old_mode is null, though I'm not immediately sure whether redraw / restore stuff should be called on the first call.

gui_set_mode also returns old_mode, which would be NULL in this case, but the value isn't used in gui_init.


Good point, missed that case.


Setting a default for gui_mode makes more sense now - I'm not fully comfortable with the idea of using the alt mode handler though.
Perhaps a dummy handler struct for startup until gui_init is called might work.


Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 20 / November / 2019, 19:10:21
I can't see any other cases - am I missing anything?
Perhaps stating the obvious, but I assume the ones srsa_4c is hitting is the ones gui_set_mode where it references old_mode->... on 2474 and 2477
It seems like those could just be skipped if old_mode is null, though I'm not immediately sure whether redraw / restore stuff should be called on the first call.

gui_set_mode also returns old_mode, which would be NULL in this case, but the value isn't used in gui_init.


Good point, missed that case.


Setting a default for gui_mode makes more sense now - I'm not fully comfortable with the idea of using the alt mode handler though.
Perhaps a dummy handler struct for startup until gui_init is called might work.


Phil.


Alternate patch attached.
- Adds a dummy handler for the initial value of gui_mode.
- Remove the gui_get_mode() function in favour of camera_info.state.gui_mode


Phil.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / November / 2019, 22:25:03
Alternate patch attached.
- Adds a dummy handler for the initial value of gui_mode.
- Remove the gui_get_mode() function in favour of camera_info.state.gui_mode
That seems OK to me. Tested booting to play and rec without issue on digic 4 (elph180) and digic 6 (sx710)

One thing I wondered is if there is code that relies on gui_mode == 0 being "none". The closest I found was script, which uses
Code: [Select]
camera_info.state.gui_mode != 0
for get_alt_mode(). This should not have any issue with the patch, since script shouldn't be able to run before gui_init. (I assume it doesn't use camera_info.state.gui_mode_alt because script is technically a different gui_mode, even though it has alt and non-alt states)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 20 / November / 2019, 23:16:47
Alternate patch attached.
- Adds a dummy handler for the initial value of gui_mode.
- Remove the gui_get_mode() function in favour of camera_info.state.gui_mode
That seems OK to me. Tested booting to play and rec without issue on digic 4 (elph180) and digic 6 (sx710)

One thing I wondered is if there is code that relies on gui_mode == 0 being "none". The closest I found was script, which uses
Code: [Select]
camera_info.state.gui_mode != 0
for get_alt_mode(). This should not have any issue with the patch, since script shouldn't be able to run before gui_init. (I assume it doesn't use camera_info.state.gui_mode_alt because script is technically a different gui_mode, even though it has alt and non-alt states)


The default value for camera_info.state.gui_mode is 0.
The new value I added is only used in the dummy handler for the init code that checks for mode change.
Anything that might use camera_info.state.gui_mode before gui_init is called should be unaffected (I think).

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 20 / November / 2019, 23:54:48
Anything that might use camera_info.state.gui_mode before gui_init is called should be unaffected (I think).
Yes, my mistake, I was thinking GUI_MODE_STARTUP would appear in camera_info.state.gui_mode before init, but of course it won't.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 21 / November / 2019, 16:08:27
Alternate patch attached.
Seems to work OK for me too.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 22 / November / 2019, 23:53:27
I can't see any other cases - am I missing anything?
Perhaps stating the obvious, but I assume the ones srsa_4c is hitting is the ones gui_set_mode where it references old_mode->... on 2474 and 2477
It seems like those could just be skipped if old_mode is null, though I'm not immediately sure whether redraw / restore stuff should be called on the first call.

gui_set_mode also returns old_mode, which would be NULL in this case, but the value isn't used in gui_init.


Good point, missed that case.


Setting a default for gui_mode makes more sense now - I'm not fully comfortable with the idea of using the alt mode handler though.
Perhaps a dummy handler struct for startup until gui_init is called might work.


Phil.


Alternate patch attached.
- Adds a dummy handler for the initial value of gui_mode.
- Remove the gui_get_mode() function in favour of camera_info.state.gui_mode


Phil.


Added to trunk in revision 5296.


Is it worth adding to the release-1_4 branch?

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 23 / November / 2019, 01:08:11
Is it worth adding to the release-1_4 branch?
AFAIK was only needed because digic 7 crashes on NULL pointer reads, so shouldn't be required.

(I do hope to make 1.5 the stable soon. For reals...  :-[)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 11 / December / 2019, 22:52:33
Question on revision 5294 for Ixus 220.


This changed both code_gen.txt and boot.c for 1.00c, 1.01a and 1.01g; but only changed code_gen.txt for version 1.01c.


Noticed when doing a batch-rebuild-code-gen - boot.c for 1.01c gets changed.


Not sure if this was an oversight, or the boot.c code was correct and code_gen.txt should not have been updated.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 11 / December / 2019, 22:59:52
Question on revision 5294 for Ixus 220.
This changed both code_gen.txt and boot.c for 1.00c, 1.01a and 1.01g; but only changed code_gen.txt for version 1.01c.
Thanks for catching that. I just missed running code gen on that sub, the MMIO should be the same for all. Checked in now.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 14 / December / 2019, 19:33:26
Found yet another case of a dereferenced null pointer.
Question is the usual, does the following fix look okay?
Code: [Select]
Index: core/shooting.c
===================================================================
--- core/shooting.c (revision 5331)
+++ core/shooting.c (working copy)
@@ -1053,7 +1053,7 @@
   int fl = get_focal_length(zoom_point);
   short f_focus_ok = shooting_get_focus_ok();
   short f_hyp_calc = 0, f_dist_calc = 0;
-  short min_av96_zoom_point = min_av96_zoom_point_tbl[zoom_point];
+  short min_av96_zoom_point = 0;
   short av96 = shooting_get_user_av96();
   short curr_av96 = shooting_get_current_av96();
   short prop_av96 = shooting_get_av96();
@@ -1063,8 +1063,10 @@
     min_av96_zoom_point_tbl = (short *) malloc(zoom_points * sizeof(short));
     if (min_av96_zoom_point_tbl) {
       memset(min_av96_zoom_point_tbl, 0, zoom_points * sizeof(short));
-      min_av96_zoom_point = 0;
     }
+    else {
+        return;
+    }
   } else min_av96_zoom_point = min_av96_zoom_point_tbl[zoom_point];
 
   if (min_av96_zoom_point==0 && shooting_in_progress()) {
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / December / 2019, 20:26:21
Found yet another case of a dereferenced null pointer.
Question is the usual, does the following fix look okay?
That existing code  :o :-X

Your fix looks OK to me.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 15 / December / 2019, 11:32:40
Your fix looks OK to me.
Thanks, committed (https://app.assembla.com/spaces/chdk/subversion/commits/5342). Fortunately, it was a rather benign bug - as long as malloc succeeded.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 14 / March / 2020, 15:46:32
Source code for ixus275_elph350, firmware version 100a.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 14 / March / 2020, 23:45:03
Source code for ixus275_elph350, firmware version 100a.
Thanks, added in trunk r5435
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 17 / March / 2020, 14:38:35
Source code for sx620hs, firmware version 100b.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 19 / March / 2020, 02:39:53
Source code for sx620hs, firmware version 100b.
Thanks. Added in trunk 5448
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: srsa_4c on 22 / March / 2020, 15:22:35
Two propset 12 related changes from my m100 patch that are not in trunk yet.
Code: [Select]
Index: core/shooting.c
===================================================================
--- core/shooting.c (revision 5449)
+++ core/shooting.c (working copy)
@@ -135,7 +135,7 @@
 int shooting_get_digital_zoom_mode(void)
 {
     int x=shooting_get_prop(PROPCASE_DIGITAL_ZOOM_MODE);
-#if CAM_PROPSET == 7 || CAM_PROPSET == 9 || CAM_PROPSET == 10|| CAM_PROPSET == 11
+#if CAM_PROPSET == 7 || CAM_PROPSET == 9 || CAM_PROPSET == 10 || CAM_PROPSET == 11 || CAM_PROPSET == 12
     if(x==1) {
         return 0;
     }
Index: platform/generic/wrappers.c
===================================================================
--- platform/generic/wrappers.c (revision 5449)
+++ platform/generic/wrappers.c (working copy)
@@ -95,7 +95,7 @@
 long set_property_case(long id, void *buf, long bufsize)
 {
     // ignore set on fake prop
-#if CAM_PROPSET == 7 || CAM_PROPSET == 9 || CAM_PROPSET == 10 || CAM_PROPSET == 11
+#if CAM_PROPSET == 7 || CAM_PROPSET == 9 || CAM_PROPSET == 10 || CAM_PROPSET == 11 || CAM_PROPSET == 12
     if(id==PROPCASE_SHOOTING) {
         return 0;
     }
The second one is clearly needed, not sure about the first one (no digital zoom here).
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 22 / March / 2020, 16:28:32
Two propset 12 related changes from my m100 patch that are not in trunk yet.
The second one is clearly needed, not sure about the first one (no digital zoom here).
Thanks for catching those, checked in. I wondered how I missed the wrappers one, since sx730 is tested OK, but it turns out I only missed the set_ call  :-[
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 18 / April / 2020, 19:46:32
Updated patch for G16  simple_movie_status variable.

https://chdk.setepontos.com/index.php?topic=14035
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 18 / April / 2020, 21:28:39
Updated patch for G16  simple_movie_status variable.

https://chdk.setepontos.com/index.php?topic=14035
Thanks. Added in r5469
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 18 / May / 2020, 13:56:20
Source code for ixus265_elph340, firmware version 100c.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 22 / May / 2020, 23:16:05
Source code for ixus265_elph340, firmware version 100c.
Thanks. Added in trunk r5511.

Autobuild is disabled, as it was in the patch.
Title: Re: G16 startup patch
Post by: waterwingz on 01 / November / 2020, 10:41:00
Fix for issue with G16 not entering shooting mode on long press of power button reported here (https://chdk.setepontos.com/index.php?topic=14048.msg143663#msg143663).

Tested on 101c - code for other versions hand checked in disassembly.

EDIT : patch file update
Title: Re: G16 startup patch
Post by: reyalp on 01 / November / 2020, 22:01:09
Fix for issue with G16 not entering shooting mode on long press of power button reported here (https://chdk.setepontos.com/index.php?topic=14048.msg143663#msg143663).

Tested on 101c - code for other versions hand checked in disassembly.

EDIT : patch file update
Thanks, g16_boot_r7.patch added in trunk 5606
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 05 / November / 2020, 05:53:06
SX410IS -Corrected order for zoom keys in keymap.
SX420IS -Added keys for slow zoom speed in keymap.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Caefix on 05 / November / 2020, 11:12:45
                                                                                                         ???
Code: [Select]
//SX410
+    { 2, KEY_ZOOM_IN         ,0x00000080 }, // full speed
+    { 2, KEY_ZOOM_IN         ,0x00000020 }, // low speed
+    { 2, KEY_ZOOM_OUT        ,0x00000040 }, // full speed
+    { 2, KEY_ZOOM_OUT        ,0x00000010 }, // low speed

//SX420
+    { 0, KEY_ZOOM_IN         ,0x00000100 }, // full speed  <------\ /----
+    { 0, KEY_ZOOM_IN         ,0x00000200 }, // low speed  <-------/ \--- ?
+    { 0, KEY_ZOOM_OUT        ,0x00000800 }, // full speed
+    { 0, KEY_ZOOM_OUT        ,0x00000400 }, // low speed
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 06 / November / 2020, 01:59:14
SX410IS -Corrected order for zoom keys in keymap.
SX420IS -Added keys for slow zoom speed in keymap.
Thanks, added in trunk 5614. Also set status to BETA and enabled in autobuild.

???
Please, if you have a question or comment, just use words. I guess you think the values are reversed or wrong for some reason, but if you can't explain, it's really not helpful.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 17 / December / 2020, 03:13:10
sx530hs- added exp_drv_task for very short exposures.
Tested by Davo in https://chdk.setepontos.com/index.php?topic=14169.msg144746#msg144746

EDIT: added patch file  :D
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 18 / December / 2020, 15:13:57
sx530hs- added exp_drv_task for very short exposures.
Tested by Davo in https://chdk.setepontos.com/index.php?topic=14169.msg144746#msg144746

EDIT: added patch file  :D
Thanks. Added in trunk 5690, stable 5691
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Ant on 29 / April / 2021, 09:34:31
Source code for EOS M3, firmware version 121a.


Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 29 / April / 2021, 16:24:42
Source code for EOS M3, firmware version 121a.
Thanks, added in trunk 5859, enabled in autobuild as alpha.

I noticed the included strub_entry_2.s did not exactly match the output I got rebuilding stubs in the current trunk. The differences don't seem material (it looks like it was actually a stubs_entry.err.S built without stubs_entry_2.s and different platform shooting.c, but the found addresses are identical), so I checked it in anyway, just noting in case it was unexpected.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Ant on 29 / April / 2021, 17:05:46
I noticed the included strub_entry_2.s did not exactly match the output I got rebuilding stubs in the current trunk.

Do you mean difference with other firmware versions?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 29 / April / 2021, 17:23:04
Do you mean difference with other firmware versions?
I meant between the stubs_entry.S included in your patch, and what I generated rebuilding stubs for the 121a firmware using the current trunk source.

edit: diff
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Ant on 29 / April / 2021, 17:31:31
stubs_entry.S was generated a week ago using finsig_thumb2 which was built a week ago...
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 29 / April / 2021, 17:39:22
stubs_entry.S was generated a week ago using finsig_thumb2 which was built a week ago...
The differences aren't in the found sigs (funcs_by*.csv are identical) but in the modemap and sigs that are set in stubs_entry_2.s.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: Ant on 29 / April / 2021, 18:22:04
Maybe this is because stubs_entry.S was generated not in "\platform\m3\sub\121a\" directory?
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: SX720 on 03 / July / 2021, 13:30:43
I'd suggest that this patch: https://sources.debian.org/patches/lua5.1/5.1.5-8.1/0004-Fix-stack-overflow-in-vararg-functions.patch/

get applied.

It fixes a security problem with Lua. A more detailed explanation is here: http://www.lua.org/bugs.html#5.2.2-1

You can apply it like so:

Code: [Select]
cd trunk/lib/lua
wget 'https://sources.debian.org/data/main/l/lua5.1/5.1.5-8.1/debian/patches/0004-Fix-stack-overflow-in-vararg-functions.patch'
patch -p2 < 0004-Fix-stack-overflow-in-vararg-functions.patch
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 03 / July / 2021, 13:56:05
It fixes a security problem with Lua. A more detailed explanation is here: http://www.lua.org/bugs.html#5.2.2-1
As far as security goes, using a stack overflow when poke() is right there would seem to be making things hard on oneself ;)

That said, it sounds like it could crash in other legitimate code, so probably worth applying. Thanks for pointing it out.

edit:
I've checked this in on the trunk (r5979), as well as https://www.lua.org/bugs.html#5.1.5-2 (r5980). The latter makes CHDK Lua effectively 5.1.5
I'll merge them back to the stable branch a bit later after I've had time to test a few more scripts.

For both, I verified the existing CHDK code showed the error in the test case, and the patch resolved it.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: SX720 on 04 / July / 2021, 20:34:19
Thank you for getting this merged. I see what you mean about the poke function. I still think it's a good chance because as you've mentioned legitimate scripts could crash the camera. This helps because I was wondering what version of Lua I should target when writing scripts. Now I know.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 15 / August / 2021, 12:37:48
sx430is - correct power on behavior
Tested by ntstatic in https://chdk.setepontos.com/index.php?topic=13569.msg146875#msg146875
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 15 / August / 2021, 18:02:45
sx430is - correct power on behavior


Thanks, added to SVN in commit 6010 (trunk) and 6011 (release 1.5).

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: rudi on 30 / December / 2021, 14:56:21
Here is a patch to enable fmath library for hostlua:
Successfully tested on windows.
rudi
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: waterwingz on 30 / December / 2021, 22:25:48
Patch to make HDMI output on the G16 work correctly. 

see : Re: Display (bitmap overlay) (https://chdk.setepontos.com/index.php?topic=12788.msg147565#msg147565)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 31 / December / 2021, 00:00:53
Patch to make HDMI output on the G16 work correctly. 

see : Re: Display (bitmap overlay) (https://chdk.setepontos.com/index.php?topic=12788.msg147565#msg147565)
Added in trunk r6033
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 31 / December / 2021, 01:05:11
Here is a patch to enable fmath library for hostlua:
  • add "divide by zero" check for divisor in fmath_new()
  • re-enable os_listdir(), os_idir() for hostlua with old code from trunk 3415
  • add lfmath.o to hostlua Makefile
Successfully tested on windows.
rudi
Thanks. I've added in trunk r6035 with a small modification to make os.listdir and os.idir compatible with table options added with CHDK long filename support. Of course, hostlua doesn't actually control long filenames being returned or not, but the option table is handled correctly.

Quote
add "divide by zero" check for divisor in fmath_new()
Mostly, CHDK ignores divide by 0 (see around https://chdk.setepontos.com/index.php?topic=11316.msg124312#msg124312) but I think in this case it makes sense to error, since it's new functionality and the code easily allows throwing an error.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: rudi on 31 / December / 2021, 10:20:26
I've added in trunk r6035 with a small modification ...
Perfect, thank you.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: rudi on 08 / August / 2022, 10:31:09
Here are two tested patches:
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: philmoz on 08 / August / 2022, 20:21:17
Here are two tested patches:
  • the missing rebuild of stubs_auto.S for trunk 6109
  • simplified SVN revision extraction including language independence
    the goal are:
    • independence of different messages from different svn versions
    • independence of svnversion languages
    • no error message in case of missing svnversion
    procedure of patch:
    • redirect any subversion error to null device, eg. svnversion is missing
    • keep only digits and colon, this change any result stings to an empty value
    • get valid revision number if is possible
    • the result is revision number or empty value
    • if result empty then use default revision 'DEF_SVN_REF' from buildconf.inc


Thanks. Added in revisions 6120 and 6121.

Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 08 / May / 2023, 03:17:00
Source code for sx600hs, firmware versions 100d and 100f.
Autobuild is skipped for firmware version 100d because no tests were done.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 08 / May / 2023, 03:18:54
Source code for ixus180_elph190, firmware version 100a.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 08 / May / 2023, 22:46:27
Source code for sx600hs, firmware versions 100d and 100f.
Autobuild is skipped for firmware version 100d because no tests were done.
Thanks. Added in trunk r6240, as-is except for running rebuild-firmware-crc and removing some trailing whitespace.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 12 / May / 2023, 01:16:45
Source code for ixus180_elph190, firmware version 100a.
Thanks. Added in trunk r6245 with minor modifications (firmware CRC, whitespace, and note filewrite task not implemented in notes)
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 15 / May / 2023, 13:30:52
Ixus180_elph190 implemented filewrite_task and fix in shooting.c
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 15 / May / 2023, 19:47:19
Ixus180_elph190 implemented filewrite_task and fix in shooting.c
Thanks. Added in trunk r6246.

Note I removed MODE_HIGHSPEED_BURST and MODE_SMART_SHUTTER from shooting.c. The messages relating to these weren't in stubs_entry.S, but they were still present in the version of shooting.c included in the patch. In any case, neither is referenced in the Canon manual, so it seems safe to assume they don't exist.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 08 / January / 2024, 06:29:14
Source code for sx620hs ,firmware version 110a.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 08 / January / 2024, 06:32:11
Source code for ixus190_elph200 ,firmware versions 100d and 110a.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 08 / January / 2024, 19:42:18
Source code for sx620hs ,firmware version 110a.
Thanks. Added in trunk 6264.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 09 / January / 2024, 00:40:11
Source code for ixus190_elph200 ,firmware versions 100d and 110a.
Thanks. Added in trunk 6265. I've left autobuild disabled for now since I'm not clear what the status of this port is, and haven't yet done any code review.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 09 / January / 2024, 01:35:07
Thanks. Added in trunk 6265. I've left autobuild disabled for now since I'm not clear what the status of this port is, and haven't yet done any code review.
Thanks.
That's fine to me, it's important that the files are added to SVN before they get lost in the vastness of the internet or my dying hard drive.
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: blackhole on 13 / January / 2024, 13:57:29
Source code for sx620hs ,firmware version 110a.
Thanks. Added in trunk 6264.
We have a typo in camera_list.csv file, we miss the last comma in  SX620HS, 110A, Alpha,
Title: Re: [REQ]Adding new cameras, applying patches into trunk (with source code prepared)
Post by: reyalp on 13 / January / 2024, 15:26:05
We have a typo in camera_list.csv file, we miss the last comma in  SX620HS, 110A, Alpha,
Thanks, fixed.