EDMAC (was Re: CHDK UI version 2.0 ?) - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

EDMAC (was Re: CHDK UI version 2.0 ?)

  • 32 Replies
  • 13729 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: EDMAC (was Re: CHDK UI version 2.0 ?)
« Reply #10 on: 28 / January / 2017, 09:30:04 »
Advertisements
I did not found there gray and semi-transparent color.
Every second row is partially transparent. No true gray among them, unfortunately. 0x87?

*

Offline Ant

  • *****
  • 509
Re: EDMAC (was Re: CHDK UI version 2.0 ?)
« Reply #11 on: 28 / January / 2017, 09:37:48 »
0x87?
Not gray and too light  :(

About EDMACs:
Does the structure at FC6D87B8(M10) (FC6AF930 (M3)) contain complete list of EDMAC channels used by camera?
« Last Edit: 28 / January / 2017, 11:34:17 by Ant »

*

Offline srsa_4c

  • ******
  • 4451
Re: EDMAC (was Re: CHDK UI version 2.0 ?)
« Reply #12 on: 28 / January / 2017, 12:59:04 »
0x87?
Not gray and too light  :(
I know. The pixel drawing routine needs to be rewritten. It's still the same "temporary", ineffective routine I came up with 2 and a half years ago.
Quote
Does the structure at FC6D87B8(M10) (FC6AF930 (M3)) contain complete list of EDMAC channels used by camera?
Well, the problem is, I know very little about EDMACs. The related fw routines in P&S and DSLRs used to be very different and that has prevented me from doing any serious research. I even have issues understanding the basics (for example, are EDMAC channels hardwired to  either read or write, or are they configured somewhere to be Read EDMACs and Write EDMACs?)...

@ any mod
Feel free to split this year's conversations in this thread to a new one (could be named 'EDMAC').

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: EDMAC (was Re: CHDK UI version 2.0 ?)
« Reply #13 on: 28 / January / 2017, 18:08:42 »
are EDMAC channels hardwired to  either read or write?

Code: [Select]
#define IS_WRITE(ch) (((ch) & 8) == 0)
#define IS_READ(ch)  (((ch) & 8) != 0)

Some channels are unused/invalid (see edmac_chanlist in src/edmac.c), which should explain the weirdness of edmac_get_connection.

See also:
http://magiclantern.wikia.com/wiki/Register_Map#EDMAC
http://bitbucket.org/hudson/magic-lantern/src/qemu/contrib/qemu/eos/eos.c (eos_handle_edmac, eos_handle_edmac_chsw, edmac_trigger_interrupt, edmac_format_size, edmac_do_transfer)

Does the structure at FC6D87B8(M10) (FC6AF930 (M3)) contain complete list of EDMAC channels used by camera?

Seems so. All write channels listed first, then all read channels.

M3:
writes: 0x00-0x06, 0x10-0x16, 0x20-0x26, 0x30 (guess), 0x40-0x42 (guess),
reads: 0x08-0x0D, 0x18-0x1D, 0x28-0x2D, 0x38-0x3A (guess), 0x48-0x49 (guess).

Quote
The related fw routines in P&S and DSLRs used to be very different

From what I could tell, the hardware works pretty much in the same way, just the front-end code differs. DryOS core is also identical.

A while ago I told Ant a few stubs from M3 and their equivalent functions in EOS firmware:
Code: [Select]
FC37FF02             EngDrvOut
FC37FF3C             EngDrvBits
FC37FF52             EngDrvOuts
FC37FF30             shamem_read (from ML; gets last value written to a register via EngDrvOut, from a shadow memory area; see sht_mirror on EOS)
FC369DC8             ConnectReadEDmac
FC369DB6             ConnectWriteEDmac
FC369DFA             RegisterEDmacCompleteCBR
FC36946A             StartEDmac
FC3694CA             edmac_set_flags_0x7
FC369540             edmac_set_addr    # these two are the same as SetEDmac from EOS
FC36956A             edmac_set_size    # for size params, see http://www.magiclantern.fm/forum/index.php?topic=18315 and Register Map on wikia
FC36973E             edmac_set_flags_0x40000000

P.S. see also this fix for A2200, also EDMAC-related. From what I could tell, it wasn't reviewed yet; was there anything wrong with it?


*

Offline srsa_4c

  • ******
  • 4451
Re: EDMAC (was Re: CHDK UI version 2.0 ?)
« Reply #14 on: 28 / January / 2017, 20:24:47 »
@a1ex
Thanks again for this helpful post.

P.S. see also this fix for A2200, also EDMAC-related. From what I could tell, it wasn't reviewed yet; was there anything wrong with it?
I expressed my concern here. vid_get_viewport_live_fb() is not necessarily called for every frame (30 times per second), and it's not synchronized to live view (we don't currently hook firmware code that is in sync with live view buffer updates). It's likely not a big issue though (and I could also be wrong).
The reason why it wasn't reviewed by others is because patches posted to places other than the thread dedicated to patch submissions tend to be missed and forgotten.

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: EDMAC (was Re: CHDK UI version 2.0 ?)
« Reply #15 on: 29 / January / 2017, 10:28:07 »
Ah, sorry, forgot about it. Unfortunately I don't quite remember what was the problem with returning the EDMAC address directly, and I no longer have the A2200 to test, but it's probably worth checking.

I do remember the overlays were pretty much unusable without the patch, as long as Canon's zoom box was used.

Re: EDMAC (was Re: CHDK UI version 2.0 ?)
« Reply #16 on: 15 / March / 2017, 16:46:20 »
Quote
A while ago I told Ant a few stubs from M3 and their equivalent functions in EOS firmware:
Here is the same list with SX60HS addresses included.

Code: [Select]
SX60HS      M3

fc337d9e FC37FF02             EngDrvOut
fc337dd8 FC37FF3C             EngDrvBits
fc337dee FC37FF52             EngDrvOuts
fc337dcc FC37FF30             shamem_read (from ML; gets last value written to a register via EngDrvOut, from a shadow memory area; see sht_mirror on EOS)
fc328c78 FC369DC8             ConnectReadEDmac
fc328c66 FC369DB6             ConnectWriteEDmac
fc328caa FC369DFA             RegisterEDmacCompleteCBR
fc32831a FC36946A             StartEDmac
fc32837a FC3694CA             edmac_set_flags_0x7
fc3283f0 FC369540             edmac_set_addr    # these two are the same as SetEDmac from EOS
fc32841a FC36956A             edmac_set_size    # for size params, see http://www.magiclantern.fm/forum/index.php?topic=18315 and Register Map on wikia
fc3285ee FC36973E             edmac_set_flags_0x40000000
I suppose if I want to use any of these to link adapted ML code, I would just add them as DEF's to stubs_entry_2.S or use NHSTUB?
« Last Edit: 15 / March / 2017, 19:18:55 by 62ndidiot »

*

Offline srsa_4c

  • ******
  • 4451
Re: EDMAC (was Re: CHDK UI version 2.0 ?)
« Reply #17 on: 16 / March / 2017, 21:04:13 »
I suppose if I want to use any of these to link adapted ML code, I would just add them as DEF's to stubs_entry_2.S or use NHSTUB?
These are all firmware functions. Functions -> NHSTUB in stubs_entry_2.S, variables -> DEF in stubs_min.S


Re: EDMAC (was Re: CHDK UI version 2.0 ?)
« Reply #18 on: 17 / March / 2017, 01:03:27 »
@srsa_4c. My interest is to get something like lv_rec.c to work as a module.  Do you think this is impractical or dangerous?  I still need to find various packmem_  stubs and it looks to be tedious (and difficult)  as I'll have to backtrack to  550d or something unless someone has found them for m3 or m10.
Thanks again for responding. :)

Re: EDMAC (was Re: CHDK UI version 2.0 ?)
« Reply #19 on: 04 / April / 2017, 00:55:50 »
How were the stubs above found for M3? I'm not making much progress for Sx60hs stubs unless I have example signatures to compare to.

Edit: zero progress

 

Related Topics