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

The SX1 IS Porting Thread

  • 381 Replies
  • 173056 Views
*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: The SX1 IS Porting Thread
« Reply #10 on: 05 / April / 2009, 19:30:49 »
Advertisements
Now CHDK-Shell creates a first build (diskboot.bin + CHDK Folder) with my modifies files (for the SX1)....however: the ps.fi2 file is missing (to startup the pseudo-firmware upgrade with CHDK).... so I can't start it up on my SX1 ..... :(
Don't know right now where to get it (or which switch to use on CHDK-Shell)...will investigate tomorrow...

Hi Fredi,
For the autoboot method use a small SD card (<=4GB),
format it (FAT16) & make it CHDK-bootable with CardTricks,
copy the diskboot.bin to the root dir of the card, enable the card's RW lock,
then start (or try to start  ;) ) your camera...

For the creation of the PS.FI2 file you need to store the encryption keys in the \platform\fi2.inc file.
You can get the keys from the G10 1.00F firmware dump (available from the CHDKdumps2 drop),
read about it here: http://chdk.setepontos.com/index.php/topic,2995.0.html

The SX1 needs the d4 (G10) keys: read, prepare & rename the file fi2.inc.txt for this, then you can
enable the OPT_FI2 option in the CHDK-Shell (button "Compile Options", disabled by default).

Just use a hex editor, e.g. HxD & get the 16 bytes from the correct offsets; write down the bytes without spaces, it should look like this
  ifeq ($(KEYSYS), d4)
   FI2KEY=112233445566778899AABBCCDDEEFF
   FI2IV=112233445566778899AABBCCDDEEFF
 endif

« Last Edit: 05 / April / 2009, 19:59:12 by fe50 »

*

Offline pev69

  • **
  • 55
Re: The SX1 IS Porting Thread
« Reply #11 on: 06 / April / 2009, 08:03:10 »
Thanks, fe50, for the FI2 info. I found the keys, and successfully tested fi2 compilation for the SX10 port. Now I'm just eagerly waiting for fboesch to put the SX1 port (even if aplha) for download :)

Re: The SX1 IS Porting Thread
« Reply #12 on: 06 / April / 2009, 17:14:09 »
...after a long day @work (...I'm not a developer, but a Service Management Consultant) finally came home and went on to the what I really wanted to do the whole day: Bring CHDK to work on the SX1...

FE50: Thank you for your "summary hint"! Helped to bring me onto the right track (with other forum links). Indeed the key/IV are the same as the G10 (despite at some slightly shifted ROM Adresses in HexEditor)....(better safe - than sorry) :-)

Now status: I've got now a "full" compilation (incl. ps.fi2)...Inserting it in my SX1 and choosing "Firm Update" Menu shows


Update firmware version?
2.0.0.0 -> 1.1.0.0

(Cancel) (OK)

I just hat a couple of "sweat-drops": The "Update" does not (yet) show the know CHDK Welcome Screen, but just blanks out the Main LCD (Power LED stays on)...no reaction onto key entries... :o

After a while I've decided to take out the batteries....re-inserting them and my SX1 was working normally again.  ;)


Well...seems that I need to dig as next deeper into the LED Adresses thing....I've found one adress so far...but the other one'es seem to be also important... for the other adresses (phys_run etc.) I'm pretty confident that they are correct.

So proceeding a little bit further with adresses - as you may understand: I want to see CHDK startup (at least Mainscreen) on my SX1. As soon this is accomplished, I will provide the "Alpha" files to the community...

So it is a little bit "Trial & error" now... :-)

Till later

Fredi

P.S...I'm not a developer or so....but i've got assembler (HD61700) skills from my youth and the "understanding" of what IDA is showing me. Actually I once even "patched" with an Hex Editor a raw DB2-Database file to fix it....so my sx1 adress translation is certainly (conceptually) correct...must be typo's or the (still) missing values....

 

Re: The SX1 IS Porting Thread
« Reply #13 on: 06 / April / 2009, 17:15:30 »
Thanks, fe50, for the FI2 info. I found the keys, and successfully tested fi2 compilation for the SX10 port. Now I'm just eagerly waiting for fboesch to put the SX1 port (even if aplha) for download :)

Thanks for the "mental support" :-)  & Glad to see that I'm not the only ambitious SX1 owner :-D



*

Offline pev69

  • **
  • 55
Re: The SX1 IS Porting Thread
« Reply #14 on: 06 / April / 2009, 17:44:11 »
:) Sure, since mental support is the only thing I can give at the moment ;)

Darn the setback though... Some suggestions:
- Are you sure you got the key and iv in correct order (they were in reverse order in fi2.inc.txt compared to the offset addresses)?
- Perhaps you could try the diskboot method, that is not dependent on the fi2...?
- Maybe you can test if it's the LEDs by putting one confirmed address to all LEDs?
« Last Edit: 06 / April / 2009, 17:59:01 by pev69 »

*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: The SX1 IS Porting Thread
« Reply #15 on: 06 / April / 2009, 19:01:08 »
@Fredi
You should use the autoboot method until you've got a running (booting) CHDK version - it's easier (just exchange the diskboot.bin) & you can exclude a bad encryption as possible error source.

Only the print LED is accessed directly, e.g. as boot indicator; the other addresses are not needed to boot up - but having some LED's for debugging is very helpful. If you can't find this DEBUG_LED address, you could use the AF LED instead...

Insert LED blinker code to see what code is executed & where you are...

Re: The SX1 IS Porting Thread
« Reply #16 on: 06 / April / 2009, 19:48:13 »
Darn the setback though... Some suggestions:
- Are you sure you got the key and iv in correct order (they were in reverse order in fi2.inc.txt compared to the offset addresses)?
- Perhaps you could try the diskboot method, that is not dependent on the fi2...?
- Maybe you can test if it's the LEDs by putting one confirmed address to all LEDs?


a) ...yes. Went into same "issue" that IV / Key are just reversed than the post.... :-)  but finally got it right, because in the "wrong" order there is no next step/suggestion of 2.0.0.0->1.1.0.0 :-) There is just an error "file error"

b) tried it out...screen stays blank...so i assum(ed) that it is still on some adresses --> Investigation was helpful...have found some other keys.... :)

c) Yes the two LED adresses not showing corresponding entries (SX10 vs. SX1 FW 2.0.0), I just left them with the same values of the SX10....


Well....Easter holidays are near .... so enough time to thouroughsly go through again :-) (But still hoping that I can make it until Thursday :-D

G'night and till tomorrow

Re: The SX1 IS Porting Thread
« Reply #17 on: 06 / April / 2009, 20:02:57 »
GUYS!!! First "life" signs....(but not yet ALPHA)

Using the Autoboot Method and pushing shortly on the Play Button - First nothing happened. Then I pushed the "Play" Button (by mistake)  for more than 1 second and the cam springs to life and THERE IS CHDK Welcome Overlay coming up to life!!!!! (well - sort of)

==> Actually mostprobably (because of the SX1 Screensize parameters NOT yet set from SX10 it is something with 360x240 (?)  the Logo as well the "CHDK" Menu's are completely "scrambled" (--> Text & Picture seem like heavily "interlaced" on the screen...no character can be read looks like a red/white dotted overlay on the current (working) cam)

Interesting: Some "keys" seem to work as they should: If pushing the "Flash"/Mic Button it works as [ALT] and invokes the normal CHDK Settings Menu ....also here: UNREADABLE because heavily interlaced BUT The Cursor (Red background) can clearly be navigated with the wheel pad (up/down) and "set" seems to work too....

Well...this is a first "visible" progress.... :-) I'm happily going to bed now....

(P.S. Working hard to provide the readable Alpha Release BEFORE Eastern :-)


*

Offline reyalp

  • ******
  • 14080
Re: The SX1 IS Porting Thread
« Reply #18 on: 06 / April / 2009, 20:11:52 »
the scrambled display may be due to having the wrong values for
vid_get_bitmap_screen_width
vid_get_bitmap_buffer_width
in platform/sub/lib.c

Don't forget what the H stands for.

Re: The SX1 IS Porting Thread
« Reply #19 on: 06 / April / 2009, 20:19:15 »
CHDK definately WORKS!!! (Still "scrambled" but I was able to navigate to the Calendar function!) :-) I see actually (divided into single display lines) the calendar 4-times  (like if your drunken) :-) Due to the few vertical pixels on the SX1 Displays (outer/inner) a letter size of 4-5 Pixels will become unreadable)

Next thing I do (tomorrow): Checkout to get correct values (lib.c?)...

@FE50: Tip where to look at ? Every hint is grateful appriciated!


 

Related Topics