Author Topic: S90 Porting Thread  (Read 46266 times)

Offline rachelkitty

  • Rookie
  • *
  • Posts: 19
Re: S90 Porting Thread
« Reply #30 on: 04 / January / 2010, 02:57:35 »
Going to re-dump the latter section of the fw, i have a feeling that something went a bit pear shaped there.

Offline rachelkitty

  • Rookie
  • *
  • Posts: 19
Re: S90 Porting Thread
« Reply #31 on: 05 / January / 2010, 02:54:04 »
Holiday time is up, out of time for doing anything with this for now. http://rapidshare.com/files/330257144/S90_GM1.00C.bin
I'll try and get round to doing something at the weekend or when I have some free time to do so.

Offline randy

  • Newbie
  • *
  • Posts: 2
Re: S90 Porting Thread
« Reply #32 on: 10 / January / 2010, 11:53:09 »
I love you all! I'm eagerly awaiting the CHDK for the S90. Is there anything I can do to help? I'm a programmer too, but I have no experience on low-level stuff like this. I'm interested in getting CHDK to work though. Keep up the good work!

Offline Microfunguy

  • Developers
  • Guru Member
  • ****
  • Posts: 3027
    • StereoData Maker
Re: S90 Porting Thread
« Reply #33 on: 10 / January / 2010, 19:19:04 »
@rachelkitty

Check your email.


David

Offline Microfunguy

  • Developers
  • Guru Member
  • ****
  • Posts: 3027
    • StereoData Maker
Re: S90 Porting Thread
« Reply #34 on: 14 / January / 2010, 20:09:22 »
It has suddenly gone rather quiet   :)

Offline Hollywood

  • Jr. Member
  • **
  • Posts: 50
Re: S90 Porting Thread
« Reply #35 on: 15 / January / 2010, 02:23:28 »
I've been watching this thread with excitement, please don't give up making CHDK for the S90.  I hoping some will continue to try and have CHDK developed for the S90.  I really do appreciate the time and effort that people have made to try and bring CHDK to life with the S90.

Cheers.

Offline McAllister

  • Newbie
  • *
  • Posts: 2
Re: S90 Porting Thread
« Reply #36 on: 19 / January / 2010, 18:43:52 »
Hopefully it is the silence before the storm ;)

does Anyone know if chdk generally is able to bring HD Video to a camera which is able to (at least the hardware) ?
Because for me the biggest preoblem ist the low video res and i don't know why canon did not put HD video to the s90 and g11, maby it's marketing?!

I red that chdk is able to rise the quality of the videos but nothing about the resolution. Unfortunatly i dont now how big the role is that the hardware plays in this case, maybe someone here is able to say if it is just possible that chdk brings hd video to the s90.

If you have to, destroy my hopes.  :(
But please keep it friendly  :D

greetings... 8)
« Last Edit: 25 / January / 2010, 14:35:31 by McAllister »

Offline physicsjake

  • Newbie
  • *
  • Posts: 1
Re: S90 Porting Thread
« Reply #37 on: 28 / January / 2010, 05:20:27 »
I had the same question about HD video.  Has anyone opened it up and checked the serial numbers on the parts to see what this camera is capable of?

Offline blalor

  • Newbie
  • *
  • Posts: 1
Re: S90 Porting Thread
« Reply #38 on: 28 / January / 2010, 21:04:30 »
What's the next step with this port?  How can I help?  I have an S90 and just a tiny bit of hardware knowledge.  Is there any work from the G11 port that can be carried over?

CHDK Forum

Re: S90 Porting Thread
« Reply #38 on: 28 / January / 2010, 21:04:30 »

Offline MauricioRPP

  • Rookie
  • *
  • Posts: 38
Re: S90 Porting Thread
« Reply #39 on: 01 / February / 2010, 00:05:21 »
McAllister, unfortunately I must be the one to tell that there is very little chance to do HD videos in the S90. I read somewhere on the web that this new sensor can only output video in VGA resolution, so this is a hardware limitation. Maybe I'm wrong, but feel free to google about the S90 sensor and correct me.

Also, I just bought a S90 myself. It arrived yesterday. And would be AWSOME to have some news on the porting process for this cam...

Offline drewm1980

  • Rookie
  • *
  • Posts: 8
Re: S90 Porting Thread
« Reply #40 on: 01 / February / 2010, 20:31:33 »
Unfortunately, the porting process has stalled, waiting for someone to come along who wants to and is able to actually disassemble the firmware, find the entry points to functions, figure out what they do, and write C code to call them from CHDK.   

Offline battika

  • Newbie
  • *
  • Posts: 3
Re: S90 Porting Thread
« Reply #41 on: 03 / February / 2010, 05:11:17 »
Hello, just started following the process described here http://chdk.wikia.com/wiki/Adding_support_for_a_new_camera and also had a look at the G11 CHDK port  thread.

I managed to get to the point where the compiler is not complaining about any unreferenced symbols. The automatically generated stubs_entry.S file very much reminds me of G11's stubs_entry file. As you can see below the same stubs were found with the same probability:


S90's stubs_entry.S file
Code: [Select]
// !!! THIS FILE IS GENERATED. DO NOT EDIT. !!!
#include "stubs_asm.h"

NSTUB(AllocateMemory, 0xffa9d168)
NSTUB(AllocateUncacheableMemory, 0xff838dcc)
NSTUB(Close, 0xff835414)
NSTUB(CreateTask, 0xff81e5b4)
NSTUB(DeleteFile_Fut, 0xff834da0)
// ERROR: EnterToCompensationEVF is not found!
NSTUB(ExecuteEventProcedure, 0xff888d74)
// ERROR: ExitFromCompensationEVF is not found!
// Best match: 57%
NSTUB(ExitTask, 0xff81e844)
NSTUB(Fclose_Fut, 0xff834f1c)
NSTUB(Feof_Fut, 0xff835108)
NSTUB(Fflush_Fut, 0xff835144)
NSTUB(Fgets_Fut, 0xff835070)
NSTUB(Fopen_Fut, 0xff834edc)
NSTUB(Fread_Fut, 0xff834fc8)
NSTUB(FreeMemory, 0xffa9d160)
// Best match: 91%
NSTUB(FreeUncacheableMemory, 0xff838e0c)
NSTUB(Fseek_Fut, 0xff8350bc)
NSTUB(Fwrite_Fut, 0xff83501c)
// Best match: 52%
NSTUB(GetBatteryTemperature, 0xff8615f0)
// Best match: 52%
NSTUB(GetCCDTemperature, 0xff86157c)
// Best match: 85%
NSTUB(GetCurrentAvValue, 0xff95a354)
NSTUB(GetDrive_ClusterSize, 0xff86e380)
NSTUB(GetDrive_FreeClusters, 0xff86e3e0)
NSTUB(GetDrive_TotalClusters, 0xff86e3b4)
// Best match: 64%
NSTUB(GetFocusLensSubjectDistance, 0xff958928)
NSTUB(GetFocusLensSubjectDistanceFromLens, 0xff958d70)
// Best match: 96%
NSTUB(GetOpticalTemperature, 0xff861664)
// Best match: 66%
NSTUB(GetParameterData, 0xff994a7c)
// Best match: 72%
NSTUB(GetPropertyCase, 0xff88ca64)
// Best match: 96%
NSTUB(GetSystemTime, 0xffa9d1c0)
// Best match: 74%
NSTUB(GetZoomLensCurrentPoint, 0xff95d9ec)
NSTUB(GetZoomLensCurrentPosition, 0xffa90e0c)
// Best match: 64%
NSTUB(IsStrobeChargeCompleted, 0xff8d8710)
NSTUB(LocalTime, 0xff886670)
// Best match: 93%
NSTUB(LockMainPower, 0xff89467c)
// ERROR: Lseek is not found!
// Best match: 92%
NSTUB(MakeDirectory_Fut, 0xff834e14)
// Best match: 57%
NSTUB(MoveFocusLensToDistance, 0xffafbcf0)
// Best match: 58%
NSTUB(MoveZoomLensWithPoint, 0xffa9b1a8)
// Best match: 62%
NSTUB(NewTaskShell, 0xff88c510)
NSTUB(Open, 0xff8353bc)
// ERROR: PT_PlaySound is not found!
// Best match: 86%
NSTUB(PostLogicalEventForNotPowerType, 0xff8924a8)
// Best match: 92%
NSTUB(PostLogicalEventToUI, 0xff8924f4)
NSTUB(Read, 0xff81ab78)
NSTUB(ReadFastDir, 0xffa7d748)
// ERROR: RefreshPhysicalScreen is not found!
// ERROR: Remove is not found!
// Best match: 53%
NSTUB(RenameFile_Fut, 0xff834ed8)
// ALT: NSTUB(RenameFile_Fut, 0xffa69a44) // 8/7
// ALT: NSTUB(RenameFile_Fut, 0xffa69a94) // 8/7
// Best match: 93%
NSTUB(SetAutoShutdownTime, 0xff8946f0)
// Best match: 81%
NSTUB(SetCurrentCaptureModeType, 0xff89b7b4)
// Best match: 55%
NSTUB(SetFileTimeStamp, 0xff9496e8)
// Best match: 64%
NSTUB(SetLogicalEventActive, 0xff8943cc)
// Best match: 68%
NSTUB(SetParameterData, 0xff994958)
// Best match: 89%
NSTUB(SetPropertyCase, 0xff88c960)
// Best match: 92%
NSTUB(SleepTask, 0xff838a50)
// Best match: 60%
NSTUB(TakeSemaphore, 0xff838718)
// ERROR: TurnOffBackLight is not found!
// ERROR: TurnOnBackLight is not found!
// ERROR: UIFS_WriteFirmInfoToFile is not found!
// Best match: 93%
NSTUB(UnlockMainPower, 0xff8945d0)
NSTUB(UpdateMBROnFlash, 0xff813f74)
NSTUB(VbattGet, 0xff831e04)
NSTUB(Write, 0xff8354a4)
NSTUB(_log, 0xffb365f8)
NSTUB(_log10, 0xffb35284)
NSTUB(_pow, 0xffb353f4)
NSTUB(_sqrt, 0xffb3819c)
NSTUB(close, 0xff81a990)
NSTUB(closedir, 0xffa7d5d0)
// Best match: 71%
NSTUB(closefastdir, 0xffa7d8e4)
// Best match: 95%
NSTUB(free, 0xff814138)
// Best match: 86%
NSTUB(kbd_p1_f, 0xff833630)
// Best match: 86%
NSTUB(kbd_p1_f_cont, 0xff83363c)
NSTUB(kbd_p2_f, 0xff832ed8)
// ERROR: kbd_pwr_off is not found!
// ERROR: kbd_pwr_on is not found!
NSTUB(kbd_read_keys, 0xff8335b4)
// Best match: 81%
NSTUB(kbd_read_keys_r2, 0xff85db5c)
NSTUB(lseek, 0xff835530)
NSTUB(malloc, 0xff8140dc)
NSTUB(memcmp, 0xff8203e8)
NSTUB(memcpy, 0xff83e43c)
NSTUB(memset, 0xffa0c7f8)
NSTUB(mkdir, 0xff835888)
NSTUB(mktime_ext, 0xff8ac304)
NSTUB(open, 0xff81a8e0)
NSTUB(opendir, 0xffa7d614)
// ERROR: openfastdir is not found!
NSTUB(qsort, 0xffaec3d8)
// Best match: 95%
NSTUB(rand, 0xff8204f0)
NSTUB(read, 0xff81ab78)
// ERROR: readfastdir is not found!
// ERROR: rename is not found!
// Best match: 95%
NSTUB(srand, 0xff8204e4)
NSTUB(stat, 0xff83556c)
// ALT: NSTUB(stat, 0xff86b7c4) // 30/0
// Best match: 61%
NSTUB(strcat, 0xff813f38)
// Best match: 56%
NSTUB(strchr, 0xff813fc0)
NSTUB(strcmp, 0xff8203a4)
NSTUB(strcpy, 0xff82038c)
NSTUB(strftime, 0xff8abd0c)
NSTUB(strlen, 0xff81400c)
NSTUB(strncmp, 0xff813f74)
// Best match: 73%
NSTUB(strncpy, 0xff813f38)
// Best match: 71%
NSTUB(strrchr, 0xff83e414)
// ALT: NSTUB(strrchr, 0xff8abad4) // 18/8
// Best match: 96%
NSTUB(strtol, 0xff83e71c)
NSTUB(strtolx, 0xff83e520)
// Best match: 86%
NSTUB(time, 0xff886be8)
NSTUB(vsprintf, 0xff820350)
NSTUB(write, 0xff81abd8)

And the same stubs are missing so I added them to stubs_entry_2.S. Hope that someone with ARM ASM knowledge can fill in the gaps:

S90's stubs_entry_2.S file
Code: [Select]
#include "stubs_asm.h"

// Not found by sigfind
NHSTUB(EnterToCompensationEVF, 0x12345678)
NHSTUB(ExitFromCompensationEVF, 0x12345678)
NHSTUB(Lseek, 0xff835530) // same as lseek
NHSTUB(PT_PlaySound, 0x12345678)
NHSTUB(RefreshPhysicalScreen, 0x12345678)
NHSTUB(Remove, 0x12345678)
NHSTUB(TurnOffBackLight, 0x12345678)
NHSTUB(TurnOnBackLight, 0x12345678)
NHSTUB(UIFS_WriteFirmInfoToFile, 0x12345678)
NHSTUB(kbd_pwr_off, 0x12345678)
NHSTUB(kbd_pwr_on, 0x12345678)
NHSTUB(openfastdir, 0x12345678)
NHSTUB(readfastdir, 0x12345678)
NHSTUB(rename, 0x12345678)

// defined elsewhere
NHSTUB(SetScriptMode, 0x12345678)
NHSTUB(apex2us, 0x12345678)
NHSTUB(MakeAFScan, 0x12345678)
NHSTUB(ExpCtrlTool_StartContiAE, 0x12345678)
NHSTUB(WriteSDCard, 0x12345678)
NHSTUB(UnlockAF, 0x12345678)
NHSTUB(DoAFLock, 0x12345678)
NHSTUB(GetKbdState, 0x12345678)
NHSTUB(UnsetZoomForMovie, 0x12345678)
NHSTUB(LEDDrive, 0x12345678)
NHSTUB(ScreenLock, 0x12345678)
NHSTUB(ScreenUnlock, 0x12345678)


// nullsubs (as defined in G11's stubs file)
NHSTUB(rewinddirkbd_pwr_on, 0x12345678)  // nullsub
NHSTUB(Unmount_FileSystem, 0x12345678)  // nullsub
NHSTUB(Mount_FileSystem, 0x12345678)  // nullsub
NHSTUB(SetZoomActuatorSpeedPercent, 0x12345678)  // nullsub

So I assume that someone with C and ASM knowledge could make a successful S90 CHDK port based on the G11 project.
« Last Edit: 03 / February / 2010, 16:30:52 by battika »

Offline CanonAddict

  • Newbie
  • *
  • Posts: 2
Re: S90 Porting Thread
« Reply #42 on: 03 / February / 2010, 12:59:32 »
Good news, thanks drewm1980 and battika.

I don't care that much about HD Video, but using CHDK for the S90 would be awesome.

Offline battika

  • Newbie
  • *
  • Posts: 3
Re: S90 Porting Thread
« Reply #43 on: 03 / February / 2010, 15:08:09 »
Yeah, I guess we should forget about HD Video on S90/G11 due to hardware limitation.

Anyways, here is my makefile.inc, not sure if my MEMISOSTART value is correct given I have never seen ARM ASM code before. My test project compiles Okay, all I need is a card reader so that I can transfer DISKBOOT.BIN to my SD card  :)

S90's makefile.inc
Code: [Select]
#31E1
PLATFORMID=12769

PLATFORMOS=dryos

MEMBASEADDR=0x1900
RESTARTSTART=0x50000
MEMISOSTART=0x141DBC
ROMBASEADDR=0xff810000
NEED_ENCODED_DISKBOOT=3

PLFLAGS=-DMEMBASEADDR=$(MEMBASEADDR) -DMEMISOSTART=$(MEMISOSTART) -DMEMISOSIZE=$(MEMISOSIZE)
PLFLAGS+=-DRESTARTSTART=$(RESTARTSTART)

KEYSYS=d4
« Last Edit: 03 / February / 2010, 16:29:45 by battika »

Offline ERR99

  • Sr. Member
  • ****
  • Posts: 325
Re: S90 Porting Thread
« Reply #44 on: 03 / February / 2010, 17:52:28 »
MEMISO start looks correct for S90.
But please dont forget to update also the ASM code. Even if the G11 asm-code looks similar to the S90 bootcode, it is not 100% the same. I have taken a quick look on the S90 Firmware and i found allready some different sub_function adresses in boot.c code. So it is absolutly necessary to update the complete ASM code, the G11 ASM code will not work for this port. If you try to build the G11 Port, only with makefile.inc and stubs_entry2.s adapted, the diskboot.bin will not work and the camera crashes direct during startup.
But hopefully the G11 port is a little help for your porting work.  ;)

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal