The SX1 IS Porting Thread - page 6 - General Discussion and Assistance - CHDK Forum supplierdeeply

The SX1 IS Porting Thread

  • 381 Replies
  • 159903 Views
Advertisements
Hi all

So here is the current status of work on the SX1 IS Port of CHDK:

- Files are based on Trunk729 (SX10 as template) and do only reflect the modified files!
- Files do contain the long exposure modifications of ewvar (including adress translation to SX1 ROM Adresses).
- Includes modified fi2enc.c (as suggested by ewvar) for higher "Fw Upgrade Label" (2.1.0.0 instead of 1.1.0.0)

PLEASE USE CHKD-SHELL 2.13 (or newer!) GCC 4.3.3 is available and working correctly with the SX1 files then

Instructions:
Within the CHDK-Shell Folders, go to Trunk\Trunk729 and below copy first the whole subfolder under \plattform of the SX10 to a new folder named SX1. Unpack all contained files onto an existing CHDK-Shell Directory. The modified .ini File (as well the files within \trunk, \include and \core) should make an entry "SX1" and 200h Radiobutton visible in CHDK-Shell on restart.

Attention: 
- File fi2.inc does NOT contain the Key/IV Pair ---> To compile the FI2 File you need to "search" yourself for the right keys....I'm just try to follow the rules here...

BUT: Included are diskboot.bin as well ps.fi2 file!

diskboot.bin works as the documented pictures show. Copy to a SD card (< 4GB) and "lock" the card. insert into Cam and start via Play or PowerOn button.  If Cam crashes: Simply switch on again via Play/PowerOn button.

ps.fi2 (--> Firmware Update) does still not work: Cam will just hang (with Power Button "on"). Remedy: Open Battery Compartement.

--> Attention: with diskboot.bin just CHDK is included. What is not contained in here is the subfolder \CHDK + additional files like "Sokoban" game....


