SD980 port - page 10 - DryOS Development - CHDK Forum supplierdeeply

SD980 port

  • 169 Replies
  • 52971 Views
*

Offline RaduP

  • *****
  • 908
Re: SD980 port
« Reply #90 on: 01 / October / 2009, 05:16:19 »
Advertisements
I tried to override the ISO to all kind of reasonable values, but the camera won't take the shot, and sometimes even crash.
I guess the props are changed, tomorrow I'll have to dump them in a file and see what happens.

*

Offline RaduP

  • *****
  • 908
Re: SD980 port
« Reply #91 on: 01 / October / 2009, 14:04:12 »
Can someone with a DryOS camera tell me the value of their PROPCASE_TV under different light conditions, when the camera is in the P mode? Would make my works easier :/

*

Offline RaduP

  • *****
  • 908
Re: SD980 port
« Reply #92 on: 03 / October / 2009, 21:19:28 »
Current status: I am working at saving the RAW file. I can't find mkdir(), spent a few hours trying to find it from the SX10 dump, but absolutely no luck, the firmware is very very different in this area, can't even find common strings.

*

Offline RaduP

  • *****
  • 908
Re: SD980 port
« Reply #93 on: 04 / October / 2009, 00:14:45 »
I got the RAW to work with some hacks (although it crashes after taking more than 1 pic in RAW mode).
There is a lot of software correction of the images at wide angles..


*

Offline RaduP

  • *****
  • 908
Re: SD980 port
« Reply #94 on: 04 / October / 2009, 03:43:33 »
Found mkdir..

*

Offline RaduP

  • *****
  • 908
Re: SD980 port
« Reply #95 on: 04 / October / 2009, 17:59:04 »
If anyone wants to help, here are some of the functions I didn't find:
Code: [Select]
#include "stubs_asm.h"

NHSTUB(AllocateUncacheableMemory, 0xFF8389D8)
NHSTUB(GetDrive_ClusterSize, 0xDEADC0DE)
NHSTUB(GetDrive_TotalClusters, 0xDEADC0DE)
NHSTUB(GetDrive_FreeClusters, 0xDEADC0DE)
NHSTUB(SetPropertyCase, 0xFF888A44)
NHSTUB(kbd_read_keys, 0xFF8335A8)
NHSTUB(platformsub_kbd_fetch_data, 0xFF85AE80)
NHSTUB(kbd_read_keys_r2, 0xFF85A83C)
NHSTUB(qsort, 0xDEADC0DE)


NHSTUB(TurnOffBackLight, 0xDEADC0DE)
NHSTUB(vsprintf, 0xFF820350)
NHSTUB(VbattGet, 0xDEADC0DE)
NHSTUB(GetZoomLensCurrentPoint, 0xDEADC0DE)
NHSTUB(GetZoomLensCurrentPosition, 0xDEADC0DE)
NHSTUB(RefreshPhysicalScreen, 0xFF9F8694)
NHSTUB(EnterToCompensationEVF, 0xDEADC0DE)
NHSTUB(ExitFromCompensationEVF, 0xDEADC0DE)
NHSTUB(PT_PlaySound, 0xDEADC0DE)
NHSTUB(DoAFLock, 0xDEADC0DE)
NHSTUB(UnlockAF, 0xDEADC0DE)
NHSTUB(LEDDrive, 0xDEADC0DE)
NHSTUB(WriteSDCard, 0xDEADC0DE)
NHSTUB(PostLogicalEventForNotPowerType, 0xDEADC0DE)
NHSTUB(apex2us, 0xDEADC0DE)

// null sub - point these at nullsub_1 as labelled in IDA

NHSTUB(kbd_pwr_off, 0xDEADC0DE)
NHSTUB(kbd_pwr_on, 0xDEADC0DE)
NHSTUB(Mount_FileSystem, 0xDEADC0DE)
NHSTUB(Unmount_FileSystem, 0xDEADC0DE)
NHSTUB(SetZoomActuatorSpeedPercent, 0xDEADC0DE)
NHSTUB(rewinddir, 0xDEADC0DE)

NHSTUB(UpdateMBROnFlash, 0xDEADC0DE)
NHSTUB(GetOpticalTemperature, 0xDEADC0DE)
NHSTUB(Open, 0xFF8353B0)
NHSTUB(Close, 0xFF835408)
NHSTUB(Write, 0xFF835498)
NHSTUB(lseek, 0xFF835524)
NHSTUB(mkdir, 0xFF83587C)
NHSTUB(Remove, 0xDEADC0DE)
NHSTUB(malloc, 0xFF8140DC)
NHSTUB(free, 0xFF814138)
NHSTUB(strcmp, 0xFF8203A8)
NHSTUB(rename, 0xDEADC0DE)
NHSTUB(opendir, 0xFFA7E0B0)
NHSTUB(ReadFastDir, 0xDEADC0DE)
NHSTUB(stat, 0xDEADC0DE)
NHSTUB(kbd_p2_f, 0xFF832ECC)
NHSTUB(strlen, 0xFF81400C)
NHSTUB(strcpy, 0xFF82038C)
NHSTUB(SetFileTimeStamp, 0xDEADC0DE)

//implemented in the wrappers, in C
//NHSTUB(strrchr, 0xDEADC0DE)
//NHSTUB(strncpy, 0xDEADC0DE)


And here are some functions that needs to be verified (the partial matches)
Code: [Select]
// !!! THIS FILE IS GENERATED. DO NOT EDIT. !!!
#include "stubs_asm.h"

NSTUB(AllocateMemory, 0xffa9eda0)
// Best match: 56%
NSTUB(AllocateUncacheableMemory, 0xff8389e4)
// ERROR: Close is not found!
NSTUB(CreateTask, 0xff81e5b4)
NSTUB(DeleteFile_Fut, 0xff834d94)
// ERROR: EnterToCompensationEVF is not found!
NSTUB(ExecuteEventProcedure, 0xff884e58)
// ERROR: ExitFromCompensationEVF is not found!
// Best match: 57%
NSTUB(ExitTask, 0xff81e844)
NSTUB(Fclose_Fut, 0xff834f10)
NSTUB(Feof_Fut, 0xff8350fc)
NSTUB(Fflush_Fut, 0xff835138)
NSTUB(Fgets_Fut, 0xff835064)
NSTUB(Fopen_Fut, 0xff834ed0)
NSTUB(Fread_Fut, 0xff834fbc)
NSTUB(FreeMemory, 0xffa9ed98)
// Best match: 91%
NSTUB(FreeUncacheableMemory, 0xff838a18)
NSTUB(Fseek_Fut, 0xff8350b0)
NSTUB(Fwrite_Fut, 0xff835010)
// Best match: 52%
NSTUB(GetBatteryTemperature, 0xff85e2ac)
// Best match: 52%
NSTUB(GetCCDTemperature, 0xff85e238)
// Best match: 85%
NSTUB(GetCurrentAvValue, 0xff9446cc)
// Best match: 64%
NSTUB(GetCurrentTargetDistance, 0xff942ca0)
// ERROR: GetDrive_ClusterSize is not found!
// ERROR: GetDrive_FreeClusters is not found!
// ERROR: GetDrive_TotalClusters is not found!
// Best match: 75%
NSTUB(GetFocusLensSubjectDistance, 0xffa9c098)
// ERROR: GetOpticalTemperature is not found!
// Best match: 96%
NSTUB(GetParameterData, 0xff979b1c)
// Best match: 72%
NSTUB(GetPropertyCase, 0xff888b48)
// Best match: 96%
NSTUB(GetSystemTime, 0xffa9edf8)
// Best match: 74%
NSTUB(GetZoomLensCurrentPoint, 0xff947174)
NSTUB(GetZoomLensCurrentPosition, 0xffa904e8)
// Best match: 77%
NSTUB(IsStrobeChargeCompleted, 0xff8c3a24)
NSTUB(LocalTime, 0xff882754)
// Best match: 93%
NSTUB(LockMainPower, 0xff8909b0)
// ERROR: Lseek is not found!
// Best match: 92%
NSTUB(MakeDirectory_Fut, 0xff834e08)
// Best match: 57%
NSTUB(MoveFocusLensToDistance, 0xffb08258)
// Best match: 58%
NSTUB(MoveZoomLensWithPoint, 0xffa9c980)
// Best match: 62%
NSTUB(NewTaskShell, 0xff8885f4)
// ERROR: Open is not found!
NSTUB(Read, 0xff81ab78)
// ERROR: ReadFastDir is not found!
// ERROR: RefreshPhysicalScreen is not found!
// ERROR: Remove is not found!
// Best match: 53%
NSTUB(RenameFile_Fut, 0xff834ecc)
// ALT: NSTUB(RenameFile_Fut, 0xffa65670) // 8/7
// ALT: NSTUB(RenameFile_Fut, 0xffa656c0) // 8/7
// Best match: 93%
NSTUB(SetAutoShutdownTime, 0xff890a24)
// Best match: 55%
NSTUB(SetFileTimeStamp, 0xff932af4)
// Best match: 96%
NSTUB(SetParameterData, 0xff979a8c)
// Best match: 84%
NSTUB(SetPropertyCase, 0xff874698)
// Best match: 92%
NSTUB(SleepTask, 0xff83865c)
// Best match: 60%
NSTUB(TakeSemaphore, 0xff838324)
// ERROR: TurnOffBackLight is not found!
// Best match: 54%
NSTUB(TurnOnBackLight, 0xff89e2a0)
// ERROR: UIFS_WriteFirmInfoToFile is not found!
// Best match: 93%
NSTUB(UnlockMainPower, 0xff890904)
// ERROR: UpdateMBROnFlash is not found!
// ERROR: VbattGet is not found!
// ERROR: Write is not found!
NSTUB(_log, 0xffb3bc5c)
NSTUB(_log10, 0xffb3a8e8)
NSTUB(_pow, 0xffb3aa58)
NSTUB(_sqrt, 0xffb3d8e0)
NSTUB(close, 0xff81a990)
// Best match: 71%
NSTUB(closedir, 0xffa7e380)
// Best match: 71%
NSTUB(closefastdir, 0xffa7e380)
// ERROR: free is not found!
// Best match: 86%
NSTUB(kbd_p1_f, 0xff833624)
// Best match: 86%
NSTUB(kbd_p1_f_cont, 0xff833630)
// ERROR: kbd_p2_f is not found!
// Best match: 51%
NSTUB(kbd_pwr_off, 0xff85ae98)
// ERROR: kbd_pwr_on is not found!
// ERROR: kbd_read_keys is not found!
// Best match: 69%
NSTUB(kbd_read_keys_r2, 0xff85a858)
// ERROR: lseek is not found!
// ERROR: malloc is not found!
NSTUB(memcmp, 0xff8203e8)
NSTUB(memcpy, 0xff83df94)
NSTUB(memset, 0xff9fbfa0)
// ERROR: mkdir is not found!
NSTUB(mktime_ext, 0xff8a5d68)
NSTUB(open, 0xff81a8e0)
// ERROR: opendir is not found!
// ERROR: openfastdir is not found!
// ERROR: qsort is not found!
// 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)
// ERROR: stat is not found!
// Best match: 61%
NSTUB(strcat, 0xff813f38)
// Best match: 56%
NSTUB(strchr, 0xff813fc0)
// ERROR: strcmp is not found!
// Best match: 77%
NSTUB(strcpy, 0xff813f20)
NSTUB(strftime, 0xff8a5770)
// Best match: 79%
NSTUB(strlen, 0xff8203c4)
NSTUB(strncmp, 0xff813f74)
// Best match: 73%
NSTUB(strncpy, 0xff813f38)
// Best match: 71%
NSTUB(strrchr, 0xff83df6c)
// ALT: NSTUB(strrchr, 0xff8a5538) // 18/8
// Best match: 96%
NSTUB(strtol, 0xff83e274)
// Best match: 86%
NSTUB(time, 0xff882ccc)
// ERROR: vsprintf is not found!
NSTUB(write, 0xff81abd8)

*

Offline reyalp

  • ******
  • 14000
Re: SD980 port
« Reply #96 on: 04 / October / 2009, 18:48:15 »
WriteSDCard is probably FF933968, (leaving ReadSDCard as FF933780). This is based on FF86AF50, which also shows why udumper doesn't work, even with the right encoding. Interestingly, there are two more functions loaded into that structure (which I assume is some kind of driver) than in earlier cams, but they don't look like read/write.

PT_Playsound is probably FF87D8A8 (via the string, PT_Playsound)

UpdateMBROnFlash FF813F74 from
Code: [Select]
ROM:FF86AF14                 ADR     R1, aBootdisk   ; "BOOTDISK"
ROM:FF86AF18                 ADD     R0, R4, #0x40
ROM:FF86AF1C                 BL      sub_FF813F74

qsort FF9FC560, found by proximity to probable sscanf (FF9FC59C)

kbd_pwr_off and kbd_pwr_on probably don't exist, like sd990. Just nullsub them.

Mount_FileSystem Unmount_FileSystem, SetZoomActuatorSpeedPercent and rewinddir are all expected to be missing on dryos. Nullsub again.

apex2us you will find when doing exp_drv_task, if you choose to implement extra long exposures. Otherwise you don't need it.

Looks like SD980 should definitely be a new dryos reference firmware.
Don't forget what the H stands for.

*

Offline RaduP

  • *****
  • 908
Re: SD980 port
« Reply #97 on: 04 / October / 2009, 19:08:17 »
Thanks, I found the dir open/close read functions, will post them later.


Re: SD980 port
« Reply #98 on: 04 / October / 2009, 19:09:46 »
That's what I found:
strrchr ROM:FF813FE4
qsort   ROM:FF9FC560
WriteSDCard FF933968 (95%sure)
UnlockAF ROM:FF836928
DoAFLock ROM:FF8368F0
kbd_read_keys ok
"Trying is the first step towards failure." (Homer Simpson)

*

Offline RaduP

  • *****
  • 908
Re: SD980 port
« Reply #99 on: 04 / October / 2009, 19:58:47 »
qsort confirmed, I was actually just about to search for it for the file menu thingy.

 

Related Topics