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

A810 porting thread

  • 106 Replies
  • 47986 Views
*

Offline nafraf

  • *****
  • 1308
Re: A810 porting thread
« Reply #40 on: 03 / October / 2012, 22:11:29 »
Advertisements
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...
Yes, I operated the camera by hand.
SD-Card was not actually corrupted. After turning off/on message persisted, after removing batteries message disappeared.  But maybe you can ignore that problem by now, it was only for debug purpose.

Did you get information from log files? If you need more tests, just tell me.

*

Offline srsa_4c

  • ******
  • 4451
Re: A810 porting thread
« Reply #41 on: 03 / October / 2012, 22:28:49 »
Yes, I operated the camera by hand.
SD-Card was not actually corrupted. After turning off/on message persisted,
:o
Quote
after removing batteries message disappeared.  But maybe you can ignore that problem by now, it was only for debug purpose.
Did you get information from log files? If you need more tests, just tell me.
I did, but there appears to be a problem with the consistency of get_target_file_num(), note that dmp_0004.bin is missing. I'll modify the file naming, please update svn in a few minutes. Do you also get card error if you don't enable CHDK RAW?
Also, take one picture more if possible, as the writing of debug info is delayed by one.
edit: can you also include the pictures? Keep them small as possible (shoot a piece of paper or something).

edit2: found a bug in 100b filewritetask, please refresh svn
« Last Edit: 03 / October / 2012, 22:46:15 by srsa_4c »

*

Offline nafraf

  • *****
  • 1308
Re: A810 porting thread
« Reply #42 on: 04 / October / 2012, 18:20:20 »
Hi, now I tested on 100d. Results are here.
http://ubuntuone.com/7m29IFgdU7zIk6F98tbRuP

Btw, I found an bug in a810 port, the patched apex2us is replacing the wrong function. It affects 100b and 100d. I'll post the patch later.

100d capt_seq.c
Code: [Select]
      "BL      sub_FF9D8DEC \n"  <-- This is _apex2us, according to stubs_entry.S
      "MOV     R4, R0 \n"
//      "BL      sub_FF8E94F4 \n" //original
      "   BL      apex2us \n"   //patch


*

Offline nafraf

  • *****
  • 1308
Re: A810 porting thread
« Reply #43 on: 05 / October / 2012, 00:52:31 »
a810 and chdkptp color problems.

Using the following implementation, I got colors with a green background. Dump is available here

Code: [Select]
void *vid_get_bitmap_active_palette() {
        extern int active_palette_buffer;
        extern char* palette_buffer[];
        return (palette_buffer[active_palette_buffer]+8);
}

If I use this other implementation, I got the right colors in chdkptp liveview, but OSD objects blinks when camera is in REC mode.  Dump is available here
Code: [Select]
void *vid_get_bitmap_active_palette() {
    return (void *)*(unsigned int*)(0x5400+0x2C); //loc_ff909b0c
}

Thanks


*

Offline srsa_4c

  • ******
  • 4451
Re: A810 porting thread
« Reply #44 on: 09 / October / 2012, 16:22:54 »
@nafraf
If you have some time, can you check how rs with jpeg files work on the camera using this repo? I'm interested whether the files are OK or corrupted. I very much hope that the previous instabilities are gone...
Check all resolutions, especially those where the first tests resulted in incomplete files (L?). Also see whether exif is present in the files. If everything's ok, just report, no need for posting the files.

*

Offline nafraf

  • *****
  • 1308
Re: A810 porting thread
« Reply #45 on: 09 / October / 2012, 20:30:18 »
@nafraf
If you have some time, can you check how rs with jpeg files work on the camera using this repo? I'm interested whether the files are OK or corrupted. I very much hope that the previous instabilities are gone...
Check all resolutions, especially those where the first tests resulted in incomplete files (L?). Also see whether exif is present in the files. If everything's ok, just report, no need for posting the files.
Hi, I tested using 100d.  W, S, M2, M1 are right.  Exif is present.

But, the problem persists in L size shoots. Image and Exif data is truncated.

EDIT: Image deleted, I think that it is not more necessary. :)
« Last Edit: 10 / October / 2012, 12:50:29 by nafraf »

*

Offline srsa_4c

  • ******
  • 4451
Re: A810 porting thread
« Reply #46 on: 09 / October / 2012, 21:38:46 »
 :(
I don't get it. This jpeg is truncated the same way as in the first tests. But there was a problem with those tests: the filewritetask hook was at the wrong place (after a conditional jump instruction), and the task manipulated the data before CHDK code could "see" it.
Your previous test included an L sized jpeg, with the following task data block:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  0A 00 00 00 00 00 00 00 B8 DE 30 00 01 03 00 00  ........¸Ţ0.....
00000010  7E DD 6D 50 00 00 20 09 00 EA 91 43 B8 DE 30 00  ~ÝmP.. ..ę‘C¸Ţ0.
00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000040  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000050  00 00 00 00 41 2F 44 43 49 4D 2F 31 32 30 5F 5F  ....A/DCIM/120__
00000060  5F 31 30 2F 49 4D 47 5F 31 36 36 39 2E 4A 50 47  _10/IMG_1669.JPG

In this case, the jpeg size is exactly matching the orange value above, and the whole file appears as one big chunk.

Your first tests included truncated L jpegs with uniform size: 1305088 bytes (0x13EA00), exactly the size as the example in your most recent post. Those jpegs had (possibly manipulated) data block like this:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  0A 00 00 00 00 46 00 00 4C 76 34 00 01 83 00 00  .....F..Lv4.....
00000010  05 91 60 50 00 00 20 09 00 30 92 43 00 EA 13 00  .‘`P.. ..0’C.ę..
00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000040  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000050  03 00 00 00 41 2F 44 43 49 4D 2F 31 32 30 5F 5F  ....A/DCIM/120__
00000060  5F 30 39 2F 49 4D 47 5F 31 36 33 32 2E 4A 50 47  _09/IMG_1632.JPG
The orange value shows the truncated size, and no other data chunks can be seen (either).

What happens if you shoot (rs) a gray jpeg as in your 04 / October / 2012, 23:20:20 post?

Or, what happens if you redo the 04 October test which creates those dmp_xxxx.bin files, but with a more complex scene like the one on your latest truncated image?

More observations:
the blue value in the dump is the exif size, the purple one is the whole file size.
edit:
... I mean the blue value is the file offset the chunk needs to be written at.
I have a feeling that to get the correct content from these new models, we'll have to track the Write() and lseek() calls...
« Last Edit: 09 / October / 2012, 22:07:17 by srsa_4c »

*

Offline nafraf

  • *****
  • 1308
Re: A810 porting thread
« Reply #47 on: 09 / October / 2012, 22:21:07 »
Quote
What happens if you shoot (rs) a gray jpeg as in your 04 / October / 2012, 23:20:20 post?
Same behavior. The image is here.


I'll post the other test later...

Edit:
I forgot to comment, using L resolution, the camera shows the message "Memory Card Error" after remote shoot.  If I try to shoot again, camera beeps 4 times, chdkptp locks. After restarting the camera, camera starts normally.
« Last Edit: 09 / October / 2012, 22:28:31 by nafraf »


*

Offline srsa_4c

  • ******
  • 4451
Re: A810 porting thread
« Reply #48 on: 09 / October / 2012, 22:41:24 »
I forgot to comment, using L resolution, the camera shows the message "Memory Card Error" after remote shoot.  If I try to shoot again, camera beeps 4 times, chdkptp locks. After restarting the camera, camera starts normally.
- something is checking the (fake) file descriptor that we return OR
- something is checking the execution time required to open the file OR
- lseek() should return something different
...
A whole new approach will be needed here...

If you redo the test that makes the .dmp files, only use this L resolution, maybe something interesting can be caught.

*

Offline nafraf

  • *****
  • 1308
Re: A810 porting thread
« Reply #49 on: 09 / October / 2012, 22:47:17 »
Redo of test with chdk-s1.remcap-a810-2186:
Resolution L, image with more details: file is here
Dump is in attachment.

 

Related Topics