EOS M3 porting - page 53 - DryOS Development - CHDK Forum

EOS M3 porting

  • 746 Replies
  • 392459 Views
*

Offline c_joerg

  • *****
  • 1248
Re: EOS M3 porting
« Reply #520 on: 22 / May / 2019, 12:22:45 »
Advertisements
Can you get the displaytype in following cases (you can try rec & play mode, but they might be the same):
- LCD mode
- EVF mode
- HDMI mode
LCD  =>  10
EVF   =>  11
HDMI =>  6
rec & play is the same...

M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline srsa_4c

  • ******
  • 4451
Re: EOS M3 porting
« Reply #521 on: 22 / May / 2019, 14:45:19 »
LCD  =>  10
EVF   =>  11
HDMI =>  6
rec & play is the same...
Thanks. Try replacing update_screen_dimensions() in the port's lib.c with this:
Code: [Select]
void update_screen_dimensions() {
    // see sub_FC177FCA in 101a, sub_FC1780F2 in 120f for the values
    extern int displaytype;
    static int old_displaytype = -1;

    if (old_displaytype == displaytype) {
        return;
    }
    old_displaytype = displaytype;
   
    switch(displaytype) {
        case 0:
        case 3:
        case 4:
        case 5:
            // ?
            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 (not implemented in hw)
            camera_screen.physical_width = camera_screen.width = 720;
            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;
        case 10:
            // lcd
            camera_screen.physical_width = camera_screen.width = 720;
            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 11:
            // evf
            camera_screen.width = camera_screen.physical_width = camera_screen.buffer_width = 1024;
            camera_screen.height = camera_screen.buffer_height = 768;
            camera_screen.size = camera_screen.buffer_size = 1024*768;
            break;
    }
}
The values seem to be the same on both supported firmwares.

Side note: I think the overlay won't be 100% correct on hdmi/evf. I have a corrected version for my cameras somewhere, but did not check it in because some parts of CHDK (zebra?) can't handle high resolution.

*

Offline c_joerg

  • *****
  • 1248
Re: EOS M3 porting
« Reply #522 on: 23 / May / 2019, 02:56:30 »
Try replacing update_screen_dimensions() in the port's lib.c with this:

I have not compiled CHDK yet but I guess I have to follow this:
 https://chdk.fandom.com/wiki/CHDK-Shell
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
CHDK-DE:  CHDK-DE links


*

Offline srsa_4c

  • ******
  • 4451
Re: EOS M3 porting
« Reply #524 on: 23 / May / 2019, 12:24:56 »
I have not compiled CHDK yet
Oh. I thought you already made that step.
The file you need to edit is platform/m3/lib.c .

*

Offline c_joerg

  • *****
  • 1248
Re: EOS M3 porting
« Reply #525 on: 23 / May / 2019, 13:02:17 »
I have not compiled CHDK yet
Oh. I thought you already made that step.
The file you need to edit is platform/m3/lib.c .

Not yet...
The number of my posts here belies my abilities  ;)

M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline c_joerg

  • *****
  • 1248
Re: EOS M3 porting
« Reply #526 on: 23 / May / 2019, 15:35:14 »
Try replacing update_screen_dimensions() in the port's lib.c with this:
It works very well  :) :) :)
thanks for support…

M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline srsa_4c

  • ******
  • 4451
Re: EOS M3 porting
« Reply #527 on: 23 / May / 2019, 17:39:30 »
It works very well  :) :) :)
thanks for support…
Glad to see it worked. I'll try to dig up my corrections and see if the menu size / off-center help screen issue can be improved.


*

Offline c_joerg

  • *****
  • 1248
Re: EOS M3 porting
« Reply #528 on: 25 / May / 2019, 05:39:44 »
I was wondering why the EVF has a different aspect ratio than the screen. Probably it is because cameras with different aspect ratio use the EVF (G1xII with 4: 3). I find it interesting that you can also use the area.

Why is the memory bar actually in the middle at the EVF? Presumably it is set with an absolute number of pixels from top…

« Last Edit: 25 / May / 2019, 06:14:46 by c_joerg »
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: EOS M3 porting
« Reply #529 on: 13 / July / 2019, 08:40:04 »
Looking to up my Lua scripting experience with the EOSM family.

I already have three EOSMs running ML: one for normal use with a cage and a handle; one IR converted; and one I use with a 645 back and 35mm 645 lens, ie sensor bracketing.

Apart from the EOSM2, the ML community are unlikely to be releasing other EOSMx cameras, ie because of the Digic class, so I thought I might look at a second hand EOSM3 and CHDK.

Could a kind EOSM3 user give me an update on where the EOSM3 CHDK rests at the moment, ie are things stable and is Lua accessible etc.

 

Related Topics