Looking at this a bit more, I don't think the error lapser saw was due to incorrect definition in CHDK, the script just has to ensure it doesn't go outside the active area.
That's true, and I fixed that problem in the script. But there's still incorrect definitions in the M3 port.
I wrote a test script that holds the shutter down in continuous mode saving jpegs, and draws a rectangle just inside the height and width of the JPEG area (6000x4000). The upper left corner of the rectangle starts at the active area left,top postion. Then I move one pixel down and to the right for each new picture afterwards. Looking at the jpeg images, I found the x and y coordinates where a rectangle is visible on all sides. On my M3, those coordinates are:
x=92, y=49
The script draws a rectangle at that position in the last photo (after you press menu to stop the script.
I noticed that the JPEG and ACTIVE areas are identical, an obvious error.
Aleft=84 Atop=46 Awidth=6000 Aheight=4000
Jleft=84 Jtop=46 Jwidth=6000 Jheight=4000
Jleft should be 92, and Jtop 49, so the active area has to extend to at least:
6092 rowpix and 4049 rows (if I'm understanding correctly).
I'll attach the script, which should work with any camera. Here's the log produced:
Camera:m3 f/w:120f platformID:12953 bit/pixel:14
version:CHDK 1.5.0 built on Sep 8 2017 23:08:23
Sat Sep 9 16:25:55 2017
x=84 y=46 w=6000 h=4000
Aleft=84 Atop=46 Awidth=6000 Aheight=4000
Jleft=84 Jtop=46 Jwidth=6000 Jheight=4000
ishots=1 x=84 y=46
ishots=2 x=85 y=47
ishots=3 x=86 y=48
ishots=4 x=87 y=49
ishots=5 x=88 y=50
ishots=6 x=89 y=51
ishots=7 x=90 y=52
ishots=8 x=91 y=53
ishots=9 x=92 y=54
ishots=10 x=93 y=55
ishots=11 x=94 y=56
ishots=12 x=95 y=57
ishots=13 x=96 y=58
ishots=14 x=97 y=59
ishots=15 x=98 y=60
ishots=16 x=99 y=61
ishots=17 x=100 y=62
ishots=18 x=101 y=63
ishots=19 x=102 y=64
ishots=20 x=103 y=65
ishots=21 x=104 y=66
ishots=22 x=92 y=49
*** Done ***
[edit]
It looks like camera_sensor.jpeg.x and camera_sensor.jpeg.y are 0?
My tests show they should be 8, and 3. Is that correct?
static int rawop_get_jpeg_left(lua_State *L) {
lua_pushnumber(L,camera_sensor.active_area.x1 + camera_sensor.jpeg.x);
return 1;
}
static int rawop_get_jpeg_top(lua_State *L) {
lua_pushnumber(L,camera_sensor.active_area.y1 + camera_sensor.jpeg.y);
return 1;
}