ixus175_elph180_100c porting attempt - page 10 - DryOS Development - CHDK Forum

ixus175_elph180_100c porting attempt

  • 201 Replies
  • 108504 Views
*

Offline axman

  • ***
  • 145
Re: ixus175_elph180_100c porting attempt
« Reply #90 on: 17 / June / 2017, 23:02:17 »
Advertisements
apex2us should affect regular shoot and remote shoot equally.

During testing, I tried Exposure overrides; Long exp = 01:30 , short exp = 0.001.  Fail every time on Long, pass every time on short.  On long exp override test, I hear the cam close shutter, LCD then says Busy forever, until battery pull.  Checked my ixus160, Long exp = 01:30 also fails this same way.  My sx530hs does not fail here, with or without exp_drv_task in the processing chain.

Quote
MakeDirectory_Fut shouldn't directly affect shooting. It could be called if raw was enabled.
I don't think raw is enabled, will check.

I read in topic=7889.msg92239 the  SX260 porting thread   and wondered. 

Creating filewrite here is not like the 160.  Here, the 'skip-directory-create' and 'skip-flushing-cache' funcs and related patches are inside their own subs - I may have called those subs wrong, wrong sub, or returned wrong..  Getting skip-directory in the right sub, etc, so it would compile and even run at all was hard.

*

Offline axman

  • ***
  • 145
Re: ixus175_elph180_100c porting attempt
« Reply #91 on: 17 / June / 2017, 23:39:46 »
llibtst.lua i/o is pass, pass overall.  Thanks for reminding about how to test that mkdir relation.

hooktest fails, however, an image is recorded to SD card every time hooktest thinks it fails.  Log attached.  One or more hooks is not being reached AND one or more hooks in maybe the wrong place?  :-/ 

I have not yet followed the documented advice in hooktest script itself.  Doing that next.

Re: ixus175_elph180_100c porting attempt
« Reply #92 on: 18 / June / 2017, 00:31:21 »
Quote
During testing, I tried Exposure overrides; Long exp = 01:30 , short exp = 0.001.  Fail every time on Long, pass every time on short.  On long exp override test, I hear the cam close shutter, LCD then says Busy forever, until battery pull. 
I had the same problem because I misunderstood the units of long exposure. Start with smaller numbers.

*

Offline reyalp

  • ******
  • 14121
Re: ixus175_elph180_100c porting attempt
« Reply #93 on: 18 / June / 2017, 02:29:42 »
Regarding the romlog:

Exception!! Vector 0x10

is an invalid memory access. The task "PTPBulkState8" isn't one we hook directly, but is involved in PTP somehow.

LR and PC are respectively
Code: [Select]
0xFFA828DC
0x006BD1D4
Disassembling the code around these addresses might provide clues. The PC address looks the DryOS kernel code that is copied to RAM.

One way the PTP stuff could get a bad address is if the fwt_data_struct layout isn't correct.

Putting LogCameraEvent logging in filewrite (see g7x for an example) can be helpful to verify the struct, and might also help understand where in the process the crash is happening.
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 14121
Re: ixus175_elph180_100c porting attempt
« Reply #94 on: 18 / June / 2017, 02:40:31 »
hooktest fails, however, an image is recorded to SD card every time hooktest thinks it fails.
Yes, hooktest check with the CHDK hooks are called as expected, the canon shooting process can still work if they aren't.
Quote
Log attached.  One or more hooks is not being reached AND one or more hooks in maybe the wrong place?  :-/ 
It appears that way. shoot() is also reporting failure (even though shots are actually being taken), which is expected if the raw hook isn't reached.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14121
Re: ixus175_elph180_100c porting attempt
« Reply #95 on: 18 / June / 2017, 02:45:29 »
hooktest fails, however, an image is recorded to SD card every time hooktest thinks it fails.
Yes, hooktest check with the CHDK hooks are called as expected, the canon shooting process can still work if they aren't.
Quote
Log attached.  One or more hooks is not being reached AND one or more hooks in maybe the wrong place?  :-/ 
It appears that way. shoot() is also reporting failure (even though shots are actually being taken), which is expected if the raw hook isn't reached.

edit:
I missed this before but, tsamma posted earlier
I can take a RAW with 29MB file size but it's only save RAW by quick press shootfull and not save RAW by shoothalf+shootfull. Is it normal.
This isn't normal. It means the raw hook isn't being called in the "normal" code path, only the quick press one.
« Last Edit: 18 / June / 2017, 17:33:07 by reyalp »
Don't forget what the H stands for.

*

Offline axman

  • ***
  • 145
Re: ixus175_elph180_100c porting attempt
« Reply #96 on: 18 / June / 2017, 15:45:04 »
This isn't normal. It means the raw hook isn't being called in the "normal" code path, only the quick press one.
Thanks!  Knowing this ^^ helped very much. 

Looking at capt_seq, the raw hooks appear to exist in only the two quickshoot code paths (dfs + remote). 

Maybe due to mistakes in my code_gen.txt  -> ref=n ...  Checking..   

And searching for the sub that may have 'normal' code path and place for its raw hook.

*

Offline reyalp

  • ******
  • 14121
Re: ixus175_elph180_100c porting attempt
« Reply #97 on: 18 / June / 2017, 17:43:14 »
Maybe due to mistakes in my code_gen.txt  -> ref=n ...  Checking..   

And searching for the sub that may have 'normal' code path and place for its raw hook.
Typically case 0 in the main capt_seq switch / jumptable handles half press without shooting and "quick" shoot without waiting for half, while case 1 handles normal shoot. Each one of these should eventually lead to the functions where the raw hook and remote hook are located.

As usual, I suggest logging to understand which code paths are taken in which cases. There are some examples in the g7x port under the CAPTSEQ_DEBUG_LOG define. The timestamps can also be helpful to understand which parts come before or after capture.

Note you have to be careful to ensure your logging calls don't trash registers.
Don't forget what the H stands for.


*

Offline axman

  • ***
  • 145
Re: ixus175_elph180_100c porting attempt
« Reply #98 on: 19 / June / 2017, 18:01:47 »
Thanks for the help, I think capt_seq is ok for now. 

Trying to build filewrite with debug enabled, problem compiling.

Code: [Select]
../../../../core/entry.S -> entry.o
-> main.elf
../../../../platform/ixus175_elph180/sub/100c/libplatformsub.a(filewrite.o): In function `log_fwt_msg':
filewrite.c:(.text+0x280): undefined reference to `_LogCameraEvent'
filewrite.c:(.text+0x290): undefined reference to `_LogCameraEvent'
filewrite.c:(.text+0x2b0): undefined reference to `_LogCameraEvent'
filewrite.c:(.text+0x2d4): undefined reference to `_LogCameraEvent'
../../../../platform/ixus175_elph180/sub/100c/libplatformsub.a(filewrite.o): In function `log_fwt_start':
filewrite.c:(.text+0x2f8): undefined reference to `_LogCameraEvent'
collect2: error: ld returned 1 exit status
../../../makefile_sub.inc:67: recipe for target 'main.elf' failed
make[1]: *** [main.elf] Error 1
makefile_base.inc:103: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Have solved this before but can't remember.. Have tried several things, no positive effects.  Any words are appreciated.

*

Offline reyalp

  • ******
  • 14121
Re: ixus175_elph180_100c porting attempt
« Reply #99 on: 19 / June / 2017, 18:49:18 »
Have solved this before but can't remember.. Have tried several things, no positive effects.  Any words are appreciated.
You need to define a stub for LogCameraEvent in stubs_entry_2.S

The address is probably in the funcs_* csv files.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal