ELPH300HS aka IXUS220HS - Porting Thread - page 14 - DryOS Development - CHDK Forum

ELPH300HS aka IXUS220HS - Porting Thread

  • 899 Replies
  • 399455 Views
*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #130 on: 19 / November / 2011, 05:12:31 »
Advertisements
- get a disassembler going.  I'm looking at the alternatives to IDA since I can't purchase that.
You may also have a look to PEL's ARMu:  http://pel.hu/armu/

Quote
What start address did the Canon BASIC script report ?  ( FFC00000, FF810000, FF000000) ?
is this something that is displayed on the screen?  Because due to the black screen I can't see anything.
Using a cBasic dumper script like the one from the wikia, there should be a file named CBDUMPER.LOG with the start address on the SD card...
« Last Edit: 19 / November / 2011, 05:41:42 by fe50 »

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #131 on: 19 / November / 2011, 05:59:57 »
Because I had much problems to get my CHDK environment running during the last weeks, I started again today and wrote down every step I did. And finally I got my CHDK environment working. :)

Hopefully my description helps others to setup their CHDK environment as well to start porting for IXUS220HS soon.

I use CHDK-Shell-v338.exe on Windows 7 64Bit
My Camera Firmware version is: 100c
SX220HS was used as basis for my environment setup.

What I did until now:
- get CHDK Trunk revision 1418 (trunk1418 is the root folder of all below paths) 
- copy /loader/sx220hs to /loader/ixus220_elph300hs
- copy /platform/sx220hs to /platform/ixus220_elph300hs
- delete /platform/ixus220_elph300hs/sub/101a
- delete /platform/ixus220_elph300hs/sub/101b
- rename /platform/ixus220_elph300hs/sub/100a to /platform/ixus220_elph300hs/sub/100c
- delete /platform/ixus220_elph300hs/sub/100c/stubs_entry.S
- copy PRIMARY.BIN (100c Firmware) to /platform/ixus220_elph300hs/sub/100c/
- change PLATFORMID to PLATFORMID=12841 in line 6 of file /platform/ixus220_elph300hs/sub/100c/makefile.inc
- change ROMBASEADDR to 0xFF810000 in line 19 of file /platform/ixus220_elph300hs/sub/100c/makefile.inc
- add entry "ixus220_elph300hs,100c,ALPHA,," in line 66 to file /camera_list.csv
- add entry " || defined(CAMERA_ixus220_elph300hs)" at end of line 1265 (where sx220hs is also handled) in file /core/gui.c
- add entry " || defined(CAMERA_ixus220_elph300hs)" at end of line 105 in file /core/kbd.c
- changed all "task_RotaryEncoder" entries to "task_PhySw" in file /platform/ixus220_elph300hs/sub/100c/boot.c

After Start of CHDK-Shell-v338.exe I can mark the ixus220_elph300hs entry for compilation and start compilation.

Compilation generates stubs_entry (with size of 18 KB) and stops with following message:
========== D:\CHDK\TRUNK\TRUNK1418\BIN\LOGS\ERR-IXUS220_ELPH300HS-100C.TXT ==========

Time to generate stubs 16.35 seconds

After compilation the following files are available in the /bin folder:
ixus220_elph300hs-100c-0.9.9-r1418.zip (208 KB)
ixus220_elph300hs-100c-0.9.9-r1418-full.zip (576 KB)

Looks good, doesn't it?  8)

« Last Edit: 19 / November / 2011, 08:50:44 by tommi2water »

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #132 on: 19 / November / 2011, 09:15:20 »
Ideally everything specific to the camera should be in the platform files; but there are a few things that are still sprinkled across the core source files.
For a new port,  I think the only file  that needs to be changed in core source files is core/kbd.c - where you need to set  nTxtbl and ZSTEP_TABLE_SIZE

You can put just about anything in there - its only used by the USB_remote code to control the zoom lens if that option is selected.  I'm looking at that code this week again - I'm not even sure it works on current cameras so don't spend too much time worrying about getting the correct values there.

more discussion here : http://chdk.setepontos.com/index.php?topic=6528.msg69252#msg69252
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline sush

  • *
  • 29
  • ixus220 300hs firmware 1.01c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #133 on: 19 / November / 2011, 09:42:04 »
Quote
Using a cBasic dumper script like the one from the wikia, there should be a file named CBDUMPER.LOG with the start address on the SD card...

I just added some colour code to extend.m and was able to see the start address on the screen after that.


Quote
Hopefully my description helps others to setup their CHDK environment as well to start porting for IXUS220HS soon.

Indeed, it did help!  I had already done some of those steps but made a few more as per your list.  The only thing I have not changed yet is the RotaryEncoder part since I have not spent time yet to understand it.

Quote
You can put just about anything in there - its only used by the USB_remote code to control the zoom lens if that option is selected.  I'm looking at that code this week again - I'm not even sure it works on current cameras so don't spend too much time worrying about getting the correct values there.

good to know!

Quote
Try deleting the empty stubs_entry.S file to force it to be recreated.

This did the trick!  It is being generated and populated now.

Thanks for the help, folks!


« Last Edit: 19 / November / 2011, 09:47:29 by sush »


*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #134 on: 19 / November / 2011, 09:46:05 »

Indeed, it did help!  I had already done some of those steps but made a few more as per you list.  The only thing I have not changed yet is the RotaryEncoder part since I have not spent time yet to understand it.

I'm not sure what RotaryEncoder is for. Therefore it's possible that this change was not correct. Maybe someone else knows?

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #135 on: 19 / November / 2011, 11:09:01 »
I'm not sure what RotaryEncoder is for. Therefore it's possible that this change was not correct. Maybe someone else knows?
Some cameras have a rotary dial on the back that surrounds the up/down/left/right/set buttons - lets you scroll through pictures and menus without pressing the left/right or up/down buttons.

A quick look at the IXUS220 shows the camera does not have such a dial.  So you can delete the rotary encoder code and not start the rotary encoder task.
« Last Edit: 19 / November / 2011, 11:11:20 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #136 on: 19 / November / 2011, 12:27:21 »
Ah, ok. Thanks for the information!

I attach here my current folder structure inside CHDK Trunk revision 1418 for Firmware 100c of Ixus220HS.

Maybe this will let additional people start with some porting activities.

Only PRIMARY.BIN file is missing in this ZIP-File. You have to add it by yourself into folder "platform\ixus220_elph300hs\sub\100c"


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #137 on: 19 / November / 2011, 13:58:27 »

Indeed, it did help!  I had already done some of those steps but made a few more as per you list.  The only thing I have not changed yet is the RotaryEncoder part since I have not spent time yet to understand it.

I'm not sure what RotaryEncoder is for. Therefore it's possible that this change was not correct. Maybe someone else knows?


The task_RotaryEncoder stuff is for cameras with a rear dial/wheel around the Func/Set and buttons.
The IXUS220 doesn't have this so you can delete all the related code from boot.c.

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)
  g7x2 (1.01a, 1.01b, 1.10b)


Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #138 on: 19 / November / 2011, 14:53:01 »
@philmoz :   is there an echo in here ?  :P
« Last Edit: 19 / November / 2011, 15:18:43 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #139 on: 19 / November / 2011, 14:56:07 »
 :D

 

Related Topics