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

ELPH300HS aka IXUS220HS - Porting Thread

  • 899 Replies
  • 398856 Views
*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #250 on: 26 / November / 2011, 16:26:42 »
Advertisements
Strange, IrfanView tells me the image taken with CHDK has only 3 colors.

On the left in the attached screenshot you see information about image take with CHDK, on the right about image taken without CHDK running.


Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #251 on: 26 / November / 2011, 16:27:36 »
The new build won't start on 101a.  After I select "Firm Update", the lens pops out and the "HS System" splash screen comes up.  The chime sound starts playing, but is cut short.  The camera freezes.  I've left it for maybe 30 seconds with nothing happening.  Then I press the Power button and the camera turns off with the lens still extended.  Hitting it again, and it retracts and extends the lens again, and is ready to record with no CHDK loaded. 


Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #252 on: 26 / November / 2011, 16:30:02 »
Same thing here for 1.01a

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #253 on: 26 / November / 2011, 16:30:17 »
@waterwingz: RAW is already disabled, still somehow black pictures.
Turn the capt_seq.c tasks back off at the start of boot.c ?
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #254 on: 26 / November / 2011, 16:30:52 »
Try commenting out these lines in boot.c:

Code: [Select]
if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;

It was the first time that I activated them.


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #255 on: 26 / November / 2011, 16:33:58 »
Hmm, one new issue, the camera doesn't take correct photos any more if CHDK is running.  ;)

Intervalometer works, but photos are useless.



That would most likely be some mistakes in capt_seq.c.
In this file you are replicating the entire shooting task from the camera firmware in order to be able to modify it with CHDK functions.
Any mistakes here will cause problems with normal shooting - double check addresses, registers etc.

This one can be tricky to get right (as is the movie_rec.c stuff).
Best to leave out any CHDK specific code for now until you get it working with normal shooting.

You are doing really well - impressive effort.

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 philmoz

  • *****
  • 3450
    • Photos
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #256 on: 26 / November / 2011, 16:40:54 »
Try commenting out these lines in boot.c:

Code: [Select]
if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;

It was the first time that I activated them.



Each line in taskHook relates to a specific function that you are replacing from the firmware code.
Enable these lines only after you've converted the relevant function in the CHDK code for your camera - otherwise it will most likely crash or shutdown.

capt_seq_task - handles still shooting, override is in capt_seq.c
init_file_modules_task - handles notifying the spytask that CHDK is ready start and handles partitioned SD cards (found in boot.c)
movie_record_task - handles video shooting, override is in movie_rec.c
exp_drv_task - handles exposure calculations, override is in capt_seq.c

For your camera you probably don't need the SD partition handling code in init_file_modules_task as the camera should be able to boot from FAT32 cards. A minimal version of the override should still be added to keep the notification it sends to spytask (see the IXUS310 or SX40).

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 #257 on: 26 / November / 2011, 16:53:24 »

With this configuration pictures ok, but no intervalometer working:   ???
Code: [Select]
//if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
//if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
//if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
//if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;

With this configuration pictures ok, but no intervalometer working:   ???
Code: [Select]
//if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
//if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;

With this configuration Intervalometer working, but pictures wrong:   >:(
Code: [Select]
//if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;

With this configuration Intervalometer working, but pictures wrong:   >:(
Code: [Select]
if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;

With this configuration Intervalometer working AND pictures ok:   :)
Code: [Select]
if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
//if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;


So, I have to check the expDrv-Stuff.



Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #258 on: 26 / November / 2011, 16:58:35 »
This one can be tricky to get right (as is the movie_rec.c stuff).
Best to leave out any CHDK specific code for now until you get it working with normal shooting.

Let me see if I have the right strategy in mind here.

1. In the reference camera (sx220 in this case, iirc), find the original shooting tasks in the firmware and disassemble them.
2. Find the original shooting tasks in the ixus220/elph300 firmware, presumably because they'll look similar to the reference camera's.  Disassemble these too.
3. Take these tasks and plug them in to capt_seq.c.  We're effectively replacing the shooting tasks with identical ones, as a sanity check.  Shooting should continue to work normally, albeit without CHDK enhancements of course.
4. Diff the reference camera's original (disassembled) shooting tasks and the enhanced ones in the reference CHDK port.  Apply the differences to the code last used in step 3.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #259 on: 26 / November / 2011, 16:59:40 »

So, I have to check the expDrv-Stuff.


Sounds like it.

If you haven't converted movie_record_task yet, then don't enable that line or video recording may crash.

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)

 

Related Topics