S95 Porting Thread - DryOS Development - CHDK Forum

S95 Porting Thread

  • 1015 Replies
  • 358933 Views
*

Offline waldo

  • ***
  • 238
S95 Porting Thread
« on: 10 / September / 2010, 19:03:27 »
Advertisements
This message thread discusses the porting of CHDK to the S95, firmware versions 1.00E and 1.00H.

Porting Status (Updated 1 Jan 2011):

Current version: 11

Features not implemented
None

Confirmed bugs
None

Binaries
S95 1.00E binaries:
   http://www.zshare.net/download/846397255b926f48/

S95 1.00H binaries:
  http://www.zshare.net/download/846397733e1d72dc/

Source:
   http://www.zshare.net/download/84639799bb6892c7/
 
« Last Edit: 01 / January / 2011, 18:11:22 by waldo »

*

Offline waldo

  • ***
  • 238
Re: S95 Porting Thread
« Reply #1 on: 12 / September / 2010, 19:44:20 »
I spent some time with this over the last couple days.  My initial observations:

The code appears to be very similar to previous code (specifically the S90).  As this is probably the newest camera ported, that is good news.

The firmware appears to use a new FI2 key.  I need to test this to confirm the new key.

When examining the startup code for initialing the MCR registers, it appears that 128 MB is allocated to the raw image buffers, opposed to 64 MB for the S90, having the same number of MP.  I suspect this is due to the in-camera HDR, needing to buffer three shots in RAM prior to the HDR.

The executable code section of the firmware is about 12% larger than the S90.

Re: S95 Porting Thread
« Reply #2 on: 13 / September / 2010, 19:47:46 »
Thanks for dumping the firmware and starting the s95 port!

I look forward to its progress.

*

Offline waldo

  • ***
  • 238
Re: S95 Porting Thread
« Reply #3 on: 16 / September / 2010, 22:25:43 »
I've managed to negotiate the S95 through the landmine that is boot.c.  It now launches the GUI and draws to the screen.  Some tasks run and some appear to not run - maybe a bad address somewhere. 

I still can't get it to auto-boot.  I recall I had a similar problem on another camera and it turned out to be the wrong NEED_ENCODED_DISKBOOT value.  I'm hoping this doesn't have a new dancing bits algorithm.

*

Offline reyalp

  • ******
  • 14125
Re: S95 Porting Thread
« Reply #4 on: 16 / September / 2010, 22:54:22 »
I still can't get it to auto-boot.  I recall I had a similar problem on another camera and it turned out to be the wrong NEED_ENCODED_DISKBOOT value.  I'm hoping this doesn't have a new dancing bits algorithm.
It is a new encoding.  Try newly checked in dancing bits with NEED_ENCODED_DISKBOOT=5

Just noticed this camera is DryOS r45, where the other new cameras are r43.

While I haven't gone back through all the cameras, I have the impression that Canon changes the keys/encoding on each dryos rev.
Don't forget what the H stands for.

*

Offline waldo

  • ***
  • 238
Re: S95 Porting Thread
« Reply #5 on: 16 / September / 2010, 23:00:54 »
I'm certainly no expert on how dancingbits.c works, but don't you also have to change the macro:
#define VITALY 4
when you add a new encoding ??

*

Offline reyalp

  • ******
  • 14125
Re: S95 Porting Thread
« Reply #6 on: 16 / September / 2010, 23:07:08 »
I'm certainly no expert on how dancingbits.c works, but don't you also have to change the macro:
#define VITALY 4
when you add a new encoding ??

Oops, you are quite right. Fixed, I hope.
Don't forget what the H stands for.

*

Offline waldo

  • ***
  • 238
Re: S95 Porting Thread
« Reply #7 on: 17 / September / 2010, 17:19:50 »
Success !! 

My S95 now autoboots using the new version of dancingbits.c and NEED_ENCODED_DISKBOOT=5.  I guess it must be those cajun chicken spices that did the trick.  Thanks much for the help.

*

Offline waldo

  • ***
  • 238
Re: S95 Porting Thread
« Reply #8 on: 19 / September / 2010, 18:33:40 »
I'm having problems getting the S95 to power up in record mode.  Looking at other camera ports, it appears that people are writing values to a global variable location early in the boot.c code based on the value of C0220128.  I believe that the code that does this in the firmware is at FF864D64 in the S95.  Here is my understanding of what it does:

Code: [Select]
if ((long*) 0x80000ffc == 0x12345678) // reboot flag ?
*((long*) 0x25e8) |= 0x400000;
if (((long*) 0xc0220128 & 1) == 0) // always reads 0x21
*((long*) 0x25e8) |= 0x100000;
if (((long*) 0xc022012c & 1) == 0) // LSB = play button
*((long*) 0x25e8) |= 0x200000;

Note that the 25e8 value and the OR'ed constants differ from other ports.  This code is almost identical to that used in the S90, but maybe the S90 port does not work yet either, judging by what appears to be unfinished S90 code that saves to globals that are never referenced.

I've tried loading all combinations of 0x100000/200000/400000 into 25e8 and it does not affect what mode the camera powers up in.

I understand that there is going to be a need to press and hold the button until CHDK recognizes it, but I'm just trying to get the mode switching working right now.

Anybody have any ideas to try?

*

Offline reyalp

  • ******
  • 14125
Re: S95 Porting Thread
« Reply #9 on: 19 / September / 2010, 19:23:08 »
You also have to comment out another function further on to make this work. See the d10 boot.c for example, taskcreate_Startup_my
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal