I noticed .DNG files had ludicrous focal lengths reported in the Exif data. This because CHDK still had the address of the sx220's focus length table. I found the table in the ELPH300 (it's in the same place in all three firmwares) and updated main.c and all stubs_min.S files to reflect this. Now the metadata reports a sane value.This patch also fixes a few minor problems in platform_camera.h, and adjusts the aperture table in shooting.c to something a bit closer (it's not exact; it's stolen from the ixus200, which has a similar lens; I'm not sure where to find the real info for this - I didn't see it in propcase 26, where some comments referenced).[EDIT: patch applies to trunk revision 1441]
" BL shooting_expo_iso_override\n" // added" BL sub_FF88319C \n"" BL shooting_expo_param_override\n" // added" BL sub_FF8800A8 \n"//" MOV R0, #0\n" // added//" STR R0, [R5,#0x28]\n" // added, fixes overrides behavior at short shutter press (from S95)
int vid_get_viewport_buffer_width() { return 960; }
int vid_get_viewport_buffer_width() { return 360; }
I got the zebras working by changing lib.c from this:Code: [Select]int vid_get_viewport_buffer_width() { return 960; }to this:Code: [Select]int vid_get_viewport_buffer_width() { return 360; }Edge detection works for every other shot. That is, once you take a shot, the edges from the previous shot keep being displayed--it doesn't update in real-time. Then when you take another shot, it resumes working. I would guess the camera has two viewports that it alternates between, and CHDK is only looking at the first. (As a wild guess, I might say this is how they implement panorama stitch mode - show the previous viewport so you can line up the next shot with the current one.)Zebras don't quite work right when you choose an aspect ratio other than 4:3. The borders at the edge of the shot are "underexposed". I can fix this by adjusting vid_get_viewport_xoffset() / _yoffset() / etc. - actually, I stole the ones from the sx40, because it has the same resolution/aspect ratio screen, and same viewport width. Problem is, _that_ breaks edge detection: the edges no longer line up with the display. Oh, and the camera crashes too.
Here's another iteration that also crashes:Code: [Select]" BL shooting_expo_iso_override\n" // added" BL sub_FF88319C \n"" BL shooting_expo_param_override\n" // added" BL sub_FF8800A8 \n"//" MOV R0, #0\n" // added//" STR R0, [R5,#0x28]\n" // added, fixes overrides behavior at short shutter press (from S95)I figured shooting_expo_iso_override was setting some variable that we don't have the right address for, and clobbering something important. But it doesn't seem to access any model-specific data. Still stymied on this one...
In the sub/xxxx/lib.c files you are using the IXUS 310 model for vid_get_viewport_live_fb and vid_get_viewport_fb.This code is subtracting vid_get_viewport_xoffset()*3 from the actual buffer address.This is probably wrong - this hack only seems to apply to widescreen cameras where the image is always left justified in the viewport memory. On 4:3 display cameras the image is centered in the viewport. CHDK code assumes the image is centered so the offset is used to fool it.
That was indeed the problem.I've submitted a patch.
If you dump the log and upload that along with the main.dump file then I can help you analyse it (also need to know which camera firmware version it is from).
Exception!! Vector 0x10Occured Time 2011:11:27 12:58:22Task ID: 15204383Task name: SpyTaskExc Registers:0x000000080x000000FF...
Quote from: philmoz on 01 / December / 2011, 22:09:44If you dump the log and upload that along with the main.dump file then I can help you analyse it (also need to know which camera firmware version it is from).Before uploading log and main.dump I would like to ask about the log file.My logfile starts with:Code: [Select]Exception!! Vector 0x10Occured Time 2011:11:27 12:58:22Task ID: 15204383Task name: SpyTaskExc Registers:0x000000080x000000FF...Date in camera is set correctly. Maybe this is only an old CrashRomLog from my first tests (better call them crashes ) on 27.November? There is no other "Occured Time" mentioned in that ROMLOG.LOG file. Probably this logfile is not belonging to the crash when pressing Shutter_Half after override of ISO is set.
Started by acseven General Discussion and Assistance
Started by ELPH300 « 1 2 » Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)
Started by VincentD « 1 2 3 » General Help and Assistance on using CHDK stable releases
Started by yoshiharra General Help and Assistance on using CHDK stable releases
Started by igb General Help and Assistance on using CHDK stable releases