DryOS - some success - page 18 - DryOS Development - CHDK Forum
supplierdeeply

DryOS - some success

  • 220 Replies
  • 149961 Views
Re: DryOS - some success
« Reply #170 on: 27 / January / 2008, 19:02:26 »
Advertisements
Quote from: ewavr
Quote
1. Try this version with increased startup delay - http://www.zshare.net/download/6914475366a739/

Many thanks for the update, seems to resolve numerous problems I was experiencing with the previous version.



 

*

Offline TapouT

  • *
  • 15
  • [S5 IS]
Re: DryOS - some success
« Reply #171 on: 27 / January / 2008, 19:13:59 »
Any progress with the S5?.......Any S5 progress?..... when will the S5 be done? ::)

Just Kidding DataGhost, hopefully your exams are going well (or did go well, if your finshed). ;)

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: DryOS - some success
« Reply #172 on: 28 / January / 2008, 06:57:40 »
The other issue (default 01/01/2000 12:00 AM time/date) is still there. Does not appear to use the camera's time and date when creating/modifying the directory/file).

Also, I noticed when taking RAW photographs, the Date and Time for the first RAW photo (after camera boot), always has the time/date set to 01/01/2000 12:00 AM. If I take another RAW (without camera turn off/on) photo, the 2nd (and 3rd) do have the date/time set correctly. Both V16 and V23 behave the same in this regard.

This is because the function of setting file date/time (utime()) still not found for DRYOS.
Without this function in VxWorks ALL (not first!) RAW files have 01/01/2000 12:00 AM date/time.
I have long tried to find this function, but without success.... :(

*

Offline jeff666

  • ****
  • 181
  • A720IS
Re: DryOS - some success
« Reply #173 on: 28 / January / 2008, 07:42:46 »
Quote from: ewavr
This is because the function of setting file date/time (utime()) still not found for DRYOS.
Without this function in VxWorks ALL (not first!) RAW files have 01/01/2000 12:00 AM date/time.
I have long tried to find this function, but without success.... :(

So that's what utime is for :)

Since we also have this long-filename-"problem" in DryOS and found a way to hook low-level-SD-access (see universal-dumper-thread), how about reading the SD and maybe writing the date ourselves?

Cheers.


*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: DryOS - some success
« Reply #174 on: 28 / January / 2008, 07:55:26 »
Since we also have this long-filename-"problem" in DryOS and found a way to hook low-level-SD-access (see universal-dumper-thread), how about reading the SD and maybe writing the date ourselves?

And write own OS? No! Find utime() much easier. :)
Maybe can help next thing : when CHDK starts, it creates (and erases) some file.  After that everything is Ok.

upd:
And about auto-adjust CHDK startup time:

If core_spytask() waits while InitFileModules task runs, and then reads config file etc. - it works on a710. Can you verify this on a720?

core/main.c
Code: [Select]
static volatile int spytask_can_start;

// VxWorks only !!!
void core_hook_task_delete(void *tcb) {
 char *name = (char*)(*(long*)((char*)tcb+0x34));
 if (strcmp(name,"tInitFileM")==0) spytask_can_start=1;
}


void core_spytask()
{
  ....
    spytask_can_start=0;
    while(!spytask_can_start) msleep(10);
 
    blink, create folders, read config etc...


and platform/a720/sub/100c/boot.c

 sorry, old my code cannot work
 need set spytask_can_start variable (defined in main.c) to 1 before InitFileModules task exits.
 But I cannot write assembler code without testing....


edit2: sorry, spytask_can_start must be defined on one file
« Last Edit: 28 / January / 2008, 09:37:09 by ewavr »

*

Offline jeff666

  • ****
  • 181
  • A720IS
Re: DryOS - some success
« Reply #175 on: 28 / January / 2008, 09:02:02 »
Quote from: ewavr
And write own OS? No! Find utime() much easier. :)

And I have an idea where to look for it (=>red-eye editing function).

Quote
And about auto-adjust CHDK startup time:

If core_spytask() waits while InitFileModules task runs, and then reads config file etc. - it works on a710. Can you verify this on a720?

Should work. We already hook task_InitFileModules for SDHC-support. I'll test it this evening when I'm home.

update:
I did a test, and it worked. To circumvent the one-file-problem, I did the same we already do to signal raw-data availability - call a function in core/main.c.

Here's a svn diff to rev. 269: (this sounds like the right time to ask for svn-write-access :D)

Code: [Select]
Index: include/core.h
===================================================================
--- include/core.h      (revision 269)
+++ include/core.h      (working copy)
@@ -11,6 +11,7 @@
 void gui_init();

 void core_rawdata_available();
+void core_spytask_can_start();

 #define NOISE_REDUCTION_AUTO_CANON      (0)
 #define NOISE_REDUCTION_OFF             (1)
Index: platform/a720/sub/100c/boot.c
===================================================================
--- platform/a720/sub/100c/boot.c       (revision 269)
+++ platform/a720/sub/100c/boot.c       (working copy)
@@ -1289,11 +1289,14 @@
                 "MOVNE   R0, R5\n"
                 "BLNE    sub_FFC5B69C\n"
                 "BL      sub_FFC5A4E8_my\n"    // continue to SDHC-hook here!
+
+                "BL      core_spytask_can_start\n"      // CHDK: Set "it's-save-to-start"-Flag for spytask
+
                 "CMP     R4, #0\n"
                 "MOVEQ   R0, R5\n"
                 "LDMEQFD SP!, {R4-R6,LR}\n"
                 "MOVEQ   R1, #0\n"
-                "BEQ     sub_FFC5B69C\n"
+                "BEQ     sub_FFC5B69C\n"        // cameralog "LogicalEvent...", it's save to run this after spytask has started
                 "LDMFD   SP!, {R4-R6,PC}\n"
         );
 }; //#fe
