SX260 HS Porting Thread - page 6 - DryOS Development - CHDK Forum
supplierdeeply

SX260 HS Porting Thread

  • 642 Replies
  • 119755 Views
*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #50 on: 08 / April / 2012, 03:18:42 »
Advertisements
in boot.c going directly to   "B     sub_FF00000C\n"  dosn't work either so maybe there is some issue with the bin file?

*

Offline philmoz

  • *****
  • 3156
    • Photos
Re: SX260 HS Porting Thread
« Reply #51 on: 08 / April / 2012, 03:41:01 »
in boot.c going directly to   "B     sub_FF00000C\n"  dosn't work either so maybe there is some issue with the bin file?

If you are using auto boot that will result in an infinite loop as the camera will keep trying to boot diskboot.bin.

Try adding an led blinker to see if it's crashing or repeatedly loading diskboot.bin

Phil
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #52 on: 08 / April / 2012, 04:04:35 »
It dosn't blink either
Maybe I have brong the LED_PR     I'm using 0xC0223030

Also I dont Know If I have OK the copy_and_restart

Code: [Select]
//asm1989  - sx260 @ FF026FBC   
        asm volatile (
                 "LDR     R1, =0xC0200000\n"
                 "MVN     R0, #0\n"
                 "STR     R0, [R1,#0x10C]\n"
                 "STR     R0, [R1,#0xC]\n"
                 "STR     R0, [R1,#0x1C]\n"
                 "STR     R0, [R1,#0x2C]\n"
                 "STR     R0, [R1,#0x3C]\n"
                 "STR     R0, [R1,#0x4C]\n"
                 "STR     R0, [R1,#0x5C]\n"
                 "STR     R0, [R1,#0x6C]\n"
                 "STR     R0, [R1,#0x7C]\n"
                 "STR     R0, [R1,#0x8C]\n"
                 "STR     R0, [R1,#0x9C]\n"
                 "STR     R0, [R1,#0xAC]\n"
                 "STR     R0, [R1,#0xBC]\n"
                 "STR     R0, [R1,#0xCC]\n"
                 "STR     R0, [R1,#0xDC]\n"
                 "STR     R0, [R1,#0xEC]\n"
                 "CMP     R4, #7\n"
                 "STR     R0, [R1,#0xFC]\n"
                //"LDMEQFD SP!, {R4,PC}\n"   // asm1989 like sx40 ?
                 "MOV     R0, #0x78\n"
                 "MCR     p15, 0, R0,c1,c0\n"
                 "MOV     R0, #0\n"
                 "MCR     p15, 0, R0,c7,c10, 4\n"
                 "MCR     p15, 0, R0,c7,c5\n"
                 "MCR     p15, 0, R0,c7,c6\n"
                 "MOV     R0, #0x80000006\n"
                 "MCR     p15, 0, R0,c9,c1\n"
                 "MCR     p15, 0, R0,c9,c1, 1\n"
                 "MRC     p15, 0, R0,c1,c0\n"
                 "ORR     R0, R0, #0x50000\n"
                 "MCR     p15, 0, R0,c1,c0\n"
                 "LDR     R0, =0x12345678\n"
                 "MOV     R1, #0x80000000\n"
                 "STR     R0, [R1,#0xFFC]\n"
                 "MOV     R0, %0\n"  //new jump-vector
                // "LDMFD   SP!, {R4,LR}\n"  // asm1989 like sx40 ?
                 "BX      R0\n"
                 : : "r"(dst_void) : "memory","r0","r1","r2","r3","r4"
);

        while(1);
}


*

Offline c10ud

  • ***
  • 245
Re: SX260 HS Porting Thread
« Reply #53 on: 08 / April / 2012, 06:43:42 »
A quick list of things to check, based on my personal porting experience:
1) check copy and restart
2) check led address and how you're powering it on (e.g. see first post in s100 porting thread and how sx40/s100 does it)
3) don't override (yet) the powering-on procedure
4) make sure to comment out the right sub for diskboot.bin load


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #54 on: 08 / April / 2012, 07:39:02 »
@c10ud
Thanks for your tips, I will try them

I used sx230 as a startpoint, but I see know more simillarities with sx40 and for sure s100


Re: SX260 HS Porting Thread
« Reply #55 on: 08 / April / 2012, 08:52:53 »
I used sx230 as a startpoint, but I see know more simillarities with sx40 and for sure s100
Its usually best to look at cameras released on the same data as yours (Feb7 2012).   However, none of those have been ported yet so the sx40 and s100 are the next closest cameras that actually have a port available (Sept 15, 2011).   The sx 230 was released exactly one year before the sx240, on Feb 7 2011.

Source of release dates for reference : dpreview timelines
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #56 on: 08 / April / 2012, 09:06:16 »
Yes, we have no camera yet of the same release date.

Looking at LED Address If I trace the same functions as in S100 & sx40
It leads me to a value like  0x83DC00     @FF1473B0

Its possible that its not a 0xC0......  like in other cams?

*

Offline srsa_4c

  • ******
  • 4228
Re: SX260 HS Porting Thread
« Reply #57 on: 08 / April / 2012, 09:19:38 »
Its possible that its not a 0xC0......  like in other cams?
Look at this and the followup posts: http://chdk.setepontos.com/index.php?topic=7889.msg83471#msg83471


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #58 on: 08 / April / 2012, 10:26:34 »
@srsa_4c
yes looks like its something of 0xC0....

but looking at the code there are no similarities between the Led stuff
sx260 vs sx230
sx260 vs sx40 or s100

It's a bit puzzling, any follow-up to look at a bigger picture and trace back where this led pointer should be used?

I'm  mainly with Leddrv_c , any other clue?


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #59 on: 08 / April / 2012, 11:34:09 »
If I write the original code at resetcode\main.c  it should load the original firmware ?
asm volatile (
                 "LDR     R1, =0xC0200000\n"
                 "MVN     R0, #0\n"
.....

and dont use the new jump-vector

Since I'm not able to find/ use the led stuff, I'm trying to see where it fails,
In canonbasic it looks like load the firmware and hangs.

Is there any other way to test it?

 

Related Topics