SX280 / 275 / 270 porting - page 36 - DryOS Development - CHDK Forum supplierdeeply

SX280 / 275 / 270 porting

  • 363 Replies
  • 176936 Views
*

Offline srsa_4c

  • ******
  • 4416
Re: SX280 / 275 / 270 porting
« Reply #350 on: 08 / April / 2021, 17:17:57 »
Advertisements
For a first step, I enabled recording GPS data in DNGs.

I looked into adding "full" support, but I could not determine how the data in playback mode is supposed to look like. So, in case someone is interested in this feature, please get me a RAM dump (first 1MB or so) from a CHDK GPS-supported model (sx230, sx260, s100) while the camera is in playback showing a photo with GPS data.
Full support would add some ~18kB to CHDK core - it's not modularized, unfortunately.

*

Offline Vydra

  • *
  • 10
Re: SX280 / 275 / 270 porting
« Reply #351 on: 08 / April / 2021, 18:08:53 »
For a first step, I enabled recording GPS data in DNGs.

I looked into adding "full" support, but I could not determine how the data in playback mode is supposed to look like. So, in case someone is interested in this feature, please get me a RAM dump (first 1MB or so) from a CHDK GPS-supported model (sx230, sx260, s100) while the camera is in playback showing a photo with GPS data.

Thanks :-) I have an SX260 and I'll try to produce such a RAM dump (will have to RTFM first to find out how to do it, I think I saw it in a debug menu somewhere). When I have the file, should I just attach it to a message here? Up to 2000 KB are ok it says.

*

Offline Vydra

  • *
  • 10
Re: SX280 / 275 / 270 porting
« Reply #352 on: 09 / April / 2021, 13:38:53 »
I have an SX260 and I'll try to produce such a RAM dump

Well, I tried to make a RAM dump of the SX260 HS, but it does not work. In the CHDK debug menu, I've set "ALT +/- debug action" to "Dmp RAM", left all the default values in the "RAM Dump" sub-menu, then left the menu altogether and pressed the +/- key (while an image with GPS data was displayed).

This should have written a dump file (of the complete RAM) to the DCIM/100CANON directory on the SD card, but there is no such directory on the card, nor is there a dump file. It was also variously mentioned that the "blue LED" should flash while the dump is written. By this people apparently mean a blue LED of a direct printing button some Canon cameras have, but the SX260 HS does not have such a button.

Is there something I missed to do to get this RAM dump? Or is there another way? Please advise.

*

Offline srsa_4c

  • ******
  • 4416
Re: SX280 / 275 / 270 porting
« Reply #353 on: 09 / April / 2021, 13:50:59 »
(...) left the menu altogether and pressed the +/- key (while an image with GPS data was displayed).
You need to be in ALT mode, outside of the CHDK menu. Pressing DISP there should do the trick, I believe. The shortcut button is usually the RAW shortcut, int this case it should be DISP.
Quote
left all the default values in the "RAM Dump" sub-menu
Please limit the size to 1MB (0x100000).


*

Offline Vydra

  • *
  • 10
Re: SX280 / 275 / 270 porting
« Reply #354 on: 09 / April / 2021, 15:09:05 »
You need to be in ALT mode, outside of the CHDK menu. Pressing DISP there should do the trick, I believe. The shortcut button is usually the RAW shortcut, int this case it should be DISP.

OK, that seems to have worked, thanks. I have attached the dump as a 7z file.

*

Offline Caefix

  • ****
  • 477
  • Sorry, busy deleting test shots...
Re: SX280 / 275 / 270 porting
« Reply #355 on: 09 / April / 2021, 15:20:04 »
 ;) Seems to be a 0.1 Mb dump...
All lifetime is a loan from eternity.

*

Offline Vydra

  • *
  • 10
Re: SX280 / 275 / 270 porting
« Reply #356 on: 09 / April / 2021, 15:54:04 »
;) Seems to be a 0.1 Mb dump...

The CRW_0002.JPG file inside the 7z file is 1.0 MB. 7zip is quite effective here  :D

*

Offline srsa_4c

  • ******
  • 4416
Re: SX280 / 275 / 270 porting
« Reply #357 on: 09 / April / 2021, 18:47:36 »
I have attached the dump as a 7z file.
Thanks. It looks like I'll have to assemble a structure that CHDK GPS code needs.
Replacing the AGPS update URL worked, the binary was accepted despite the different file name in URL.


*

Offline srsa_4c

  • ******
  • 4416
Re: SX280 / 275 / 270 porting
« Reply #358 on: 17 / April / 2021, 17:54:54 »
I added the suggested URL modification in changeset 5837.

I did actually go after the playback mode GPS data. The sx260 appears to use a single global buffer for this (I don't know whether the content of that buffer is properly cleaned when a GPS-less image is displayed, but that is not my problem). The sx280 gets a buffer address from a function (0xFC27FCFA @102b). Unfortunately, calling that function is not straightforward as - in case of certain conditions - a semaphore needs to be "given" afterwards. That semaphore is created and destroyed on-the-fly in another task. Failing to "give" the semaphore locks up the camera.
I then tried using the buffer that was returned in all cases I've seen - the CHDK GPS extension was unstable with this method (possibly invalid data in buffer, I don't know). So, I decided to close the case and left the GPS extension disabled.

edit:
While experimenting, I noticed that the camera is only willing to display GPS data in playback when the JPG is in its original place. Moving it to another subdir under DCIM causes the cam to forget its GPS data (the file has it, but it isn't displayed anymore). The cam will also not display GPS info for photos from other cameras (also sx280).
« Last Edit: 17 / April / 2021, 18:07:39 by srsa_4c »

*

Offline Vydra

  • *
  • 10
Re: SX280 / 275 / 270 porting
« Reply #359 on: 18 / April / 2021, 13:51:53 »
I tested the SX280 today with the latest stable German CHDK build, CHDK_DE_sx280hs-102b-1.5.1-5835. I thought this included commit 5816 with the GPS data in the DNGs, but the DNGs still don't have the GPS data while the corresponding JPGs have them. Do I have to wait for a later build for this to work?


I did actually go after the playback mode GPS data. The sx260 appears to use a single global buffer for this (I don't know whether the content of that buffer is properly cleaned when a GPS-less image is displayed, but that is not my problem). The sx280 gets a buffer address from a function (0xFC27FCFA @102b). Unfortunately, calling that function is not straightforward as - in case of certain conditions - a semaphore needs to be "given" afterwards. That semaphore is created and destroyed on-the-fly in another task. Failing to "give" the semaphore locks up the camera.
I then tried using the buffer that was returned in all cases I've seen - the CHDK GPS extension was unstable with this method (possibly invalid data in buffer, I don't know). So, I decided to close the case and left the GPS extension disabled.
Well, you tried, thank you for that. Perhaps the insights you gained will be useful at some later point for you or someone else.

While experimenting, I noticed that the camera is only willing to display GPS data in playback when the JPG is in its original place. Moving it to another subdir under DCIM causes the cam to forget its GPS data (the file has it, but it isn't displayed anymore).

I tried that with my SX260, and it's the same there. Move the file to another directory (or make a copy of it there), and the camera won't display the associated GPS information any longer.

 

Related Topics