S5IS - Ported! - DryOS Development - CHDK Forum supplierdeeply

S5IS - Ported!

  • 111 Replies
  • 65149 Views
*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
S5IS - Ported!
« on: 07 / April / 2008, 13:54:05 »
Advertisements
Good news, people... I completed the S5IS (1.01b) port :)
I know it's been a while since I started and I admit I didn't spend all time on only porting (I found it more interesting to experiment with some features I discovered) but at least it's done now. Today I just had to clean up the rest of my nonsense-debugging stuff, clean up ASM and get all this to work in the current trunk... which went a lot smoother and faster than I expected. It think these last bits took me a little over 7 hours including lunch.

Anyway, before you all fire up your cameras, I'd like to thank jeff666, ewavr and GrAnd for giving me some pointers (heh) I needed to complete this port.
I found it quite hard to start porting from scratch, so I don't think I could have done this without their help in this timespan. This is also why I have documented some things and I'm planning to make some real documentation on porting new cameras, although I'm not sure in what form yet. Also, during porting I found a lot of (hidden) features in the camera, some of which surprised me that they weren't in CHDK yet. I think you can expect at least some of them in the near future. I also still have a couple of ideas left and I think I found at least one flaw in CHDK, so I guess I'll have enough stuff to work on :)

Thank you for your patience, I hope you like it.


The source code should now be in SVN, for the impatient people I put a binary version online. I have tested as much as I can, please let me know when you find any problems.
Download: binary version only, 1.01b.
Known issues:
- ISO overrides do not really seem to work beyond ISO 800 (as the camera sees it). Possibly the sensor doesn't go higher than ISO800 and ISO1600 is done artificially or something else is wrong, I don't know yet. I have the strong tendency to ignore this problem (low priority at least) because noise isn't acceptable at ISO400 or higher anyway.
- Overriding the subject distance only works when MF is enabled. This is a limitation of the camera, it will crash when MF is not enabled, so the override isn't activated in that case. There is still ONE method that I know of to crash the camera with the subject distance override, that's when you have subject distance override enabled, click the shoot-button halfway to get focus, enable MF without releasing the shutter button (SD override enabled) and then fully shooting. You shouldn't notice this behaviour, though, this method is quite useless when overriding SD anyway, so it seems silly to use it. However, one may forget setting MF and remember it at the last moment, so I'm going to try to find out what is causing it.

Edit: sand did the necessary changes to make this work on the S5IS 1.01a as well. His code is in the trunk and a binary build should be available soon (I think it's also referenced somewhere in this topic).
« Last Edit: 10 / April / 2008, 17:40:07 by DataGhost »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
S5IS 1.01b - Ported!
« Reply #1 on: 07 / April / 2008, 14:03:36 »
Well, under Windows I get compile error:

>> Entering to platform/s5is/sub/101b
../../../../tools/finsig.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status

due to:
trunk/platform/s5is/sub/101b/Makefile:
...
stubs_entry.S: $(TARGET_PRIMARY) $(topdir)tools/finsig
...

and for any other cam we have:
stubs_entry.S: $(TARGET_PRIMARY) $(topdir)tools/signatures_$(PLATFORMOS).h

Any suggestions?

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
S5IS 1.01b - Ported!
« Reply #2 on: 07 / April / 2008, 14:08:45 »
Ah, I missed that. It works fine in Linux :p or are you really trying to find signatures? I haven't really tested that. Anyway, I falsely assumed the Makefiles didn't change, I'll look into it right away. If that's not the only thing, maybe you can do it, though, if it's not too big a hassle. I don't have a Windows toolchain so I don't know if I can easily reproduce your error.

Edit: I think I have it, I just copied the stuff from the A720 makefile, looks like that should do it.
« Last Edit: 07 / April / 2008, 14:19:21 by DataGhost »

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
S5IS 1.01b - Ported!
« Reply #3 on: 07 / April / 2008, 14:23:28 »
DataGhost,
Congratulations to you for your great job you did / are doing!

Hopefully your exams notes are also as great as the job you did for this community!  :)

Many thanks for completing the port!

Everyone should now be satisfied (except 1.01A Firmware users ;))! But for 1.01A it should be not such a big step like starting from the scratch.

Best regards,
tommi


*

Offline ewavr

  • ****
  • 1057
  • A710IS
S5IS 1.01b - Ported!
« Reply #4 on: 07 / April / 2008, 14:24:45 »
Well, now we don't need extra STUB's in stubs_entry_2.S because script find all of them (and place to stubs_auto.S), except:

../platform/s5is/sub/101b/libplatformsub.a(capt_seq.o): In function `loc_FF961184':
capt_seq.c:(.text+0x950): undefined reference to `sub_FF960D20'
capt_seq.c:(.text+0x954): undefined reference to `sub_FF960CA0'
../platform/s5is/sub/101b/libplatformsub.a(capt_seq.o): In function `loc_FF96130C':
capt_seq.c:(.text+0xa90): undefined reference to `sub_FF960D20'
capt_seq.c:(.text+0xa94): undefined reference to `sub_FF960CA0'

due to "LDR     R3, =sub_FF960D20\n" and other
But why not "LDR     R3, =0xFF960D20\n" ?

edit: And other thing: after signature search, not found: UIFS_WriteFirmInfoToFile, kbd_pwr_off, kbd_pwr_on.
Maybe stubs_entry_2.S can be updated:
NSTUB(UIFS_WriteFirmInfoToFile, 0xFF81096C)
NSTUB(kbd_pwr_off, 0xFF81096C)
NSTUB(kbd_pwr_on, 0xFF81096C)
« Last Edit: 07 / April / 2008, 14:28:14 by ewavr »

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
S5IS 1.01b - Ported!
« Reply #5 on: 07 / April / 2008, 14:37:45 »
Hm, heh. I must have missed those because they worked after I made those stubs. I just saw the message while compiling and added those stubs. During the final cleanup, I didn't notice them because they were still 'in use', I also didn't see that they were in fact LDR ops instead of BL-conditional ops. I guess that's a trivial fix. I'll also add those three nullstubs, thanks for noticing. Anyway, please let me know if you don't find anything anymore, so I can make one final commit instead of (possibly) several small ones.

*

Offline ewavr

  • ****
  • 1057
  • A710IS
S5IS 1.01b - Ported!
« Reply #6 on: 07 / April / 2008, 14:48:42 »
No compilation errors more. :)

and one theoretical :) question: if we change some "illegal" for this assembler instructions like BLX R12 to their opcodes (.long 0xE12FFF3C), this can work? (of course, instruction must do not contain relative to PC offsets (like LDR))
« Last Edit: 07 / April / 2008, 15:13:47 by ewavr »

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
S5IS 1.01b - Ported!
« Reply #7 on: 07 / April / 2008, 14:52:04 »
congratz! nice job. just today amazon wrote me i can buy a new s5is at special discount :D
well, i think i'm gonna stick to my s3is for now :p

Quote
Also, during porting I found a lot of (hidden) features in the camera, some of which surprised me that they weren't in CHDK yet. I think you can expect at least some of them in the near future. I also still have a couple of ideas left and I think I found at least one flaw in CHDK, so I guess I'll have enough stuff to work on Smiley
hm, i'm patiently awaiting your good and bad news. i wonder what these might be... keep up the good work, thanks :)


*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
S5IS 1.01b - Ported!
« Reply #8 on: 07 / April / 2008, 15:35:40 »
Congratulations DataGhost, you must be very satisfied with your achievement. This community will grow even more with all the S5 users that will join. You are not just adding CHDK capabilities to another camera model, but you are throwing light upon the future of this project.

*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
S5IS 1.01b - Ported!
« Reply #9 on: 07 / April / 2008, 17:29:42 »
@DataGhost

makefile.inc:
#MEMISOSTART=0x9B610 // Does not work (if I recall correctly). Offset by 0x10000. Comment kept for future reference.

boot.c:
long canon_bss_len = 0x9d024 - (0xfc04 - 0x1900); // 0x9d024 - (0xfc04 - 0x1900) (a710: 0x9F9B0 - 0xD680)


Bold numbers should be the same. 0x9B610, I suspect.
CHDK Developer.

 

Related Topics