A810 porting thread - page 4 - DryOS Development - CHDK Forum

A810 porting thread

  • 106 Replies
  • 52861 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: A810 porting thread
« Reply #30 on: 24 / September / 2012, 15:15:46 »
Advertisements
The problem is that the picture is partially saved.  See sample image in attachment
I see. If you haven't experienced a hangup, that's pretty good.
I have updated that repo, included the loader folder which I forgot to add to version control. I have activated some debug code: The - currently unused - pointer to the file name now points to the start of the "message", which will be saved (256 bytes) if you also request a yuv image.
A sample command to get it and the jpeg looks like this:
rs /tmp -f=5
This will save 2 files into /tmp , with file names like "img_0123.jpg" and "img_0123.yuv". I'm mostly interested in the latter. To get possibly more info, please make 2-3 shots, and upload the yuv files. You can also upload one of the jpegs (as is).

You can get some help about the rs or rs2 commands: help rs. Reyalp's rs2 is unfinished, has some restrictions (needs a filename, not a folder name).

*

Offline nafraf

  • *****
  • 1308
Re: A810 porting thread
« Reply #31 on: 24 / September / 2012, 16:23:56 »
I did more tests, jpg, yuv and log file are in each tar.gz.
I tested with different resolutions, 3 test using rs and 1 using rs2.
With low resolution command seems to work, when resolution increases, file is not correctly saved:rsS, rsM1, rs2M2,rsL

After some shoots, rs2 return timeout error.  See the log file.


*

Offline srsa_4c

  • ******
  • 4451
Re: A810 porting thread
« Reply #32 on: 24 / September / 2012, 16:45:04 »
Thanks. Very interesting, something completely unexpected by looking at those yuv files included with the large files. Can you upload some yuvs with small image sizes? I can't find any in the tarballs.
The large ones are all cut off at a certain size, and I can't see any sign of other file chunks (in the 256 byte snippets). There's no exif in there either. However, the small files are complete with exif. Weird.

edit: found some more yuvs in the M1 tarball.

edit2: I'm starting to have a feeling that FileWriteTask gets invoked multiple times per shoot under some conditions...
« Last Edit: 24 / September / 2012, 16:56:31 by srsa_4c »

*

Offline nafraf

  • *****
  • 1308
Re: A810 porting thread
« Reply #33 on: 24 / September / 2012, 21:50:59 »
Sorry about the delay, I created a temporary repo for this trial: https://subversion.assembla.com/svn/chdk-s1.remcap-a810/
I checked in the 1.00d changes. The code is kind of messy, I left a lot of comments, mostly trying to document the firmware routine.
@srsa_4c
In attachment, a patch to the chdk-s1.remcap-a810 repository for remote capture for a810.100b.

Test results with S and L sizes are similar to 100d results.
Images and logs are here:
*rsS_a810_100b.tar.gz: After 5 shoots, images with size S, photos are correct.

* rsL_a810_100b.tar.gz: Using size L, files are partially saved.  After 3 shoots, an error is returned:
Code: [Select]
con 9> rs . f=5
unexpected return code 0x2ff
remoteshoot: shoot() failed
ERROR: shoot failed
___> ls
ERROR: not connected

Camera seems to be running something, it does not answer, but crash log is not generated.  The ROMLOG obtained is from a previous crash.

*

Offline srsa_4c

  • ******
  • 4451
Re: A810 porting thread
« Reply #34 on: 25 / September / 2012, 17:49:35 »
Camera seems to be running something, it does not answer, but crash log is not generated.  The ROMLOG obtained is from a previous crash.
I don't know what causes such a flaky behaviour, the current filewritetask patch - although not correct for this cam - doesn't seem that bad. I've identified a few spots for improvement, but that alone won't be enough. Hopefully later this week I can come up with a real test code that will be able to discover what's going on during file saving.
Thanks for these tests, I think I gathered enough RAM snippets to have a somewhat better understanding. I'll publish my findings later.

About some possible errors:
- if something happens with the ptp connection while rs is in progress, you can experience partial camera hangup, which should disappear after 30 or 60 seconds. A blocked filewritetask will not allow the camera to shut down correctly (this can be identified by the blinking light that signals file save).
- if ptp disappears completely even after unplugging/plugging usb, the ptp task may have died (if something like this can happen without causing the cam to shutdown or assert).

Re: A810 porting thread
« Reply #35 on: 27 / September / 2012, 07:10:07 »
I uploaded a dump of 1.00e to box.com/chdk earlier....

*

Offline nafraf

  • *****
  • 1308
Re: A810 porting thread
« Reply #36 on: 27 / September / 2012, 18:11:27 »
I uploaded a dump of 1.00e to box.com/chdk earlier....
I can help with the port, but I'll need your help for tests.  Send me a PM with your e-mail to send you the link to the test releases.

*

Offline srsa_4c

  • ******
  • 4451
Re: A810 porting thread
« Reply #37 on: 03 / October / 2012, 17:19:28 »
I don't know what causes such a flaky behaviour
Now I know. I forgot to test the code before committing it. The camera tried to save the jpeg file as usual and (in parallel) tried to transfer it over ptp.
The current code should be more stable.

@nafraf

There's a new repo, which hosts a debug version. Its purpose is to discover how the file is saved after shooting. I've tried to explain how to use it here. If you have some time, can you do that test? (Note that using ptp is not recommended with the debug code).

*

Offline nafraf

  • *****
  • 1308
Re: A810 porting thread
« Reply #38 on: 03 / October / 2012, 21:23:02 »
There's a new repo, which hosts a debug version. Its purpose is to discover how the file is saved after shooting. I've tried to explain how to use it here. If you have some time, can you do that test? (Note that using ptp is not recommended with the debug code).
This was the shoot sequence :
 JPEG ONLY L, M1, M2, S, W
 JPEG+ CHDK RAW  L, M1, M2, S, W, S   

After the test, I saw that you were talking about S90 native RAW  :blink:  But I put all the DMP*.BIN files in the .tar.gz

I'm not sure if it was related to the RAW CHDK feature enable, but I got Memorycard error after last S shoot.  I had to format the sd-card to make a new test. During second test I got the same behavior.

*

Offline srsa_4c

  • ******
  • 4451
Re: A810 porting thread
« Reply #39 on: 03 / October / 2012, 21:52:09 »
This was the shoot sequence :
 JPEG ONLY L, M1, M2, S, W
 JPEG+ CHDK RAW  L, M1, M2, S, W, S   

After the test, I saw that you were talking about S90 native RAW
Sorry about confusing you, of course your cam doesn't have Canon RAW (the debug code is the same for both cams, and I didn't want to explain the process twice). The test is meant to be done without CHDK RAW.
Quote
I'm not sure if it was related to the RAW CHDK feature enable, but I got Memorycard error after last S shoot.  I had to format the sd-card to make a new test. During second test I got the same behavior.
You can get "card error" if something checks a fake file descriptor returned by open(), later. Without ptp, I don't know what could have happened to cause this. Have you done this test by operating the camera by hand? Has the card actually become corrupted?
Thanks btw, the result is unexpected...

 

Related Topics


SimplePortal © 2008-2014, SimplePortal