Index: core/main.c
===================================================================
--- core/main.c (revision 269)
+++ core/main.c (working copy)
@@ -61,6 +61,10 @@
     raw_data_available = 1;
 }

+void core_spytask_can_start() {
+        spytask_can_start = 1;
+}
+
 void core_spytask()
 {
     int cnt = 1;
Index: version.inc
===================================================================
--- version.inc (revision 269)
+++ version.inc (working copy)
@@ -1 +1 @@
-BUILD_NUMBER := 17
+BUILD_NUMBER := 24

With the changes, CHDK starts virtually immediately (very shortly after the display was enabled), file access still works as expected.

I can also confirm BB's observation that only the first raw has the wrong time.  I traced the problem a little and this is what I found:
* Every file creation that takes place before the camera has written a file by itself, gets the wrong time.
* After the camera has wrote a file by itself, the files created by CHDK have the proper time/date.
(tested by doing raw-avg several times, then shooting one jpg (no raw!), then raw-avg. again)

Cheers.
« Last Edit: 28 / January / 2008, 13:56:24 by jeff666 »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: DryOS - some success
« Reply #176 on: 28 / January / 2008, 14:49:09 »
(this sounds like the right time to ask for svn-write-access :D)

Not a bad idea  :)

Here task creation/deletion log for 2Gb FAT16 card at camera startup (a710, playback mode):
Code: [Select]
-tRootTask 0
+tSpyTask 0
+tClockSave 0
+tWdt 0
+tSD1stInit 0
-tSD1stInit 60
+tAudioTsk 230
+tImageSens 230
+tZoomLens 230
+tZoomEvent 230
+tFocusLens 240
+tFocusEven 240
+tIris 240
+tIrisEvent 240
+tMechaShut 240
+tCZ 240
+tHeartBeat 240
+tOptZoomSe 250
+tAsynchroC 250
+tISCPUInit 250
+tLEDCon 250
+tImgPlayDr 250
+tFWDDATA 250
+tBeepTask 250
+tCtrlSrv 250
+tPhySw 260
+tShootSeqT 260
+tCaptSeqTa 260
+tCreateHea 260
+tDvlpSeqTa 260
+tMovieCtrl 260
+tBye 270
+tTempCheck 270
+tCommonDri 280
+tInitFileM 290
+tStartupIm 300
-tStartup 310
+tReadAsync 310
-tAudioTsk 320
+tUartSio 320
+tDevelopMo 380
+tSynchTask 380
+tSyncPerio 380
+tAfIntSrvT 390
+tAFTask 390
+tWBIntegTa 390
+tOBCtrlTas 400
+tExpDrvTas 400
+tBrtMsrTas 410
+tEFChargeT 410
+tCntFlashT 410
+tCtgTotalT 420
-tISCPUInit 420
+tCtgTotalT 430
+tFolderCre 430
+tCtgTotalT 430
+tCtgTotalT 430
-tInitFileM 440
+tWBCtrl 480
-tStartupIm 1080
+tEvShel1 1360
+tLowConsol 1360
+tConsoleSv 1360
-tCommonDri 1400
-tCtgTotalT 1440
-tCtgTotalT 1450
+tEnterDPOF 1490
-tEnterDPOF 1530
-tCtgTotalT 1550

and slower 4Gb card (FAT16+FAT32):
Code: [Select]
-tRootTask 0
+tSpyTask 0
+tClockSave 0
+tWdt 0
+tSD1stInit 0
-tSD1stInit 60
+tAudioTsk 230
+tImageSens 230
+tZoomLens 240
+tZoomEvent 240
+tFocusLens 240
+tFocusEven 240
+tIris 250
+tIrisEvent 250
+tMechaShut 250
+tCZ 250
+tHeartBeat 250
+tOptZoomSe 250
+tAsynchroC 250
+tISCPUInit 250
+tLEDCon 250
+tImgPlayDr 260
+tFWDDATA 260
+tBeepTask 260
+tCtrlSrv 260
+tPhySw 260
+tShootSeqT 270
+tCaptSeqTa 270
+tCreateHea 270
+tDvlpSeqTa 270
+tMovieCtrl 270
+tBye 270
+tTempCheck 270
+tCommonDri 290
+tInitFileM 290
+tStartupIm 310
-tStartup 310
+tReadAsync 320
-tAudioTsk 320
+tUartSio 330
+tDevelopMo 360
+tSynchTask 360
+tSyncPerio 360
+tAfIntSrvT 360
+tAFTask 380
+tWBIntegTa 380
+tOBCtrlTas 390
+tExpDrvTas 390
+tBrtMsrTas 390
+tEFChargeT 390
+tCntFlashT 410
-tISCPUInit 430
+tWBCtrl 520
-tStartupIm 990
+tEvShel1 1010
+tLowConsol 1010
+tConsoleSv 1010
-tCommonDri 1040
+tCtgTotalT 1580
+tCtgTotalT 1590
+tFolderCre 1590
+tCtgTotalT 1590
+tCtgTotalT 1590
-tInitFileM 1600
-tCtgTotalT 1610
+tEnterDPOF 1630
-tCtgTotalT 1670
-tCtgTotalT 1670
-tEnterDPOF 1820

In first case InitFileModules finished at 450 ms, in second at 1600 ms. In both cases CHDK loads successfull.
« Last Edit: 28 / January / 2008, 15:41:49 by ewavr »

*

Offline wap4

  • **
  • 95
  • A720IS
Re: DryOS - some success
« Reply #177 on: 31 / January / 2008, 00:22:56 »
       This message is for ewavr!
       
       1) It seems that allbest's build (v16) for A720IS has not yet variable video bitrate/quality option.
           Will it be added sometimes later? I would love that feature!

       2)Also I had a strange issue regarding the firmware hack:I started the camera in playback mode,
          then accedentally pressed 'disp' instead of 'alt' button.The lens suddenly extended and the display
          went in 'record' mode for a second.Is it normal?(I assume it is not,ideally pressing 'disp' in
          playback mode should not give anything)
 
       Thanks in advance!


*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: DryOS - some success
« Reply #178 on: 31 / January / 2008, 17:33:06 »
       1) It seems that allbest's build (v16) for A720IS has not yet variable video bitrate/quality option.
           Will it be added sometimes later? I would love that feature!

       2)Also I had a strange issue regarding the firmware hack:I started the camera in playback mode,
          then accedentally pressed 'disp' instead of 'alt' button.The lens suddenly extended and the display
          went in 'record' mode for a second.Is it normal?(I assume it is not,ideally pressing 'disp' in
          playback mode should not give anything)
 
       Thanks in advance!

1. Some VxWorks functions currently not found in DRYOS, sorry.
2. It seems that all code is OK, but... Now I don't have a720, maybe someone else can resolve this problem.

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: DryOS - some success
« Reply #179 on: 31 / January / 2008, 17:39:54 »
Maybe for someone of future DRYOS developers can be useful CHDK signatures (for DRYOS only, A720 based).
For A650 we have good coincidence, for A720 - 100%  ;)

 

Related Topics