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

ELPH300HS aka IXUS220HS - Porting Thread

  • 899 Replies
  • 427978 Views
*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #180 on: 24 / November / 2011, 11:53:59 »
Advertisements
I changed all items that Phil mentioned.

And in addition I took some more lines from ROM into boot.c to be able to comment out another nullsub-function.

And the result is:



 ::)

Still not running: the mykbd_task

But this screenshot means that the Spytask is already running, right?

btw: As you can see from the photo, I changed my used trunk to revision 1424.

It already created the CHDK folder structure on the SD-Card.  :)
« Last Edit: 24 / November / 2011, 12:05:51 by tommi2water »

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #181 on: 24 / November / 2011, 12:47:39 »
Nice work!

I've been diving into the docs and other ports, and my head is spinning.  I don't know where to begin. 

To get a feel for how ports differ by firmware version, I've been diffing sub folders in various ports.  In the 500HS, 100a vs 101a, a handful of addresses shifted forward by 0x18, leaving most of the code identical (then again, this isn't a complete port - the S2IS code changes a _lot_ more between firmware versions).


Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #182 on: 24 / November / 2011, 12:48:11 »
But this screenshot means that the Spytask is already running, right?

btw: As you can see from the photo, I changed my used trunk to revision 1424.

It already created the CHDK folder structure on the SD-Card.  :)


Correct - spytask draws that text box on the screen.   But the logo is missing.  Did you populate the CHDK folders - that's where the logo image is read from.    If so,  are you dual booting ?  The folders have to be on the larger partition if so.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #183 on: 24 / November / 2011, 12:56:00 »
To get a feel for how ports differ by firmware version, I've been diffing sub folders in various ports.  In the 500HS, 100a vs 101a, a handful of addresses shifted forward by 0x18, leaving most of the code identical (then again, this isn't a complete port - the S2IS code changes a _lot_ more between firmware versions).
You typically only have to change three files to port between firmware versions -  boot.c, capt_seq.c and movie_rec.c.   And you can use CHDK-PT to do most of the work with its "Convert Address List" button.

Changes in the other firmware specific files are pretty much all caught by the new signature generator so study the stubs_entry.S output file.  Its pretty good at pointing out discrepancies.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #184 on: 24 / November / 2011, 12:57:38 »
Currently no dual-booting in use.

And until now I didn't put CHDK folder content onto SDCard.

Now I tried with CHDK folder content and I can see the CHDK logo as well.

I will put my current code together in a zip file and provide here soon.

This could be used as basis for the ports of sush and jstanley. Then they should be able to easily change the files that they fit with their firmware version.

But still I have to figure out why I'm not able to start the mykbd_task.




Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #185 on: 24 / November / 2011, 13:15:51 »
But still I have to figure out why I'm not able to start the mykbd_task.
I'm having an amazing sense of "deja vu". All the way back to a long Saturday a couple of weeks ago spent on IRC with sgtrum and his sx150 port.  There is a nasty little bit of assembly code in the function wrap_kbd_p1_f() buried in the platform/kbd.c file that apparently has to be changed for some of the newer cameras.

Here's the resulting post
http://chdk.setepontos.com/index.php?topic=6953.msg75387#msg75387
Maybe this will save you some time.
« Last Edit: 24 / November / 2011, 13:19:56 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 #186 on: 24 / November / 2011, 13:19:00 »
Here I attached my current version which is for Firmware 1.00c and already starts the CHDK Spytask.

The kbd task is still not running. Therefore I commented out line 459 in boot.c and call the original taskcreate_PhySw function. Then camera starts up and I see the CHDK logo: Spytask is already running and camera can be used in a normal way. I think this is already a big step.  :)

btw: I didn't work on capt_seq.c and movie_rec.c.

To adapt this code to your version of firmware, you should first concentrate on boot.c and compare addresses of 1.00c firmware (http://www.box.com/shared/tscho3m30j/4/55272271/669226134) with addresses of your firmware.

I'm very interested if you get into the same problems of starting the kbd task.

Maybe we can solve the problem together. More people -> more creative ideas.  :D

Next I will check the "deja vu"-post.  ;)

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #187 on: 24 / November / 2011, 13:45:57 »
Hmm, wrap_kbd_p1_f() looks good.

Code: [Select]
from platform/kbd.c:
" STMFD   SP!, {R1-R7,LR}\n"       //SX220 modified
" MOV     R5, #0\n"
// " BL      _kbd_read_keys\n"       // replaces kbd_fetch_data()
" BL      my_kbd_read_keys\n"     // +
" B       _kbd_p1_f_cont\n"       // continue

-----------------------------------------------

from firmware 1.00c:
FF834E94 " STMFD SP!, {R1-R7,LR} \n"               
FF834E98 " MOV R5, #0 \n"                           
FF834E9C " BL sub_FF834E18 \n"                // address equal to kbd_read_keys from stubs_entry.S     
FF834EA0 " LDR R2, =0x3418C \n"                 // address equal to kbd_p1_f_cont from stubs_entry.S
     

That is still one file which I took from SX220HS, because IXUS310 had many touch_screen stuff inside.


*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #188 on: 24 / November / 2011, 15:32:53 »
Puuuh, it seems I got it.  :)

I had to change in platform/kbd.c:

from: _SleepTask(*((int*)(0x1c40+0x8)));//10);
to:     _SleepTask(*((int*)(0x1c3C+0x8)));//10);

Now mykbd_task should be running.

Can I make keypresses visible on screen to find out which keymapping I have to use?

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #189 on: 24 / November / 2011, 15:50:05 »
Wow!  Great to see progress in this thread.

How do you determine the firmware revision?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal