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

EOS M3 porting

  • 746 Replies
  • 394447 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: EOS M3 porting
« Reply #30 on: 14 / September / 2015, 13:43:42 »
Advertisements
But there is no signs of CHDK on display.
You need to port everything that is related to the bitmap and stencil buffers (lib.c and stubs_min.S). The bitmap buffer stuff is probably easier. IIRC only the first stencil buffer's address can be found in the sx280 firmware, the second starts right after the first one (the buffer size should be equal to the maximum supported resolution). I actually used RAM dumps to visually identify the buffers.
See also update_screen_dimensions() in lib.c and the firmware routine I mention there.

If you run spytask without adjusting the display related fw variable addresses, you're effectively writing memory you're not supposed to.

edit:
"stencil buffer" = stores opacity for all pixels of the bitmap overlay (8 bits per pixel)
"bitmap buffer" = yuv buffer for bitmap overlay, two adjacent pixels share the same chroma

edit2:
below post was answered in PM
« Last Edit: 14 / September / 2015, 18:33:06 by srsa_4c »

*

Offline Ant

  • *****
  • 509
Re: EOS M3 porting
« Reply #31 on: 14 / September / 2015, 18:03:18 »
The bitmap buffer stuff is probably easier. IIRC only the first stencil buffer's address can be found in the sx280 firmware

VramTransferManager functions looks different on our cameras and it is difficult to analyse SX280 firmware without RAM dump that contains real variables. Can you give me first megabyte of RAM for SX280_102b?

*

Offline Ant

  • *****
  • 509
Re: EOS M3 porting
« Reply #32 on: 19 / September / 2015, 04:40:21 »
Crashes during conf_restore() were caused by wrong address of fileio_semaphore

*

Offline Ant

  • *****
  • 509
Re: EOS M3 porting
« Reply #33 on: 20 / September / 2015, 17:34:44 »
You may want to execute the cpuinfo_get_info() function
Entering to CHDK Tools menu causes crash, but I renamed "cpuinfo.flt" to "modinsp.flt" and called it as "module inspector"

Is there difference between my CPU and SX280 CPU?


*

Offline srsa_4c

  • ******
  • 4451
Re: EOS M3 porting
« Reply #34 on: 21 / September / 2015, 11:13:56 »
Is there difference between my CPU and SX280 CPU?
BTCM has a different starting address and all 8 protection regions are used. One of the protection regions is for another ROM, starting at 0xfb800000 (8MB). No idea what that is, but the fw updater does have updates for that region too.
Did you manage to get the keyboard working?

*

Offline Ant

  • *****
  • 509
Re: EOS M3 porting
« Reply #35 on: 21 / September / 2015, 13:38:48 »
Did you manage to get the keyboard working?
Yes, excepting Play button (it's inverted) and second jogdial (around shooting button).
I did not use kbd_p2_f_my() but one jogdial works in CHDK menu.

*

Offline srsa_4c

  • ******
  • 4451
Re: EOS M3 porting
« Reply #36 on: 21 / September / 2015, 14:35:56 »
Yes, excepting Play button (it's inverted)
Ports with inverted buttons: a490, a495, a800, these might give an idea. However, you can probably just choose another button for ALT and solve the play button issue later.
Quote
  and second jogdial (around shooting button).
AFAIK CHDK only supports one jogdial, you get to choose which one.
Quote
I did not use kbd_p2_f_my() but one jogdial works in CHDK menu.
If you don't implement kbd_p2_f_my(), the firmware will also get the jogdial events while you're in ALT mode.

*

Offline Ant

  • *****
  • 509
Re: EOS M3 porting
« Reply #37 on: 21 / September / 2015, 15:13:20 »
you can probably just choose another button for ALT
I used M-Fn button as Print button for ALT mode
Quote
AFAIK CHDK only supports one jogdial
But there are JOGDIAL_LEFT/RIGHT and  FRONTDIAL_LEFT/RIGHT  in keyboard.h
Quote
If you don't implement kbd_p2_f_my()
I have a problem with finding jog_hw_pos address.

Now I investigate crashes when I call "Games" or "Tools" or "File Browser" in CHDK menu.
Romlog shows "Exception!! Vector 0x10" in "Task name: PhySw"


*

Offline srsa_4c

  • ******
  • 4451
Re: EOS M3 porting
« Reply #38 on: 21 / September / 2015, 15:28:33 »
But there are JOGDIAL_LEFT/RIGHT and  FRONTDIAL_LEFT/RIGHT  in keyboard.h
Yes, but the rest of the support functions can't currently handle more than one dial.
I think the remaining keyboard/jogdial issues are the least of your worries at this point, these can be revisited once the port becomes more solid.
Quote
Now I investigate crashes when I call "Games" or "Tools" or "File Browser" in CHDK menu.
Romlog shows "Exception!! Vector 0x10" in "Task name: PhySw"
Can you save ROMLOGs from CHDK menu yet? If you need help, you can PM me or post the details publicly.

edit:
For the record: the romlog and the disassembly helped to uncover a bug. Since the first 32 byte RAM is set to read only on this camera (via the last MPU region), NULL pointer writes cause an exception.
« Last Edit: 22 / September / 2015, 14:59:55 by srsa_4c »

Re: EOS M3 porting
« Reply #39 on: 09 / October / 2015, 23:08:41 »
Hi, I am interested in this because the inability to manually turn off Exposure Simulation is a huge issue for me. I am wondering if it would be feasible to make a script that does just this, given that development of CHDK would probably take some time.

I'm not implying that someone would do it for me, I am just wondering where this is in the realm of possibility before I waste a bunch of time trying to figure something like this out.

This page leads me to believe that the camera is capable of running uncompiled scripts right off the card, is that true? Is that good news for my goal?
« Last Edit: 09 / October / 2015, 23:14:28 by stoopkid »

 

Related Topics