Porting a camera sx530hs - page 11 - DryOS Development - CHDK Forum supplierdeeply

Porting a camera sx530hs

  • 300 Replies
  • 149102 Views
*

Offline blackhole

  • *****
  • 945
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #100 on: 13 / April / 2016, 13:02:31 »
Advertisements
Quote
You can dump memory to a file on your PC without any patch, using something like:
OK,thanks.

*

Offline blackhole

  • *****
  • 945
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #101 on: 13 / April / 2016, 16:21:28 »

*

Offline srsa_4c

  • ******
  • 4451
Re: Porting a camera sx530hs
« Reply #102 on: 13 / April / 2016, 17:10:41 »
Here is a .dmp file:
https://drive.google.com/open?id=0B2NRqqO9AOURdm5TekhINEtlNDA
Can you make a bigger one? Say, 16MB (that would include the sys and malloc heaps too).

*

Offline blackhole

  • *****
  • 945
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #103 on: 13 / April / 2016, 17:18:47 »


*

Offline srsa_4c

  • ******
  • 4451
Re: Porting a camera sx530hs
« Reply #104 on: 13 / April / 2016, 17:36:31 »
Here is a 16MB dump
Thanks. Found (near some file system related block) significant differences, belonging to "Battery.c". Can you make a similar dump, but using a good card this time (should be the final request)?
Also, can you confirm that the presence of USB has no effect on the issue (that means when you remove the cable, you get the same erratic behaviour you mentioned)?

*

Offline blackhole

  • *****
  • 945
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #105 on: 13 / April / 2016, 18:21:12 »
16MB dump,from good card
https://drive.google.com/open?id=0B2NRqqO9AOURR3RDc0NTeklGbWM
Quote
Also, can you confirm that the presence of USB has no effect on the issue (that means when you remove the cable, you get the same erratic behaviour you mentioned)?
No changes, everything remains the same.
Quote
should be the final request
Do not worry, just tell me what you need.

*

Offline srsa_4c

  • ******
  • 4451
Re: Porting a camera sx530hs
« Reply #106 on: 13 / April / 2016, 18:35:14 »
16MB dump,from good card
Thanks again. Turns out the area I spotted belongs to PhySw. If you're bored, you can compare dumps above the address of physw_status. The good+CHDK and bad+CHDK cases are clearly different.

*

Offline srsa_4c

  • ******
  • 4451
Re: Porting a camera sx530hs
« Reply #107 on: 14 / April / 2016, 15:05:57 »
Some findings (but no solution).

- The startup flags (@0x2cfc) are ORed into physw_status[2] in kbd_read_keys_r2.
- The firmware's kbd_read_keys function zeroes all physw_status words before calling GetKbdState and the rest (this is not new behaviour, earlier cams also do this). The CHDK replacement does not seem to do this. I have no idea if clearing is actually needed or not.

Here's what's in physw_status[2] (@0x1a64c) in the dumps I have:

044003F4  no chdk good card
044003F4  no chdk bad card
044003F4  no chdk good card
044003F4  no chdk bad card
044003F4  no chdk bad card
044003F4  no chdk good card
044003F4  good w chdk
162003F4  bad, chdk, ptp
144003F4  good, chdk, ptp

In all but one case, the startup flag is 0x400000, which is the correct playback mode flag. The "bad card + chdk + ptp" combination has 0x200000 (which should be the rec mode start flag).
The leading digit is the USB bit. The "bad card + chdk + ptp" combination also has the SD card read-only flag (0x2000000), wonder why. IMHO it should not be there.

@blackhole
Can you rmem the word at 0x1a64c a few times using a bad and a good card? I don't need dumps, just that word. Make sure you're using
Code: [Select]
*(int*)(0x2cf4+0x8) = (*(int*)0xc022f48c) & 0x80000 ? 0x400000 : 0x200000;in boot.c and you start in playback mode (and leave the cam in playback mode).

WriteSDCard is sub_6ba7ec (this is needed for the "make card bootable" menu entry to function).


*

Offline blackhole

  • *****
  • 945
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #108 on: 14 / April / 2016, 16:36:57 »
Using this
Code: [Select]
rmem 0x1a64c  -i32I always get 0x144003f4, with good and bad card.

*

Offline srsa_4c

  • ******
  • 4451
Re: Porting a camera sx530hs
« Reply #109 on: 14 / April / 2016, 17:46:19 »
Using this
Code: [Select]
rmem 0x1a64c  -i32I always get 0x144003f4, with good and bad card.
Okay, that means we should look elsewhere.

The next plan is to investigate the failure of file operations. This will likely involve adding some debug code to CHDK core. I'll try to come up with something in a few days.

In the meantime, can you check those playback features I asked about (zooming into images, playing videos)?

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal