UI memory - page 2 - General Discussion and Assistance - CHDK Forum  

UI memory

  • 24 Replies
  • 6575 Views
Re: UI memory
« Reply #10 on: 04 / March / 2014, 03:58:39 »
Advertisements
Hi srsa_4c,

If you want to play with this, you can "steal" some more of this memory by reducing the value on the line that has the comment "// + (steal 128kB from it)" in boot.c. If the free UI memory falls below, say, ~50kB, the camera may crash.

Now i have changed this "    LDR     R5, =0x61A80 \n" // + (400000 bytes allocated for UI memory) in boot.c.
So far no crash. But with the reduced UI-Memory the jpg-quality is not better than without.

Chdk will be loaded in ARAM. And the reduced UI-Memory would not lead to more space for CHDK.
Is it possible to get more space for CHDK in ARAM? When i load CHDK in extended memory and try the high reduced UI-Memory, the jpg-quality is bad like before the use of ARAM.

Unfortunately does the use of the reduced UI-Memory for the SX230HS at that moment not lead to benefits such as: More storage for CHDK and high-quality JPG, or something like that.

May be it is helpfull for other cameras

Bye

Re: UI memory
« Reply #11 on: 04 / March / 2014, 08:31:46 »
I have done my very best, but i only have one SX230HS.
Your help is appreciated, but I'd like to see more reports from other people. No official CHDK ports run with reduced UI memory as of now, I'm not 100% sure that doing this doesn't have negative influence on camera stability.
When I get a few minutes, I can run some tests on my "lower memory" cameras ( SD940, A1200 ).   Should I do anything other than load chdk and post what Show misc. values reports?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4426
Re: UI memory
« Reply #12 on: 04 / March / 2014, 14:22:19 »
So far no crash. But with the reduced UI-Memory the jpg-quality is not better than without.
If your CHDK build is using the unofficial ARAM configuration (instead of EXMEM), JPEG quality should be unaffected by CHDK, and the CHDK "supefine" JPEG override should actually work.

I have started experimenting with lowering the size of UI memory because some cameras have very little free memory (when EXMEM is not used). So, you can further lower the size of UI memory, but JPEG quality won't increase - you'll only get more free RAM for CHDK and the Canon firmware tasks.

BTW, the correct way to alter the amount of pre-allocated UI memory is to modify the green value in boot.c, not the commented line above it (note that 0x927c0 is the original value from the firmware):
//      "    LDR     R5, =0x927C0 \n" // - (600000 bytes allocated for UI memory)
      "    LDR     R5, =0x727C0 \n" // + (steal 128kB from it)


When EXMEM is used by CHDK, the firmware can only allocate less EXMEM than it expects, and on some cameras this results in a JPEG size limit. If the firmware limits JPEG size, detailed images will be saved with high compression = bad quality.

@WW
Yes, that should do. Since reyalp's d10 shows unexpectedly low free UI memory, it's possible that there are other models with that condition. If you have time, try entering some more complicated Canon menus repeatedly and note the lowest numbers.

Re: UI memory
« Reply #13 on: 04 / March / 2014, 17:06:08 »
@WW
Yes, that should do. Since reyalp's d10 shows unexpectedly low free UI memory, it's possible that there are other models with that condition. If you have time, try entering some more complicated Canon menus repeatedly and note the lowest numbers.
The patch file from your second post seems to now be very out-of-date and fails in too many places to fixup manually.   Can you please post one from the current version of the 1.3.0 trunk?
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline srsa_4c

  • ******
  • 4426
Re: UI memory
« Reply #14 on: 04 / March / 2014, 17:21:57 »
The patch file from your second post seems to now be very out-of-date and fails in too many places to fixup manually.   Can you please post one from the current version of the 1.3.0 trunk?
Will do, in the meantime if you remove the platform/ changes from the patch (except for platform/generic), it should still apply - stubs_entry.S will have to be rebuilt.

Re: UI memory
« Reply #15 on: 04 / March / 2014, 17:30:22 »
Will do, in the meantime if you remove the platform/ changes from the patch (except for platform/generic), it should still apply - stubs_entry.S will have to be rebuilt.
If I get a minute, I'll look at that.  I noticed it was mostly the stubs_entry.S files but after spending the entire weekend fighting patch files I just don't have the heart to edit a big one right now.  :'(

Never mind - it was just your two new stubs getting crossed with the two new stubs philmoz added last Friday.  For the two cams I'll test,  I hand edited.
« Last Edit: 04 / March / 2014, 17:56:14 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: UI memory
« Reply #16 on: 04 / March / 2014, 18:05:20 »
A1200

At startup:
Code: [Select]
ALL: 350352
MAX: 350328

After playing with Canon menus quite a bit :
Code: [Select]
ALL: 327144
MAX: 313184

IXUS120_SD940

At startup:
Code: [Select]
ALL: 260400
MAX: 260376

After playing with Canon menus quite a bit :
Code: [Select]
ALL: 257288
MAX: 219472
« Last Edit: 04 / March / 2014, 18:11:59 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4426
Re: UI memory
« Reply #17 on: 04 / March / 2014, 18:06:53 »
Updated patches, with and without the stubs.
@a1200: that's "normal", close to the values seen on a3200


Re: UI memory
« Reply #18 on: 04 / March / 2014, 18:27:09 »
@a1200: that's "normal", close to the values seen on a3200
Added the ixus120 to my previous post.  Less memory but probably still "normal" ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4426
Re: UI memory
« Reply #19 on: 05 / March / 2014, 17:29:46 »
Added the ixus120 to my previous post.  Less memory but probably still "normal" ?
Just tried the g10. It's a DryOS r31 camera (like the d10), free UI mem is ~154000 when starting in play mode, and went below 100000 after some menu use. So it looks like UI memory usage is camera generation dependent. If Canon is OK with ~150kB after startup, it might be OK to reduce the UI memory somewhat on models that appear to consume less of it.

 

Related Topics