SX200is Porting

  • 1105 Replies
  • 154098 Views
*

Offline OldGit

  • ****
  • 303
  • Publish
    Re: SX200is Porting
    « Reply #90 on: 28 / August / 2009, 08:55:08 »
    Advertisements
    tr1stan,
    thanks for that, we have those but it's always good to get independent validation.

    By the way, be warned that kbd.c has a typo.
    volatile long *mmio2 = (void*)0xF050; should be 0xF060

    Have a good weekend.
    OldGit
    SX200 IS-100C

    *

    Offline Darkness

    • **
    • 72
    • SX200IS 100D
  • Publish
    Re: SX200is Porting
    « Reply #91 on: 28 / August / 2009, 17:28:38 »
    OldGit, little question...

    in sub/100c/boot.c, how did you do this line?
    Code: [Select]
    *(int*)(0x24C0+4)= (*(int*)0xC0220128)&1 ? 0x1000000 : 0x2000000; // replacement of sub_FF821BD4 for correct power-on.I mean, how did you derive the values 0x24C0 and 0xC0220128?
    SX200IS 100D

  • Publish
    Re: SX200is Porting
    « Reply #92 on: 28 / August / 2009, 18:12:08 »
    I had the same question for the SD780 port and the answers I've found are here

    <IXUS 100 IS (Europe) / PowerShot SD780 IS - Porting Thread

    The SD990 port is very nicely documented...

    Harpo
    Canon Models - SD300, SD780, & SX210

    *

    Offline Darkness

    • **
    • 72
    • SX200IS 100D
  • Publish
    Re: SX200is Porting
    « Reply #93 on: 28 / August / 2009, 20:01:25 »
    Hi,

    just a small update on stubs_entry_2.s. I think i found PT_PlaySound at 0xFF86046C and
    platformsub_kbd_fetch_data at 0xFF848340.

    updated stubs_entry_2.s is attached...

    The addresses are from the 100D firmware but they are also correct for the 100C firmware.

    have fun
    tr1stan
    some additions to this from comparing with sx10 firmware:

    NHSTUB(WriteSDCard, 0xFF920CA4)
    NHSTUB(LEDDrive, 0xFF847614)
    NHSTUB(vsprintf, 0xFF81CBA0)
    NHSTUB(AllocateUncacheableMemory, 0xFF82780C)

    but please verify this.
    (also for 100D)

    edit: btw, I did not verify all code in movie_rec.c and capt_sec.c yet but at this point, when I start my sx200, the green led blinks, the sound plays and my own splash image shows up for a moment, then shuts down.

    So that address for playsound is verified to work  8)
    « Last Edit: 28 / August / 2009, 20:15:10 by Darkness »
    SX200IS 100D


    *

    Offline reyalp

    • ******
    • 9878
  • Publish
    Re: SX200is Porting
    « Reply #94 on: 28 / August / 2009, 20:48:15 »
    a bit from irc that may be helpful.
    Quote
    <[NW]reyalP> "edit: btw, I did not verify all code in movie_rec.c and capt_sec.c yet but at this point, when I start my sx200, the green led blinks, the sound plays and my own splash image shows up for a moment, then shuts down."
    <[NW]reyalP> you know you can run CHDK without trying to start those tasks, right ?
    <[NW]reyalP> that would be my approach, get it booting through boot.c, but just running all the default tasks
    <Darknesss> yeah, by removing the hooks
    <[NW]reyalP> then a simple task that just blinks an LED or something
    <[NW]reyalP> then try starting spytask
    <[NW]reyalP> etc
    <[NW]reyalP> once you have spytask and kbd, you can debug much more easily
    <Darknesss> what is spytask actually for?
    <[NW]reyalP> spytask runs all the CHDK ui
    <[NW]reyalP> and most of the other CHDK stuff
    <[NW]reyalP> kbd/physw_task runs input and script
    <Darknesss> ah, so once that is running, you should see something from chdk?
    <[NW]reyalP> yeah
    <Darknesss> ah, good to know :)
    <[NW]reyalP> and the capt_seq, movie_req etc are only needed for overrides/chdk features
    <[NW]reyalP> the CHDK ui will run fine without them
    <Darknesss> I see, then I guess I will disable them for now ;)
    <[NW]reyalP> and the disk stuff is only needed to support partition swapping etc
    <Darknesss> what is exp_drv_task for?
    <[NW]reyalP> extra long exposures
    <[NW]reyalP> also not needed
    Don't forget what the H stands for.

    *

    Offline OldGit

    • ****
    • 303
  • Publish
    Re: SX200is Porting
    « Reply #95 on: 29 / August / 2009, 01:37:39 »
    Hi, all
    We seem to be moving on this now, thanks to all for the info.
    I currently have all non essential tasks commented out and am working through conf.c in the core.
    This is because I get a shutdown when OPT_DEBUGGING is selected.
    This option seems to affect only the conf.c code.
    If the option is switched off - no shutdown!.

    Darkness,
    That line is what I came up with by reference to other ports and then finding the equivalent function in 100C code.
    (sub_FF821BD4)
    I use a number of ports for reference, not just one as canon seems to do things differently on some models.

    As I work on another PC + laptop in another room I am not on-line all the time, but I will check back and report any progress, good luck all and thanks again for the info and pointers.
    OldGit
    SX200 IS-100C

    *

    Offline OldGit

    • ****
    • 303
  • Publish
    Re: SX200is Porting
    « Reply #96 on: 29 / August / 2009, 04:31:19 »
    Hi Guys,
    After more testing the crash under OPT_DEBUGGING seems to be related to the buffer issue that is causing the splash problem.
    Anyone know how I can confirm the sizes in lib.c
    Think it's the sizes not the buffer address.
    I'll try adjusting and testing, but that seems hit and miss to me.

    All ideas welcome as always.
    Thanks, OldGit
    SX200 IS-100C

    *

    Offline OldGit

    • ****
    • 303
  • Publish
    Re: SX200is Porting
    « Reply #97 on: 29 / August / 2009, 04:32:53 »
    Sorry forgot, I found these
    // found at FF8E5F40                 LDR     R1, =0x10E   - height 270
    // found at FF8E5F44                 MOV     R0, #0x3C0   - width 960

    by ref to other ports
    SX200 IS-100C


    *

    Offline Darkness

    • **
    • 72
    • SX200IS 100D
  • Publish
    Re: SX200is Porting
    « Reply #98 on: 29 / August / 2009, 04:35:52 »
    I created a temporary SVN for our porting purposes. If you create an account at www.xp-dev.com, I can give you read or write access.


    OldGit,
    concerning that line
    Code: [Select]
    *(int*)(0x24C0+4)= (*(int*)0xC0220128)&1 ? 0x1000000 : 0x2000000;When comparing that to sx10, it has:
    Code: [Select]
    *(int*)(0x25BC+4)= (*(int*)0xC0220134)&1 ? 0x2000000 : 0x1000000;notice that the 0x1000000 and 0x2000000 are switched  :-X
    sx100 port has it like OldGit...
    SX200IS 100D

    *

    Offline OldGit

    • ****
    • 303
  • Publish
    Re: SX200is Porting
    « Reply #99 on: 29 / August / 2009, 04:54:55 »
    Darkness,
    I missed that,
    just tried switching them and the cam stays in play mode (via firmware update option) interesting!.
    SX200 IS-100C

     

    Related Topics