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

ELPH300HS aka IXUS220HS - Porting Thread

  • 899 Replies
  • 399454 Views
*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #170 on: 23 / November / 2011, 15:26:44 »
Advertisements
This code was also already executed:

Code: [Select]
void spytask(long ua, long ub, long uc, long ud, long ue, long uf)
{
    core_spytask();
}

It seems that I'm on the right way.  :)


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #171 on: 23 / November / 2011, 16:12:23 »
Getting there :)

I haven't looked at the code in detail; but I noticed a couple of things in boot.c.

First you should get rid of everything related to the touch screen - this is unique to the IXUS 310 so you won't need it.

The line:
   *(int*)(0x2638) = (*(int*)0xC0220130)&1 ? 0x200000 : 0x100000;
should be
   *(int*)(0x25F4) = (*(int*)0xC0220130)&1 ? 0x200000 : 0x100000;

I would also move the call to CreateTask_spytask to just before taskcreatePhySw_my.

Finally in stubs_entry_2.S you have a bunch of values at the end pointing to a 'NULL' function; but you are using an address that is not in the firmware for your camera. I would delete everything from line 165 down in this file and re-compile. If there are any undefined functions add just those back pointing a valid function in the firmware (look for a function that just does a 'BX LR' instruction).

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)

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #172 on: 23 / November / 2011, 16:56:47 »
I did the changes you proposed. Thanks for that.  :)

In addition I commented out the taskcreatePhySw_my call to avoid creation of mykbd_task (advise from reyalp from #chdk irc channel).

Code: [Select]
"BL      CreateTask_spytask\n"    //added
//"BL      sub_FF8349EC\n" //taskcreate_PhySw()
//"BL   taskcreatePhySw_my\n"  //patched

Result:
After start of DISKBOOT.BIN the lens comes out and for a short moment the display gets active and I can see the Canon HS-System logo. Then camera switches off with lens outside. Camera can be switched on again immediately and lens goes back into camera. ;)

More investigations tomorrow, now I have to get some sleep before going to work early in the morning.  :)

« Last Edit: 23 / November / 2011, 16:58:41 by tommi2water »

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #173 on: 23 / November / 2011, 17:23:55 »
A couple more things I noticed.

in sub/100c/lib.c:
- vid_get_viewport_fb is wrong, the correct value is shown in stubs_entry.S, copy it from there.
- same for camera_jpeg_count_str

in lib.c:
- the vid_get_XXX functions are probably wrong, these are from the IXUS 310 which has a 16:9 widescreen LCD. Look at the SX30 which would probably be a closer match.
- the vid_bitmap_refresh function is calling _LockAndRefresh and _UnlockAndRefresh. These aren't found automatically and the values you have defined in stubs_entry_2.S are from another camera (the addresses are not in the firmware). This is probably the cause of the crash. Try using _ScreenLock and _ScreenUnlock instead (see the SX30 port).

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 #174 on: 23 / November / 2011, 17:48:17 »
Hi, I just got an ELPH 300 HS to shoot with when I don't feel like lugging my 60D kit around.  I love the portability, but I have a hard time adapting to the lack of functionality.  So I'd like to contribute to the CHDK port.  I'm well versed in C and have done some microcontroller development (such as an ATMEGA48-based intervalometer for my 60D :D).  Not experienced with ARM assembly (though I have done x86, MIPS, and z80, so I think I could pick it up).

I was wondering if there's some place I could start poking around without duplicating others' efforts.  I've got the environment downloaded and set up, and have built the ELPH 500HS port.

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #175 on: 23 / November / 2011, 17:57:46 »
I was wondering if there's some place I could start poking around without duplicating others' efforts.  I've got the environment downloaded and set up, and have built the ELPH 500HS port.
There's an old saying "It never rains,  it pours."  I don't think I've seen a port in recent years with two active developer's - never mind three !

Welcome on board. Even once there is a port that runs, there is lots of work to do.  The files in the platform subdirectory called shooting.c,  main.c and lib.c all have things that need to be tweaked for each specific camera. I'm sure you guys can work out a way to split up the effort.  And there will probably also be different firmware versions to worry about.




Ported :   A1200    SD940   G10    Powershot N    G16

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #176 on: 24 / November / 2011, 00:07:24 »
Speaking of firmware versions - I finally figured out how to tell which I have: 1.01a.

Since the other two devs in this thread have 1.01c, and there does not seem to be a firmware upgrade available from Canon, I imagine I've got to start from the beginning anyhow.  So no worries about duplicating efforts...

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #177 on: 24 / November / 2011, 00:17:41 »
Since the other two devs in this thread have 1.01c, and there does not seem to be a firmware upgrade available from Canon, I imagine I've got to start from the beginning anyhow.  So no worries about duplicating efforts...
Take a look at CHDK-PT .  I might be accused of a bias here, but it could also save you some time.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline sush

  • *
  • 29
  • ixus220 300hs firmware 1.01c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #178 on: 24 / November / 2011, 00:39:12 »
Welcome to the gang, jstanely0.

Tommi is using firmware 1.00c and I have 1.01c

Tommi seems to be making some progress but I am pretty much stuck at:

Quote
Functions entered:
boot()
sub_FF810358_my()
sub_FF8111B0_my()

Functions that are currently not entered yet:
sub_FF815EE0_my()
taskcreate_Startup_my()
task_Startup_my()
taskcreatePhySw_my()
« Last Edit: 24 / November / 2011, 00:44:50 by sush »

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #179 on: 24 / November / 2011, 03:21:05 »
Thanks for all the good Tips, Phil! I will try them this afternoon when I'm back from work.

Welcome jstanley! :-)

@Sush: I had the same Problem like you now have. Take a look at the new loader stuff I attached yesterday and give it a try.

 

Related Topics