S110 Porting thread - page 5 - DryOS Development - CHDK Forum supplierdeeply

S110 Porting thread

  • 87 Replies
  • 31335 Views
*

Offline c10ud

  • ***
  • 245
Re: S110 Porting thread
« Reply #40 on: 26 / February / 2013, 06:52:22 »
Advertisements
@Nikon :
@c10ud :

Its been a few weeks.   Do either of you plan to submit this as a patch file to add to the svn site and (someday) the autobuild?

I suppose I could extract it from the github myself and make the patch but I have no idea about the completeness of the code posted there.



Hello, unfortunately I have been very busy and couldn't go further in helping with the port (remember I don't have the camera).

At the moment it seems that CHDK is booting ok but I didn't implement task overriding yet (also it is currently unknown if we can override tasks "the old way" or we need to follow SX50's advice..).

If you want I can give you the current patch (a digest of git commits), but as I said it's quite incomplete..

*

Offline Nikon

  • *
  • 25
Re: S110 Porting thread
« Reply #41 on: 26 / February / 2013, 07:36:51 »
I have tried to look into what still needs to be done, but I am lacking a decent disassembler (and in-depth knowledge of how CHDK is supposed to work).
The CHDK wiki seems to suggest the use of IDA Pro, which costs a bit of money.

Things like the on-screen menus, remote triggering, and scripts are working.
The port is definitely in a very useable (but somewhat incomplete) state.

*

Offline srsa_4c

  • ******
  • 4031
Re: S110 Porting thread
« Reply #42 on: 26 / February / 2013, 09:48:45 »
I have tried to look into what still needs to be done, but I am lacking a decent disassembler (and in-depth knowledge of how CHDK is supposed to work).
You don't need to know CHDK in depth for a successful port.
Quote
The CHDK wiki seems to suggest the use of IDA Pro, which costs a bit of money.
You don't need IDA for porting. If the firmware you're working on is sufficiently similar to (some) other models for which there is already a CHDK port, all you need is
- http://chdk.wikia.com/wiki/GPL_Tools, especially http://chdk.wikia.com/wiki/GPL:disassemble.pl
- CHDK-PT

My method is:
platform/<camera>/sub/<revision>/
stubs_min.S -> correct every address that doesn't appear (or is wrong) in stubs_entry.S
stubs_entry_2.S -> correct every address that doesn't appear (or is wrong) in stubs_entry.S

lib.c -> locate equivalent addresses (stubs_entry.S may already have them)

boot.c -> most of this is already done, you will need the SX50 method to start tasks

capt_seq.c, movie_rec.c -> locate equivalent routines in your firmware, make the same changes (unless there is functional change). Be aware that routines (and the used registers) may change slightly. For best results, do not attempt to "correct" the files' existing content, copy every routine (one at a time) from CHDK-PT, then make the necessary changes. Compare your file to the equivalent in your reference port to see where to make changes.
You can find the task addresses in stubs_entry.S.
You can then change the rest of source files in platform/<camera>.

Re: S110 Porting thread
« Reply #43 on: 26 / February / 2013, 09:55:15 »
If the firmware you're working on is sufficiently similar to (some) other models for which there is already a CHDK port, ...
With the pending launch of CHDK for the SX50 ( a camera released the same date as the S110 ) ,  there is probably a better port for comparison than when the S110 port was started.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline nafraf

  • *****
  • 1307
Re: S110 Porting thread
« Reply #44 on: 26 / February / 2013, 22:31:34 »
Hi, I ported capt_seq.c for 101b.  File is in attachment.

Calls to DebugAssert and ExitTask are a bit different from I have seen before.

According to stubs_entry.S
Code: [Select]
NSTUB(DebugAssert                             ,0x0068b104) //111
NSTUB(ExitTask                                ,0x0068ae1c) //101

In capt_seq.c function
Code: [Select]
f80c183c:       e59f04ac        ldr     r0, [pc, #1196] ; f80c1cf0: (f80c1188)  **"SsShootTask.c"
f80c1840:       eb161c53        bl      loc_f8648994
f80c1844:       eb161ca0        bl      loc_f8648acc

Code: [Select]
loc_f8648994: ; 8043 refs
f8648994:       e51ff004        ldr     pc, [pc, #-4]   ; f8648998: (0068b104)
f8648998:       0068b104        rsbeq   fp, r8, r4, lsl #2

Code: [Select]
loc_f8648acc: ; 128 refs
f8648acc:       e51ff004        ldr     pc, [pc, #-4]   ; f8648ad0: (0068ae1c)
f8648ad0:       0068ae1c        rsbeq   sl, r8, ip, lsl lr



*

Offline srsa_4c

  • ******
  • 4031
Re: S110 Porting thread
« Reply #45 on: 27 / February / 2013, 09:28:07 »
Calls to DebugAssert and ExitTask are a bit different from I have seen before.
Those are far calls. BL/B can only jump to an address in a +/- 32MB range.

Re: S110 Porting thread
« Reply #46 on: 30 / May / 2013, 16:09:03 »
Interested in tapping into the zoom function on the S110 so we can demonstrate the "pinch to zoom" functionality on our iPad app:
https://github.com/cnatoli/iGCS
We have FFMPEG working on iOS, and a low latency streamer module from Z3 Technology (DM368-MOD) that streams from any HDMI output.
Hello!
We are interested in being able to stream video off the S110 and then pinch to zoom on any drone (quads and hexes usually) such as:
http://www.steadidrone.com/index.php/ready-to-fly/steadidrone-qu4d.html
(just an example)

C10ud if I bought and mailed you a camera could you help us get the base CHDK working so we can focus on zoom functionality?  We are a group of experienced programmers, but are new to CHDK so it will take some time to spool up.

The ring on the camera can be repurposed (I tested it in a store next door) to control the zoom so it *should* be possible.

Open to other options besides the S110 too.  I did like the size (light) and zoom capability though for flying on small drones.

This is just to be able to demo the concept for us, we don't plan to sell a system, but want to show what is possible with COTS and the iPad app.

Re: S110 Porting thread
« Reply #47 on: 30 / May / 2013, 18:15:00 »
Interested in tapping into the zoom function on the S110 so we can demonstrate the "pinch to zoom" functionality on our iPad app:
If you use something like this http://www.gentles.ltd.uk/gentwire/usb.htm and spare channel on your RC gear (which I assume comunicates with your iPad) you can use the USB  remote functionality of CHDK and any supported Canon P&S to implement a remote zoom fuction.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: S110 Porting thread
« Reply #48 on: 30 / May / 2013, 18:56:29 »
Sounds good, thanks for the help.  Basically I should just find a P&S with zoom that is already supported.  I'll do that.  Offer is still good on S110 if C10ud you are interested.

*

Offline nafraf

  • *****
  • 1307
Re: S110 Porting thread
« Reply #49 on: 30 / May / 2013, 19:58:39 »
Hi, if c10ud does not accept your offer (he started the port, he should be the first option) I accept the challenge.

 

Related Topics