SD940 (IXUS120) porting thread - page 16 - DryOS Development - CHDK Forum  

SD940 (IXUS120) porting thread

  • 542 Replies
  • 101034 Views
Re: SD940 (IXUS120) porting thread
« Reply #150 on: 29 / December / 2010, 03:26:55 »
Advertisements
Hi,

   sorry for offtopic,

   please someone who owns sd940 test how much memory is free after chdk loading on SD940 in play mode with empty memory card ( black screen - no pictures),


   I see results of your free memory from previous posts(cca 130k) but I dont know conditions of test (play/capture mode start, empty/ not empty memory card).

   Please, start in play mode with empty memory card to test free memory.

   Thanks in advance, this is needed for SX130 chdk development.


PS
To find free memory:
Press ALT and then press MENU, navigate to the 'Miscellaneous stuff' menu and select 'Show memory info".

Re: SD940 (IXUS120) porting thread
« Reply #151 on: 29 / December / 2010, 10:42:52 »
please someone who owns sd940 test how much memory is free after chdk loading on SD940 in play mode with empty memory card ( black screen - no pictures),

   I see results of your free memory from previous posts(cca 130k) but I dont know conditions of test (play/capture mode start, empty/ not empty memory card).

   Please, start in play mode with empty memory card to test free memory.

Okay - SD940 103C  BETA release - empty card, play mode start -

***Memory Info ***
Free Memory: 188288 bytes  
CHDK size: 297884 bytes
loaded at 0x153E64

Update : Free memory drops to 127K in shoot mode after I take the first picture (image show on startup).  Taking more pictures does not seem to change that much.  Turning on Edge Overlay drops the memory to 65K.  Zebra does not seem to work yet with this port - maybe not enough memory to even start ?

Free memory with a shoot mode start was 185382 bytes with no pictures on the card.

As discussed in this thread,  I don't think I believe it but waldo's desciption of it malloc'ing space until it runs out sounds pretty robust assuming it tests the malloc'd buffer and does not just depend on the return code from the OS. Having said that,  we are still having trouble with random crashing in LUA and other places so naturally we are suspicious about memory limits

Additional Update :   Looks like the SD940 has more free memory than the IXUS100 SD780 (its physical twin)
 http://chdk.setepontos.com/index.php?topic=3995.msg55455#msg55455.  They seem to get pretty good functionality out of what they have.
« Last Edit: 29 / December / 2010, 12:16:04 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SD940 (IXUS120) porting thread
« Reply #152 on: 29 / December / 2010, 12:12:52 »
To get zebra working, you need add in camera.h this i think

#define CAM_ZEBRA_ASPECT_ADJUST 1
   #define CAM_ZEBRA_NOBUF 1

your memory is lower.IX 1000 have 251xxx bytes
maybe you try out to disable in chdk shell compiler options opt_game xxxxx opt_textreader if things go better.if not, then its no mem problem

with that you can get 21 kb more ram.ix 1000 have then 272xxx bytes.
check if enough ram is here is a good idea, but for the check task switching of the Camera need disable(i dont know if thats possible), so no other task can jumo in and allocate memory, because if a task alloc mem, during mem eaten process, mem fragmentation or crash can happen, because the other task get no memory.
« Last Edit: 29 / December / 2010, 12:24:24 by Bernd R »
Ixus 1000 HS

Re: SD940 (IXUS120) porting thread
« Reply #153 on: 29 / December / 2010, 12:39:01 »
To get zebra working, you need add in camera.h this i think

#define CAM_ZEBRA_ASPECT_ADJUST 1
   #define CAM_ZEBRA_NOBUF 1

That worked - thanks !!  I still have an offset between actual image and either the zebra pattern or the edge overlay pattern so it doesn't look like much. But the pattern is definitely there.  One of my buffer size values in lib.c is wrong I suspect.

your memory is lower.IX 1000 have 251xxx bytes
maybe you try out to disable in chdk shell compiler options opt_game xxxxx opt_textreader if things go better.if not, then its no mem problem

I haven't started eliminating functions yet.  With memory 200K - 300K less than other cameras,  somehow saving 5K to 10K does not seem like much help.  Still,  its worth a shot.   I read in another thread that using gcc4 saves space too - but its was awefully slow the last time I tried it.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: SD940 (IXUS120) porting thread
« Reply #154 on: 29 / December / 2010, 12:53:10 »
Here's my proposal for the DISP key issue:
<snip>
It seems fairly intuitive once you get the hang of the key press timing.  It's not ideal and will cause confusion for new users, but it's the best I came up with so far.

Had the chance to try CHDK on my daughter's SD1200.  They solve the issue of not having a PRINT button by using a second short press of the Play power button to activate ALT mode.  Works petty well.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline fe50

  • ******
  • 3099
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: SD940 (IXUS120) porting thread
« Reply #155 on: 29 / December / 2010, 14:33:24 »
With memory 200K - 300K less than other cameras,  somehow saving 5K to 10K does not seem like much help.  Still,  its worth a shot.   I read in another thread that using gcc4 saves space too - but its was awefully slow the last time I tried it.
There are some more cameras with < 300kb free RAM successfully running the "standard" CHDK build...

This wikia article may be helpful for you:
*http://chdk.wikia.com/wiki/CHDK/Camera_RAM_memory_usage :D

Re: SD940 (IXUS120) porting thread
« Reply #156 on: 29 / December / 2010, 16:46:16 »
There are some more cameras with < 300kb free RAM successfully running the "standard" CHDK build...

True - but not a lot with less than the 180K we are working with.  I did notice that the SD780 tread shows that camera apparently working well with only 125K of free memory.

This wikia article may be helpful for you:

I had seen that - its what got me worried that not having enough memory might be a problem for us.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline waldo

  • ***
  • 238
Re: SD940 (IXUS120) porting thread
« Reply #157 on: 29 / December / 2010, 17:20:45 »
My SD940/1,02c shows 64K free best case. After taking pictures the free memory can be less than 1K (if it doesn't crash before I can check the memory info).  Not sure what the difference is. 

...unless that is why they made firmware version 1.03c


Re: SD940 (IXUS120) porting thread
« Reply #158 on: 29 / December / 2010, 20:20:31 »
Some progress today - I now have edge overlay and zebra modes working!

Changes from the released 103c beta code :

1) in lib.c vid_get_viewport_width() should return 360
2) in lib.c vid_get_bitmap_screen_width() should return 360
3) in camera.h add the following : (thanks to Bernd R)
             #define CAM_ZEBRA_ASPECT_ADJUST 1
             #define CAM_ZEBRA_NOBUF 1

I'll update the beta source code to reflect this.


Ported :   A1200    SD940   G10    Powershot N    G16

Re: SD940 (IXUS120) porting thread
« Reply #159 on: 31 / December / 2010, 11:45:14 »
Posted Beta 2 release for firmware 103c
http://www.zshare.net/download/84588902eef95021/

.... and source code for SD940 based on 1001 trunk. 
http://www.zshare.net/download/845888249f3ebff5/

Includes working zebra and edge overlay modes and waldo's new code for handling the DISP key - see
http://chdk.setepontos.com/index.php?topic=5855.msg58646#msg58646
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics