ELPH300HS aka IXUS220HS - Porting Thread - page 16 - DryOS Development - CHDK Forum supplierdeeply

ELPH300HS aka IXUS220HS - Porting Thread

  • 899 Replies
  • 417940 Views
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #150 on: 20 / November / 2011, 17:13:29 »
Advertisements
I probably should have asked this before,  but what are you using for a reference port ?   

[Edit :  reading back.  you used the sx220 - also released on the same date as your camera.]


I see that the ixus310_elph500hs has a port released and that camera came out on the same date as yours. The code around the spot where you are having issues is similiar to yours but implemented differently.  Or did you already figure that one out ?

« Last Edit: 20 / November / 2011, 17:28:37 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline sush

  • *
  • 29
  • ixus220 300hs firmware 1.01c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #151 on: 20 / November / 2011, 19:22:45 »
been away for a chunk of the weekend but back now -

my progress to date:
- stubs_entry.S is being generated
- I have deleted just about all the code in stubs_entry_2.S because I figure it was for the sx220 anyway.  I only kept a few lines to get the compilation to proceed
- DISKBOOT.BIN generated but not tested

I have a bit of catching up to do to get to the same stage as tommi2water!

update:

- tried to load DISKBOOT.BIN from the camera - black screen and frozen
- inserted the same LED flashing code that tommi2water has (thanks for the file!) and tried again
- was able to flash the front and back LEDs!


« Last Edit: 20 / November / 2011, 22:31:35 by sush »

*

Offline funnel

  • ****
  • 349
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #152 on: 21 / November / 2011, 08:24:15 »
Thanks, I understand that using loops will probably have big influence on timing or generate other issues. Lessons learned: No more loops. ;)

I also tried to avoid register conflicts and I was able to reach code line 263 in attached boot.c.

But function sub_FF815EE0_my() seems not to be reached. Maybe this has to do with call of sub_FFC034C4?

@Sush, how about you? Any progress on your side?

BR,
tommi




Your camera rom base address is FF810000. In your boot.c all loc_s are named wrong, all starting with FFC00000. Fix all addresses by hand or use chdk_pt tool to generate them for you.



Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #153 on: 21 / November / 2011, 09:00:21 »
Your camera rom base address is FF810000. In your boot.c all loc_s are named wrong, all starting with FFC00000. Fix all addresses by hand or use chdk_pt tool to generate them for you.
It doesn't really matter what names are used for those loc_ labels as long as the source and destination match. 

However, using the actual addresses from your ROM is pretty much "standard practice" for CHDK ports and makes it easier to reference things back to the original code.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #154 on: 21 / November / 2011, 09:22:41 »
Thanks Guys!  :)

I was completely wrong when I compared boot.c to disassembled code because I imported PRIMARY.BIN with wrong base address 0xFFC00000 into disassembler and not with correct address 0xFF810000. I was just following the DryOS Porting Guide without any thinking. :D

Therefore I tried to call some 0xFFC0-addresses from my changed boot.c. :(

I will change base address in disassembler to correct address and start again comparing boot.c content to disassembled code.



Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #155 on: 21 / November / 2011, 09:40:47 »
I was completely wrong when I compared boot.c to disassembled code because I imported PRIMARY.BIN with wrong base address 0xFFC00000 into disassembler and not with correct address 0xFF810000. I was just following the DryOS Porting Guide without any thinking. :D
Are you using CHDK-PT ?  It produced output in "C" compatable format, saving you the trouble for converting it from the standard output format of most dissassemblers.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #156 on: 21 / November / 2011, 09:42:36 »
Not yet, will download and take a look at it. :)

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #157 on: 21 / November / 2011, 11:31:03 »
Wow, with CHDK-PT it was quick and easy to get some output in good format. Comparison with my boot.c was very easy now.  :)

But I'm still not able to execute function sub_FF815EE0_my(). LED-Debug at the beginning of this function seems not to be executed.

I added additional functions (sub_FF8134C4_my + sub_FF816810_my) from ROM to my boot.c and added LED-Debug to them to see where execution stops, but at the moment I have no idea. They seem to be executed fine.

My last version of boot.c and some CHDK-PT output files are attached to this message.

Any ideas?



Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #158 on: 21 / November / 2011, 11:43:29 »
Did you take a look at the boot.c code for the  ixus310_elph500hs ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #159 on: 21 / November / 2011, 11:49:20 »
Yes, I looked into it, thanks for the hint.

What I found out is, that they just branch back to the original ROM instead of executing the same five instructions from their boot.c file after they did the "LDR     R1, =sub_FF815EE0_my" instruction.

I tried the same as you can see in line 275 "B      sub_FF81124C" of my latest boot.c file, but I didn't recognize a different behaviour. So I returned to original implementation.



 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal