SX60HS Porting - page 8 - DryOS Development - CHDK Forum

SX60HS Porting

  • 915 Replies
  • 369267 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: SX60HS Porting
« Reply #70 on: 20 / March / 2016, 20:27:30 »
Advertisements
What about init_file_modules? That too?
Not so important, could wait.
We used to hook that task to implement multi-partition support, but that is no longer needed on cams that boot from FAT32. For current cams we just set a flag there.

Re: SX60HS Porting
« Reply #71 on: 20 / March / 2016, 20:39:01 »
Well I changed kbd.c to use _my.  I changed boot.c to load it and I also enabled init_file_modules...no crashes, no files created.  I do see that when it boots, first  Memory Card locked is displayed and then after a second or two, the screen refreshes absent that message. Probably I just need to take a break, and things will become clearer.  Right now feeling confused.
I guess I could use LogCameraEvent to put messages in various spots and retrieve these from romlog.txt?

*

Offline reyalp

  • ******
  • 14114
Re: SX60HS Porting
« Reply #72 on: 20 / March / 2016, 20:52:24 »
Well I changed kbd.c to use _my.  I changed boot.c to load it and I also enabled init_file_modules...no crashes, no files created.  I do see that when it boots, first  Memory Card locked is displayed and then after a second or two, the screen refreshes absent that message.
The card locked should not appear at all, or at least it doesn't on any of my cams.

For the lock bypass to work, SD_READONLY_FLAG and SD_READONLY_IDX must be set correctly in platform_kbd.h
It's possible the finsig_thumb2 values for these are wrong.

Quote
I guess I could use LogCameraEvent to put messages in various spots and retrieve these from romlog.txt?
To get those messages in a romlog, you would need to trigger a crash.  That's not too hard to do ;)

If PTP is working enough to use rmem, you can inspect the physw_status bits that way.
Don't forget what the H stands for.

Re: SX60HS Porting
« Reply #73 on: 20 / March / 2016, 22:10:45 »
Working on ptp.  Unresolved refs. Lua 5.3 vs 5.2.  Will work it out. Typical. Busy for tomorrow.


*

Offline reyalp

  • ******
  • 14114
Re: SX60HS Porting
« Reply #74 on: 20 / March / 2016, 22:56:18 »
Working on ptp.  Unresolved refs. Lua 5.3 vs 5.2.  Will work it out. Typical. Busy for tomorrow.
I'd suggest downloading lua 5.2 and linking to that. You should just have to set LUA_INCLUDE_DIR and LUA_LIB_DIR to the path where you built Lua, so it won't affect anything else installed on your system. (edit: these go in config.mk, you can use config-sample-linux.mk as a starting point)

If you build without the GUI, chdkptp itself should be pretty straightforward.
« Last Edit: 20 / March / 2016, 23:06:18 by reyalp »
Don't forget what the H stands for.

Re: SX60HS Porting
« Reply #75 on: 22 / March / 2016, 15:02:42 »
I updated platform_kbd.h and a few other things.  Now directories are created. I scheduled a dump core/main.c
volatile int memdmp_delay = 10; // delay in seconds

  conf.memdmp_size = 8*1024*1024;
  conf.memdmp_start = 0;
  schedule_memdump();

I looked at this dump with binview.exe, but i don't see anything intelligible....
its  here:
https://drive.google.com/open?id=0ByFsa83WedojYjdVQV8wb2VBbW8
or in this dir
https://drive.google.com/open?id=0ByFsa83WedojMVpEbUVrM1BPUmM

The power button now switches it off, some things happen when i press other buttons....didn't really extensively test.

Working on chdkptp... still problems but it links.
./chdkptp
pcall failed 2
error error loading module 'util' from file '/home/xxx/chdkptp/trunk/lua/main.lua':
   /home/xxx/chdkptp/trunk/lua/main.lua:72: too many C levels (limit is 200) in function at line 68 near ''

thinking to rebuild lua5.2

*

Offline srsa_4c

  • ******
  • 4451
Re: SX60HS Porting
« Reply #76 on: 22 / March / 2016, 16:05:43 »
I looked at this dump with binview.exe, but i don't see anything intelligible....
There's not a lot of documentation (aside from the usage hints found on the "miscellaneous" tab).
Here's a quick howto:
- enlarging/maximizing the window is recommended
- load the dump
- set the bitmap width expected minimum and maximum at the bottom right corner (say, 640 and 960)
- start with width 640 (pull the bottom slider to the left)
- select a pixel format (right side of the window)
  the overlay buffer will likely be uyvy_d6, the opacity buffer is 8bpp
- press and hold the left mouse button over the image area to scroll the view
  scrolling will be faster when the mouse pointer is near the top or bottom of the image area
- various image buffers are usually recognizable, adjust bitmap width if the view is skewed
- you can bookmark a view (notes tab), you may want to enable "auto save notes" on the miscellaneous tab

Now, memory. I'd expect this cam to have 512MB of RAM. Various framebuffers are located throughout the RAM, but the overlay related buffers will likely be located relatively near 0 (in the first 32 MB).
Make sure there's recognizable screen content (i.e. a JPEG is displayed on screen and Canon overlay is visible) when you dump.
Your 8MB dump doesn't seem to include any framebuffers.

Re: SX60HS Porting
« Reply #77 on: 22 / March / 2016, 16:40:27 »
thanks, I increased the dump to 32MB, now I can find a framebuffer with width 736, not sure how to determine the start of it in binview or how to interpret the setting into lib.c and platform_camera.h (I tried but the view on the LCD is still horizontal lines over top of the canon image.  Link to dump
 here
https://drive.google.com/file/d/0ByFsa83WedojWU5qXzdsWHNNbzg/view?usp=sharing



Re: SX60HS Porting
« Reply #78 on: 22 / March / 2016, 17:08:44 »
But the image I found was purely chdk. It did not show the background photo that the LCD was displaying on the camera or any of the canon settings etc.

*

Offline srsa_4c

  • ******
  • 4451
Re: SX60HS Porting
« Reply #79 on: 22 / March / 2016, 17:33:30 »
now I can find a framebuffer with width 736, not sure how to determine the start of it in binview
The finest scroll step is 1 line, you can also scroll in smaller steps (multiples of pixels) by using the other mouse button. If you switch to the hex view tab, you'll be able to see the start of the buffer (uninitialized RAM content vs. uniform bytes).
The yuv overlay buffers in this dump start at 0x1441000 and 0x153e200, the opacity buffers follow later.
But the image I found was purely chdk. It did not show the background photo that the LCD was displaying on the camera or any of the canon settings etc.
If both a background image and Canon overlay was visible at the time of dump, then it might be possible that there is a different set of buffers for the LCD. That would mean the (empty) buffers in the 32MB dump are actually the EVF buffers. You can verify this by switching to EVF and retrying the dump.

BTW, the buffers you found are 640x480 - use the same numbers as the sx280 port in platform_camera.h.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal