G11 porting - page 20 - DryOS Development - CHDK Forum

G11 porting

  • 530 Replies
  • 252022 Views
*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #190 on: 05 / January / 2010, 13:03:31 »
Advertisements
The colors are looking not so good, i think the palette data needs to be updated.

*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #191 on: 05 / January / 2010, 13:06:56 »
Calendar is also so working.
The scripting does not seems to work, if i select a file it crashes the camera.
Or a try to show the memory usage also switches of the camera.
So a little more finetuning is needed i think.  ::)

Re: G11 porting
« Reply #192 on: 05 / January / 2010, 13:08:47 »
Looks good !

Oh no, not yet another palette needed  ... could you post the playback  palette as well for future reference ?

You will need it anyway.

« Last Edit: 05 / January / 2010, 13:15:36 by Microfunguy »

*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #193 on: 05 / January / 2010, 14:56:01 »
The above palette schreenshot is the playback palette.
Here comes the screenshot for livemode:

Re: G11 porting
« Reply #194 on: 05 / January / 2010, 15:00:56 »
Yes, that is a decent palette range with some good primary colours.

Some recent cameras, like the IXUS100, have palettes with quite a poor colour range, especially in playback.

It will soon be time to enable the image-capture task !




*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #195 on: 05 / January / 2010, 17:33:24 »
Code: [Select]
static void conf_change_menu_rbf_file() {
// if (!rbf_load(conf.menu_rbf_file))
        rbf_load_from_8x16(current_font);
    rbf_set_codepage(FONT_CP_WIN);
}


I now got also this function "not chrashing", by adding a "empty string" check:

Code: [Select]
int rbf_load(char *file) {

    int fd;
    char buf[8];
    int i;

    if (file[0] == 0) {           <---------- Added check to avoid crash in open().
        return 0;
    }

    fd = open(file, O_RDONLY, 0777);
    if (fd>=0 && read(fd, &buf, 8)==8 /* Magic number */ && memcmp(&buf, RBF_HDR_MAGIC, 8)==0) {

        read(fd, &rbf_font.name, RBF_MAX_NAME);

To avoid the 100% crash in the "memory usage" gui, i have to remove the second alloc/free while loop:
Code: [Select]
void gui_show_memory_info(int arg) {
    static char buf[64];
    int size, l_size, d;
    char* ptr;
    size = 16;

    while (1) {
        ptr= malloc(size);
        if (ptr) {
            free(ptr);
            size <<= 1;
        } else
            break;
    }
#if 0             <----------- disabled second while loop
    l_size = size;
    size >>= 1;
    d=1024;
    while (d) {
        ptr = malloc(size);
        if (ptr) {
            free(ptr);
            d = l_size-size;
            if (d<0) d=-d;
            l_size = size;
            size += d>>1;
        } else {
            d = size-l_size;
            if (d<0) d=-d;
            l_size = size;
            size -= d>>1;
        }
#endf       
    }


    sprintf(buf, lang_str(LANG_MSG_MEMORY_INFO_TEXT), size-1,MEMISOSIZE,&_start,&_end);
    gui_mbox_init(LANG_MSG_MEMORY_INFO_TITLE, (int)buf, MBOX_FUNC_RESTORE|MBOX_TEXT_CENTER, NULL);
}

Re: G11 porting
« Reply #196 on: 05 / January / 2010, 17:57:41 »
So why have no other CHDK builds crashed in rbf_load() ?


*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #197 on: 05 / January / 2010, 18:18:41 »
Don`t know for sure. May be a compare of the open function from the G11 firmware with the firmware of a G9 or so can help to understand this problem.

Reyalp wrote earlier:
"DRYOS version 2.3, release #0039 <- this means it's probably like ixus200, sx20, with many functions different from earlier cameras.
"
So it is not impossible that the behaviour of the open function has changed, i simply dont know. All what i know for sure is, that the camera does not crashes&switch off anymore when this check is added.

*

Offline reyalp

  • ******
  • 14128
Re: G11 porting
« Reply #198 on: 05 / January / 2010, 22:00:30 »
Yes, this appears to be a "feature" of the r39 cams. It was mentioned in the ixus200/sd980 thread: http://chdk.setepontos.com/index.php/topic,4228.0.html

It may save you some effort if you have a look through that and Radups other posts on the subject.
Don't forget what the H stands for.

Re: G11 porting
« Reply #199 on: 06 / January / 2010, 05:21:41 »
Useful thread, with its mention that the IXUS200 should be a new reference camera.

Also interesting :  http://chdk.setepontos.com/index.php/topic,4228.msg41805.html#msg41805

 

Related Topics


SimplePortal © 2008-2014, SimplePortal