A2300 porting thread - page 3 - DryOS Development - CHDK Forum

A2300 porting thread

  • 70 Replies
  • 35440 Views
*

Offline nafraf

  • *****
  • 1308
Re: A2300 porting thread
« Reply #20 on: 26 / July / 2012, 20:25:25 »
Advertisements
The previous test was done without modifications to platform/generic/wrappers.c.  Now I'm calling MakeDirectory_Fut with its second parameter modified. I'm using values 0, 1, and its original value (-1).

For cases -1, and 0.  mkdir returns ERROR, ls shows as if directory were created, but after reboot, the directory dissapears.

For case 1. mkdir return ERROR, but directory is created and continue existing after reboot.

I'm not sure, but due to the behavior of last case. I think that the ERROR could be caused for a
misunderstanding of returned value of mkdir function to chdkptp.
The code for create directory is part of chdkptp/lua/rlibs.h    I'll continue checking... 

*

Offline srsa_4c

  • ******
  • 4451
Re: A2300 porting thread
« Reply #21 on: 26 / July / 2012, 21:11:09 »
The only check inside the firmware's mkdir function for the second parameter is that whether it equals to 1 or not! Sometimes, return values are subject to change. I would expect that the SX260's mkdir behaves the same, as both of these cameras use a newer DryOS revision. Try to figure out the real return values of the firmware function, and adjust the wrapper in CHDK according to that. Obviously, CHDK needs the case where the created directory doesn't disappear.

*

Offline nafraf

  • *****
  • 1308
Re: A2300 porting thread
« Reply #22 on: 30 / July / 2012, 20:03:49 »
The only check inside the firmware's mkdir function for the second parameter is that whether it equals to 1 or not! Sometimes, return values are subject to change. I would expect that the SX260's mkdir behaves the same, as both of these cameras use a newer DryOS revision. Try to figure out the real return values of the firmware function, and adjust the wrapper in CHDK according to that. Obviously, CHDK needs the case where the created directory doesn't disappear.
CHDK works well using -1, 0, or 1. The problem was detected only with chdkptp, which requires 1. According to SX260 forum, SX260 mkdir works well with all values, even using chdptp.  So, I continued with the porting process, and I'll see mkdir+chdkptp problem later.

Generation of RAW file is working.

Remote trigger is not working. After enabling remote trigger and plug/unplug USB cable, camera does not show any answer. 

I have some other problems with chdkptp interface too. Zoom buttons does not work, so, I guess that the problem is with the MASKS in kbd.c.


*

Offline reyalp

  • ******
  • 14080
Re: A2300 porting thread
« Reply #23 on: 30 / July / 2012, 23:55:05 »
The only check inside the firmware's mkdir function for the second parameter is that whether it equals to 1 or not! Sometimes, return values are subject to change. I would expect that the SX260's mkdir behaves the same, as both of these cameras use a newer DryOS revision. Try to figure out the real return values of the firmware function, and adjust the wrapper in CHDK according to that. Obviously, CHDK needs the case where the created directory doesn't disappear.
CHDK works well using -1, 0, or 1. The problem was detected only with chdkptp, which requires 1. According to SX260 forum, SX260 mkdir works well with all values, even using chdptp.  So, I continued with the porting process, and I'll see mkdir+chdkptp problem later.
chdkptp just reports the value return value of os.mkdir on the camera.

llibtst.lua  (or any other script that actually checks the return value) should also report same thing.
Don't forget what the H stands for.


*

Offline nafraf

  • *****
  • 1308
Re: A2300 porting thread
« Reply #24 on: 05 / August / 2012, 18:15:23 »
Using chdkptp, UI Overlay objects are shown with wrong colors, see image in attachment.
What could be the problem? 
Thanks

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: A2300 porting thread
« Reply #25 on: 05 / August / 2012, 18:40:33 »
Using chdkptp, UI Overlay objects are shown with wrong colors, see image in attachment.
What could be the problem? 
Thanks


Did you base your port on a version using 'CAM_LOAD_CUSTOM_COLORS' that implemented 'load_chdk_palette' in lib.c?
If so you need to find a block of colors in the palette that aren't used by the firmware and set 'CHDK_COLOR_BASE' accordingly (or turn off CAM_LOAD_CUSTOM_COLORS).


Ignore, I misread the original post - see reyalp's reply below.

Phil.
« Last Edit: 05 / August / 2012, 18:44:48 by philmoz »
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline reyalp

  • ******
  • 14080
Re: A2300 porting thread
« Reply #26 on: 05 / August / 2012, 18:41:30 »
Using chdkptp, UI Overlay objects are shown with wrong colors, see image in attachment.
What could be the problem? 
Thanks
You need to implement
vid_get_palette_type
vid_get_palette_size
vid_get_bitmap_active_palette

For correct UI display, you should also implement vid_get_bitmap_active_buffer, or you often see an overlay that is out of date.
Don't forget what the H stands for.

*

Offline nafraf

  • *****
  • 1308
Re: A2300 porting thread
« Reply #27 on: 07 / August / 2012, 17:40:06 »
Live view is almost working, the four suggested functions were implemented, there are some details.

Color of UI Overlay objects at bottom left corner is different from camera display.  What am I missing?  See first attachment.

Is there any other buffer for Capture modes like MODE_SCN_FISHEYE, MODE_SCN_MINIATURE, MODE_VIDEO_IFRAME_MOVIE, MODE_SCN_TOY_CAMERA?  Activating this modes, I lost the live view. See the second image in attachment. 

Thanks again
« Last Edit: 07 / August / 2012, 17:43:54 by nafraf »


*

Offline reyalp

  • ******
  • 14080
Re: A2300 porting thread
« Reply #28 on: 07 / August / 2012, 21:52:26 »
Is there any other buffer for Capture modes like MODE_SCN_FISHEYE, MODE_SCN_MINIATURE, MODE_VIDEO_IFRAME_MOVIE, MODE_SCN_TOY_CAMERA?  Activating this modes, I lost the live view. See the second image in attachment. 
I don't have a camera with any of these modes, but given what the live view shows, it must be different. This would also be a problem for zebra, histogram, motion detection and edge overlay.

Have you implemented vid_get_viewport_live_fb, or are you just using a fixed address (vid_get_viewport_fb) ?

edit:
I'm not sure what the first screenshot is showing, since I don't know what it is supposed to look like.
« Last Edit: 07 / August / 2012, 21:54:06 by reyalp »
Don't forget what the H stands for.

*

Offline nafraf

  • *****
  • 1308
Re: A2300 porting thread
« Reply #29 on: 08 / August / 2012, 13:30:22 »
I don't have a camera with any of these modes, but given what the live view shows, it must be different. This would also be a problem for zebra, histogram, motion detection and edge overlay.
Have you implemented vid_get_viewport_live_fb, or are you just using a fixed address (vid_get_viewport_fb) ?
I implemented it using a3300/a2200 as reference, searching for corresponding values using chdk-pt. But  a2200 is under development too, and the behavior of chdkptp with those special capture modes is the same. 
Code: [Select]
void *vid_get_viewport_live_fb()
{    return (void*)(*(int*)(0x20BC+0x134));             //ff8490f8 + ff849150 a2300
}
I'm confused about that values, it seems to be very specific for each DryOS release an camera models. Some post talks about brute force for find its value, others find values inside code.  I know that there is not a recipe, but could you give me a pointer of how to find that buffer?

Quote
I'm not sure what the first screenshot is showing, since I don't know what it is supposed to look like.
Color of DISP text is different from camera LCD. See the image in attachment. Sometimes it is yellow, sometimes it is green... maybe related to wrong buffer address?

Btw, source code of cameras that I'm porting is available in this svn repo.

 

Related Topics