ToDoS:
Major:
- Enable correct CHDK-Booting through PS.FI2..... (i've got a 16GB Card that awaits CHDK    ::) )
- Picture Taking (incl. Override Values) seem to work: But no Picture will be stored! Cam dies.  :(
- Test if Long Exposure Settings are working on the SX1 too....but first successful Picture Taking needs to be "fixed"...
- Movie Taking - not tested, but Code movie_rec.c has been ported

Minor:
- Edge Feature: Have never had a use of it, but on the SX1 it does not work (yet)
- Nail the CHDK Menu to a fixed position....(see earlier pictures in this Thread)...will also fix the "Zebra-Mode" issue (wrong position of Zebra markers)


So if you got spare time....Hero Members, Experienced Porters and - as me: SX1 Owners - welcome to verify my Port so far.

Till later

F.

EDIT: Attachment has been removed, due to "true" Alpha Release later in this thread


IMPORTANT: Disable automatic "Internet checking"....due that my modifications are not yet officially included a new released Trunk will not contain these changes automatically. These files are only for Trunk729.
« Last Edit: 15 / April / 2009, 10:35:30 by fboesch »

Re: The SX1 IS Porting Thread
« Reply #51 on: 12 / April / 2009, 04:17:14 »
Thanks to simple (test) suggestion of user pev69 I neutralized the substitutions the capt_Seq_task within capt_seq.c file to make a check if the crashing of the cam (after picture taking) could be related to the override thingy....or not. it still crashes.......we need perhaps an additional "sub_" specific for the SX1, because there are small differences to the SX10 code...

If completely avoiding to jump into custom capt_seq_task (commenting out the "if then" condition in boot.c where calling some adresses will use own routines)..the cam works...so the problem of crashing cam starts somewhere in capt_seq.c ....

Thanks pev69!


EDIT: ....what puzzles me....I've used now in Capt_Seq.c an exact copy of the capt_seq_task routine from my SX1: No calls to any "further custom functions", it is 1:1 the assembler code from IDA....Cam crashes (as usual)... how can this be?!?
« Last Edit: 12 / April / 2009, 06:49:59 by fboesch »

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: The SX1 IS Porting Thread
« Reply #52 on: 12 / April / 2009, 06:02:43 »
@fboesch

Quote
Compilation with GCC 3.4.6 works, GCC 4.3.3 NOT (--> BLX R12 error)....unfortunately no reliable threads found on fixing the GCC 4.3.3 error (...i've started a new Post meanwhile, because recommmended Setting - implemented with CHDK-Shell 2.12 - does not help either...)

i missed your first post about this, sorry ... I think i've found the solution though.
it turns out that both your port and (i suppose) it's parent in the trunk, ewavr's sx10 port, are using these BLX commands, a bit of further checking brought to light that Dataghost in his S5IS port actually provided a clue:

Quote
          //"BLX     R12\n"      // WORKSFORME, configure gcc WITHOUT --with-cpu=arm9
          "MOV     LR, PC\n"     // 2-op workaround for 'normal' compiler
          "MOV     PC, R12\n"    // Does the same thing, effectively, because PC is always 8 bytes ahead.

... so that's what i did, i compiled a new GCC433 WITHOUT --with-cpu=arm9, and it now works for me, that is, it
compiles the sx10 trunk source without errors for me, without apparent side effects on compilation for 'older' cams.
Note that we're strictly talking GCC build time config options here; while using GCC4 with CHDK-Shell you should not have to tweak these settings at all (CHDK-Shell will auto-adapt them for your compiler, if it can; for really old builds - think 300 or so - it will advise you to use GCC3 if necessary)

BTW, about your source: it's no good supplying a new CHDK-Shell-xxx.ini, the cam/firm entry there only serves to remember which ones you have selected in CHDK-Shell ... you will have to edit the Makefile to have your SX1 entry automatically shown in CHDK-Shell's cam panel

the 'new' compiler ("gcc433-noarm9.exe") can be found here: http://drop.io/chdkshellbeta

it's a self-extractor, unpack wherever you like: it will generate a "gcc4-noarm9" directory containing the compiler.
to activate it in CHDK-Shell, use Compile Options -> GCC Compiler Version Set Paths : click "GCC4" and select the
"gcc4-noarm9" directory

thanks for the input, and please report if this works for you as well; i'll release a new full version (shell+compilers) in that case.


wim
« Last Edit: 12 / April / 2009, 06:16:26 by whim »

Re: The SX1 IS Porting Thread
« Reply #53 on: 12 / April / 2009, 06:17:35 »
Thank you Wim!

Yes, I naturally did the Modification also on Makefile.....but have forgotten to include it....  :(   ... (EDIT: has been corrected...above ZIP File does now contain the "Makefile" for CHDK-Shell including my changes for local usage)

I've actually stumbled over the S5IS thread mentioning to use alternative code, but if I'm remember correctly:  on another  thread it was not recommended - rather finding the right Flags Parameter were recommended....so I did not follow this path...

Tried the Beta and works!  It's the first time, that my files are now compiled with GCC 4.3.3 (beta).

One thing happened though (beta? my "virtual machine"?): When compiling (incl. 'full' option) SH.exe crashed the first time....second time (without any changes made) compilation went through smoothly...

Code generated shows the typical smaller size and run's properly on my Cam!

Cheers & Thank you!
« Last Edit: 12 / April / 2009, 06:46:40 by fboesch »


*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: The SX1 IS Porting Thread
« Reply #54 on: 12 / April / 2009, 08:36:25 »
now released with CHDK-Shell-v213 full version,

thanks again for reporting and happy porting !

wim

Re: The SX1 IS Porting Thread
« Reply #55 on: 12 / April / 2009, 17:53:19 »
Update: Found the correct Vid Buffer Size Settings for "lib.c" so that CHDK is not "shifted" during "custom display" mode changes (invoked by Canon Menu)...

Searched for "BmpDDev.c" and got Vid Buffer values

from ROM:FF903960: Width 960  (0x3C0)
from ROM:FF90395C: Height 270 (0x10E)

To be used in lib.c as follows:

vid_get_bitmap_screen_width(480)     //width for CHDK Overlay
vid_get_bitmap_screen_height(240)   //heigth for CHDK Overlay

vid_get_viewport_height(270)  /

vid_get_bitmap_buffer_width(480)
vid_get_bitmap_buffer_heigth(270)

....

Zebra-Mode works correctly in "Wide-Mode", but not in "Standard" view (Zebra field is shifted the amount of pixels (black side bar) to the left of the actual shown picture). Looks to me as if the Zebra-Mode-Program-Part does not yet correctly work with a Cam showing "two view modes" of 4:3 and 16:9 on the display...(SX1 is the first one)

Edge Overlay still not working (just a bunch of "shifted" lines filling up the view field depending on set sensitivity, but not precisely marking "edges"). Looks to me as if using wrong settings above (360x240). Potentially an issue in the Edge Overlay Code (assuming 4:3 LCD's/Viewfinders).



*

Offline MRQ

  • *
  • 7
Re: The SX1 IS Porting Thread
« Reply #56 on: 12 / April / 2009, 18:07:19 »
Hello,  big thanks too you all for your efforts and time spent doing this! I can't express just how much fun I'm having with CHDK in general and it's all because of wonderful people sharing their knowledge and time.

 I recently got to play around with an SX1. An awesome hybrid in general, I fell in love with the fullHD mode but I'm kind of disappointed in the supermacro, no zoom of any kind in supermacro suprised me. Could CHDK open up this feature or would that be impossible?

 I own a 970 IS and for me(newbie) the 970 does alot better(is easier for me anyways) then the SX1 at close up macro shooting.

Sorry if this is the wrong place to ask this question, PM me and I'll delete this message if so(or just bin it).

Re: The SX1 IS Porting Thread
« Reply #57 on: 12 / April / 2009, 19:30:10 »

 I recently got to play around with an SX1. An awesome hybrid in general, I fell in love with the fullHD mode but I'm kind of disappointed in the supermacro, no zoom of any kind in supermacro suprised me. Could CHDK open up this feature or would that be impossible?
 

With "programming" actually anything could be realized.... :-)

But why, if there is already a solution "built-in"! (actually it is not documented and I found it by chance)

I agree that SuperMacro is kind of disappointing: No Zoom and because of the 28mm Wideangle-setting  the object it will look rather "small"... it was similar on my S2 IS but with the 36mm "Wideangle" the objects looked more "Macro"....

"Normal" Macro Mode on the other side features zoom, but no focussing below 10cm...(that's where SuperMacro Mode takes on)

NOW HOLD ON!

First: Go to Macro Mode (not SuperMacro Mode)
Second: enable the "electronical Teleconverter" (2.3x) in the "Digitalzoom" Setting (seems to be unique to SX1 and nothing similar in SX10)

TATAAA!! You will get a real "Mega-Macro" Mode on the object you have in front of your lens! Actually the  Object is Bigger and Closer than if using SuperMacro....(see pictures made with my SX1 using exactly same distance of my SD card used to port CHDK)

Most-Interesting: When the Teleconverter is activated, the SX1 will be able to focus precisly from 0cm-infinite distance - eventhough you are in "normal" Macro Mode! AND PLUS: YOU CAN ZOOM! :-) Without "Teleconverter" the Macro Mode will return to it's "normal" behaviour (autofocus only working from 10cm - infinite). In SuperMacro you can't enable "Digitalzoom" unfortunately...

Actually I put together these settings (2.3x Teleconverter + Macro Mode On) and saved them in the "C" Position ...It is really MY favourite Macro Mode and captures indeed closer Macro's than my S2IS (or other Cam's I've owned)...

Hope this helps you (and others)....found this by chance on FW 2.00h ...(however: I don't know if it is a unintended "bug" or feature and if available on FW 1.00g/1.00h)....and yes: "Digitalzoom" is activated, so  the picture is artificially enlarged but you won't notice, because it is max 2.3x higher... And: Zoom & Autofocus is working within the natural optical limits (the closer the less optical Zoom can be applied, but already by 10cm distance a tick Zoom can be used) ....

Actually: the Super-Macro Mode is in a way obsolete to me since discovering this feature...
« Last Edit: 13 / April / 2009, 03:42:40 by fboesch »


Re: The SX1 IS Porting Thread
« Reply #58 on: 13 / April / 2009, 18:14:31 »
Status 14.3.09/00:10 ....

no progress so far...I try to "learn" what the sub_routines (mainly boot.c  and capt_seq) are doing and checking if on the SX1 there is a jump "with no return" in comparision to the SX10/S5is

ARGH...my problem: I don't know (yet), at which point the Program is really making the "snapshot" and then re-entering into "processing & storing" the Picture....I would like to follow up the moment (code) when the cam is returning from taking the picture...On the S5IS there is a specific SDHC Handling code within CHDK...not yet clear on SX10/SX1...




*

Offline pev69

  • **
  • 55
Re: The SX1 IS Porting Thread
« Reply #59 on: 13 / April / 2009, 22:07:37 »
Yo, fboesch (and others)!

I have good news! I found the crash-doer in capt_seq.c!

You had:

"loc_FF86CD04:\n"
                 "LDR     R0, [SP,#0]\n"
                 "B      sub_FF86C34C_my\n"

But that branch should be BL, not B (comparing to sx1 dump in IDA) !

Now taking a picture does not crash in my cam anymore! (I did not test any CHDK overrides yet.)
« Last Edit: 14 / April / 2009, 01:38:16 by pev69 »

 

Related Topics