PowerShot SX210 IS - Porting Thread - page 16 - General Discussion and Assistance - CHDK Forum

PowerShot SX210 IS - Porting Thread

  • 589 Replies
  • 322882 Views
*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #150 on: 26 / August / 2010, 13:25:44 »
Advertisements
looks like the problem is with strlen
I include it in stubs_entry_2.S as:

NSTUB(strlen, 0xff814030)

but keeps hanging,

I get the address from eventproc_export_strlen , so looks right

any clue?

*

Offline reyalp

  • ******
  • 14128
Re: PowerShot SX210 IS - Porting Thread
« Reply #151 on: 26 / August / 2010, 13:47:14 »
you can easily implement your own strlen and see if that fixes the problem. However, I would guess it's a problem with whatever is being passed to strlen rather than the function itself.

Don't forget what the H stands for.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #152 on: 26 / August / 2010, 13:56:16 »
yes it quite strange,

I get pass this one creating another function for this:
Code: [Select]
int strlen2(char *s)
{
    int x=0;
    while (*s++)
        x++;
    return(x);
}

*

Offline reyalp

  • ******
  • 14128
Re: PowerShot SX210 IS - Porting Thread
« Reply #153 on: 26 / August / 2010, 16:36:36 »
NSTUB(strlen, 0xff814030)

Oops, missed this the first time around.
You must use NHSTUB in stubs_entry_2.S otherwise you can't be sure it will override whats in stubs_entry.S
Don't forget what the H stands for.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #154 on: 26 / August / 2010, 17:31:15 »
Thank seem like this is the problem, I get a wrong detected address in stubs_entry.S, If I disable the generation an change it in stubs_entry.S it works,

In stubs_entry_2.S the name is the same or I should change anything?

NHSTUB(strlen, 0xff814030)

*

Offline reyalp

  • ******
  • 14128
Re: PowerShot SX210 IS - Porting Thread
« Reply #155 on: 26 / August / 2010, 17:45:27 »
Just use NHSTUB instead of NSTUB
Don't forget what the H stands for.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #156 on: 26 / August / 2010, 17:54:32 »
but it only works if I included these two:
NHSTUB(strlen, 0xff814030)
NHSTUB(Strlen, 0xff814030)


*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: PowerShot SX210 IS - Porting Thread
« Reply #157 on: 26 / August / 2010, 18:54:45 »
but it only works if I included these two:
NHSTUB(strlen, 0xff814030)
NHSTUB(Strlen, 0xff814030)
I've seen this on some stubs myself. You habe to look closely, sometimes foobaa and Foobaa pointing to the same addresse, sometime to different addresses in stubs_entry....S
For example lseek and Lseek point to the same address on A720.

*

Offline reyalp

  • ******
  • 14128
Re: PowerShot SX210 IS - Porting Thread
« Reply #158 on: 26 / August / 2010, 19:05:03 »
but it only works if I included these two:
NHSTUB(strlen, 0xff814030)
NHSTUB(Strlen, 0xff814030)
This sounds like a mistake somewhere (not necessarily by you ;)). Some functions have variants with different capitalization, e.g. Open and open, but there should only be strlen anywhere, AFAIK. I see no mention Strlen anywhere in the CHDK code.

Possibly a tool chain issue could cause this, I guess...
Don't forget what the H stands for.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #159 on: 27 / August / 2010, 05:02:31 »
I'm still trying to find all the missing funcs

I get stuck with the conf_load_defaults();

for example it crashes if
CONF_INFO( 66, conf.menu_rbf_file,          CONF_DEF_PTR,   ptr:"", conf_change_menu_rbf_file),

bat It dosnt If I include a dummy file
CONF_INFO( 66, conf.menu_rbf_file,          CONF_DEF_PTR,   ptr:"A/README.TXT", conf_change_menu_rbf_file),

maybe I have a wrong opendir, or what else ?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal