SX60HS Porting - page 9 - DryOS Development - CHDK Forum

SX60HS Porting

  • 915 Replies
  • 371797 Views
Re: SX60HS Porting
« Reply #80 on: 22 / March / 2016, 18:56:09 »
Advertisements
i'm not sure how you got 640. binview clearly is happy with 736 or half that 368. Could it be some incompatibility with 64bit linux? I cannot get the camera to activate EVF, even if I boot in CANON mode and select it, and then reboot in CHDK mode it goes to LCD screen. I've uploaded another dump, seems to be missing the chdk version info box. Maybe a screen shot would clear this up

https://drive.google.com/file/d/0ByFsa83WedojX1pUREJka3pnRjQ/view?usp=sharing

Re: SX60HS Porting
« Reply #81 on: 22 / March / 2016, 19:04:40 »
ah, but I suppose any purely CHDK visible bitmaps are affected by my compilation? but the CANON firmware bitmaps are not, so I need to find one of those?

*

Offline srsa_4c

  • ******
  • 4451
Re: SX60HS Porting
« Reply #82 on: 22 / March / 2016, 19:20:49 »
i'm not sure how you got 640. binview clearly is happy with 736 or half that 368.
The reason for your confusion is that your sx60 port is apparently set to expect 736 pixel wide frame buffers. As no Canon overlay is visible, the CHDK drawings are the only visible thing. However, the area (which is black in the viewer) is exactly 640x480 - set 640 as width and count the lines. The attached screenshot shows your second 32MB dump with width=736.
Quote
I cannot get the camera to activate EVF, even if I boot in CANON mode and select it, and then reboot in CHDK mode it goes to LCD screen.
Well, the sx60 is the first D6 cam with EVF around here - trouble like that is not unexpected.

Do you see image and overlay on the screen while RAM is being dumped? If yes, you need to look further for valid overlay buffers.

Re: SX60HS Porting
« Reply #83 on: 22 / March / 2016, 19:43:53 »
I think my EVF problem is due to the fact that it isn't defined in lib.c:
    switch(displaytype) {
        case 0:
        case 3:
        case 4:
        case 5:
            // lcd
            camera_screen.width = camera_screen.physical_width = camera_screen.buffer_width = 640;
            camera_screen.height = camera_screen.buffer_height = 480;
            camera_screen.size = camera_screen.buffer_size = 640*480;
            break;
        case 1:
        case 2:
        case 8:
        case 9:
            // tv-out
            camera_screen.width = 720;
            camera_screen.physical_width = camera_screen.buffer_width = 736;
            camera_screen.height = camera_screen.buffer_height = 480;
            camera_screen.size = 720*480;
            camera_screen.buffer_size = 736*480;
            break;
        case 6:
        case 7:
            // hdmi
            camera_screen.width = camera_screen.physical_width = camera_screen.buffer_width = 960;
            camera_screen.height = camera_screen.buffer_height = 540;
            camera_screen.size = camera_screen.buffer_size = 960*540;
            break;
    }
I note also that TV out has width 736.
So I need to find a example of which case to use for EVF.

Q. If I scroll thru the dump with width set to 640, I should eventually find the photographic image that is being displayed on the LCD right?  I tried a 64MB dump, but binview did not seem to like it...





*

Offline srsa_4c

  • ******
  • 4451
Re: SX60HS Porting
« Reply #84 on: 22 / March / 2016, 20:03:01 »
I think my EVF problem is due to the fact that it isn't defined in lib.c:
    switch(displaytype) {
Just #undef CAM_SUPPORT_BITMAP_RES_CHANGE in platform_camera.h until you find 'displaytype'.

Quote
Q. If I scroll thru the dump with width set to 640, I should eventually find the photographic image that is being displayed on the LCD right?
Yes, but that's a later concern. You need to find the overlay. You do have the Canon overlay (like image number, battery status, image properties) enabled, right?
Quote
I tried a 64MB dump, but binview did not seem to like it...
What does that exactly mean? I can browse my 256MB dumps without problems. The file is not even read into RAM, just parts of it are stored in some buffers.

Re: SX60HS Porting
« Reply #85 on: 22 / March / 2016, 23:02:01 »
I must have screwed up the filename or something, indeed binview has no problem with larger files. The largest file on this camera appears to be about 236MB. I do see overlay on the screen, lots of info, time of the image, number etc. I def'd everything in libc to be 640x480 (that wasn't TV or hdmi), I undef'd CAM_SUPPORT_BITMAP_RES_CHANGE in platform_camera.h which also defines 640x480...the EVF does not activate.  The attached png shows what I see in binview
I've uploaded the dump (64MB).

https://drive.google.com/open?id=0ByFsa83WedojQzlOWkhyYkJkeDg

Sorry for being a slow learner.
Maybe I should change the TV out line, maybe its picking up on that.
 

Re: SX60HS Porting
« Reply #86 on: 22 / March / 2016, 23:06:28 »
wrong no canon info, don't know when that stopped

*

Offline reyalp

  • ******
  • 14118
Re: SX60HS Porting
« Reply #87 on: 23 / March / 2016, 00:08:08 »
I think my EVF problem is due to the fact that it isn't defined in lib.c:
If "the EVF does not activate" means that the canon firmware does not turn EVF on at all, then it has nothing to do with that code. That code only controls how CHDK tries to display CHDK stuff, it doesn't affect Canon's display routines.

Off hand, the only CHDK code I can think of that would might disable the EVF is incorrect bits in physw_status.

Quote
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
This is very weird, I have never seen anything like it. The error looks like something you would get if you had infinite recursion in the initial call from chdkptp that runs main.lua, but I have no idea how that would happen. Maybe if you had conflicting .lua file names on your lua path.
Don't forget what the H stands for.


Re: SX60HS Porting
« Reply #88 on: 23 / March / 2016, 14:22:51 »
I pressed menu and got some canon info to display, it seemed to eventually blank the background images. This is visible in binview at a few locations in the dump, some with different resolutions i think. The first two locations are 640 wide at 0x141000 and 0x153e1f0, another image appears near 0x2541000 not sure what its width is.
dump: (64MB)
https://drive.google.com/open?id=0ByFsa83WedojcEJDMmk2OHFraXM

I can find 0x141000   in the disassembly but the others are elusive. I searched for any 720 or 736 that would be compiled, and don't see any as update_screen_dimensions is not active unless  CAM_SUPPORT_BITMAP_RES_CHANGE is defined.

*

Offline srsa_4c

  • ******
  • 4451
Re: SX60HS Porting
« Reply #89 on: 23 / March / 2016, 16:47:55 »
I pressed menu and got some canon info to display, it seemed to eventually blank the background images. This is visible in binview at a few locations in the dump, some with different resolutions i think. The first two locations are 640 wide at 0x141000 and 0x153e1f0, another image appears near 0x2541000 not sure what its width is.
The latter is an RGBA (double)buffer, width is 960. All these buffers are actually double, do not be surprised if you only find the first buffer's address* (the rest is probably computed).

One more thing about binview: the vertical scrollbar (on the pixelmap tab) does not respect pixels and lines. You can use its arrows to go back & forth 1 or more bytes.

The overlay buffers, btw, have a maximum size of 960x540 pixels (quarter FHD).

edit:
We can't currently use the big RGBA buffer for CHDK display.
* ... of each buffer-pair
« Last Edit: 23 / March / 2016, 16:50:58 by srsa_4c »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal