SD980 port - page 16 - DryOS Development - CHDK Forum

SD980 port

  • 169 Replies
  • 64434 Views
*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #150 on: 19 / October / 2009, 20:39:13 »
Advertisements
The "A" thing is still needed, and this is the code that needs to be modified:
http://chdk.setepontos.com/index.php/topic,4228.msg41802.html#msg41802

If it doesn't work with other cameras, then I guess we can #ifdef it.
What it affects is mainly the file browser, when the root directory must be shown. it should have no effect on other directories.

Regarding the define name, CAM_DRYOS_2_3 would be better I think, assuming Canon won't change that structure at every revision :D I can use that to also #ifdef the LUA stuff.

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #151 on: 19 / October / 2009, 20:42:05 »
One more thing, can you please add:
if(name[0]!='A')return -1;//on the SD980, it will crash if a file path doesn't start with A
right before return _Open(name, flags, mode); in the /platform/generic/wrappers.c ?

*

Offline reyalp

  • ******
  • 14126
Re: SD980 port
« Reply #152 on: 19 / October / 2009, 20:42:56 »
Regarding the define name, CAM_DRYOS_2_3 would be better I think, assuming Canon won't change that structure at every revision :D I can use that to also #ifdef the LUA stuff.
Every dryos cam to date is version 2.3.
Don't forget what the H stands for.

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #153 on: 19 / October / 2009, 21:34:11 »
Ok, I made the following modification in stdlib.h like this:

Code: [Select]
#ifndef CAM_DRYOS_2_3_R39
struct stat
    {
    unsigned long st_dev; //?
    unsigned long st_ino; //?
    unsigned short st_mode; //?
    short st_nlink; //?
    short st_uid; //?
    short st_gid; //?
    unsigned long st_atime; //?
    unsigned long st_mtime; //?
    unsigned long st_ctime; //?
    unsigned long st_size;
    long st_blksize; //?
    long st_blocks; //?
    unsigned char st_attrib;
    int reserved1; //
    int reserved2; //
    int reserved3; //
    int reserved4; //
    int reserved5; //
    int reserved6; //
};

#else
struct stat
    {
    unsigned long st_unknown_1;
    unsigned long st_attrib;
    unsigned long st_size;
    unsigned long st_ctime;
    unsigned long st_mtime;
    unsigned long st_unknown_2;
};
#endif//CAM_DRYOS_2_3_R39

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #154 on: 21 / October / 2009, 05:51:22 »
I was trying to get the bootdisk method to work (solve the infinite boot loop problem), so I looked for the SD power address. It turns out the address I had was right, same address as the SX10..
Maybe now Canon turns on the SD power earlier, preventing the boot?

*

Offline reyalp

  • ******
  • 14126
Re: SD980 port
« Reply #155 on: 21 / October / 2009, 18:20:18 »
I was trying to get the bootdisk method to work (solve the infinite boot loop problem), so I looked for the SD power address. It turns out the address I had was right, same address as the SX10..
Maybe now Canon turns on the SD power earlier, preventing the boot?
The boot loop isn't related to SD power. You need to skip the function that loads diskboot.

Quote from: sx10 101a boot.c
      //         "BL      sub_FF829A08\n"    // start diskboot.bin
Don't forget what the H stands for.

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #156 on: 21 / October / 2009, 21:04:42 »
I did that already too..
I will take a look at the SX10 code again, see if the task_Startup_my() functions are the same..

Anyway, what is the purpose of cutting off the SD power if not to prevent the boot loop?

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #157 on: 21 / October / 2009, 22:29:37 »
Well, it's kind of embarrassing, but I tried it again and it works now. I guess last time I tried I didn't get as far as boot.c with my implementation.

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #158 on: 22 / October / 2009, 01:09:33 »
It seems that UpdateMBROnFlash has dissapeared from the SD980, it was combined with some other function, so it's not a separate function anymore :/
SDWrite looks pretty similar with the SX10 version, but for some reason it does not work (freezes).

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #159 on: 23 / October / 2009, 02:06:39 »
Got the multipartition thing working now.
Will release new binaries in a few days.
90% of the stuff is done, and in a week or so it should be ready to be placed in the SVN, so long as my modifications to the core are tested and accepted.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal