[UNMAINTAINED] Canon 5D Classic Firmware ** Beta 4 **

Started by coutts, June 14, 2012, 04:54:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

a1ex


Brakeless

Hello! Is there any new news? No one is currently engaged in processing? I can help in test ML...

Brakeless

Quote from: a1ex on September 28, 2016, 05:12:32 PM
I'm looking for a ROM dump for QEMU experiments (mine is incomplete). You may get one from the Debug menu; please send it to me by PM.

If there is still interest, I can try to fix compilation on the latest codebase, then let you continue the port.

Side note: there is a small chance to get LiveView with the full-res silent pic backend, but the front-end functions are not present, so it will require some low-level research along these lines. But my gut feeling says it's doable.

But since this camera has a simpler codebase, this effort might pay off for more recent models as well.

@wigyori: the implicit declaration on this platform uses 32-bit integers for all parameters. So, in this case, you may get away with: void unknown_gui_function(int, int).

Hey, Alex! Whether correctly i undrestood that it is necessary to send a dump for your further development? I can help you in any matters. But will you be support in future 5D? Thanks!

a1ex

There was a bug in the previous dumper, and I didn't look into it yet. However, recently I've got CF emulation working in QEMU, so I'll give it a second try.

Support is provided by other users. There is a VxWorks branch with some recent progress on 450D and 40D - one can look at the source code and try to adapt it to the 5D.

amp829

hello !
where can i find the latest version for my canon 5d

ilia3101

I think the newest is "beta 4", and there hasn't been much development since ~2012 because the developer's camera got bricked. You can find it on the first post on this thread.

tkendirli

Hello everyone, i just downloaded the magiclantern for using at my new second hand 5Dc but somehow i cannot see the bluelight flashing, blinking or solid. My camera can see the files because it allows me to update. there's no problem with my firmware version.

But instead booting from cf card my camera shows me 'cannot find the files error' am i doing something wrong??

Thanks in advance for helping me.

sndofsilence

Hi,
Is it possible to learn shutter actuations with magic lantern for 5d classic?

a1ex

Not currently, but I might be able to figure it out. I've started to update the VxWorks codebase some weeks ago, alongside with DIGIC 6/7/8 models, but don't have anything worth showing yet.

Low priority project from my side; will post here whenever I'll have things to try.

sndofsilence

Quote from: a1ex on September 07, 2018, 07:02:38 PM
Not currently, but I might be able to figure it out. I've started to update the VxWorks codebase some weeks ago, alongside with DIGIC 6/7/8 models, but don't have anything worth showing yet.

Low priority project from my side; will post here whenever I'll have things to try.

Thanks from now. I'm waiting it impatiently : )

BatteryGrip

Quote from: a1ex on September 07, 2018, 07:02:38 PM
Not currently, but I might be able to figure it out. I've started to update the VxWorks codebase some weeks ago, alongside with DIGIC 6/7/8 models, but don't have anything worth showing yet.

Low priority project from my side; will post here whenever I'll have things to try.

I created an account just to say how amazing it is that this thread is still active!

i was going to install Beta4, but after reading about how the developer bricked his I'm not so sure anymore

a1ex

It wasn't with Beta4 code; that one was written and tested by me on a borrowed camera.

Back then, I didn't know how to diagnose or recover it. Looking over the chat logs, it had some signs of life after the event; unfortunately these disappeared shortly after Coutts disassembled it and put it back, so I could no longer investigate. Now we have tools to emulate the firmware, print things on the LCD directly from the bootloader and even get a copy of the ROM from a damaged camera, so I'd expect to be able to recover a camera even if most of its ROM (except bootloader) is toast. If the bootloader won't work (extremely unlikely), JTAG would be the last thing to try, but I never went that far.

gennyrock

Hi there, I have got the first version of Canon EOS 5D (not mark1, mark2, etc.). My question is: as it does not make videos, after magic lantern firmware installation, can make videos? Thanks

whitelight

Quote from: gennyrock on September 09, 2018, 11:12:55 AM
Hi there, I have got the first version of Canon EOS 5D (not mark1, mark2, etc.). My question is: as it does not make videos, after magic lantern firmware installation, can make videos? Thanks

No Liveview is possible on 5D, hence no video.

scrax

Quote from: a1ex on September 07, 2018, 07:02:38 PM
Not currently, but I might be able to figure it out. I've started to update the VxWorks codebase some weeks ago, alongside with DIGIC 6/7/8 models, but don't have anything worth showing yet.

Low priority project from my side; will post here whenever I'll have things to try.

I've tried to compile 5DC against last unified bug gives so many errors that I gave up when thig started to being nod something easy like adding missing definitions.
Any help or suggestion? maybe to compile with minimal feat what FEATURE_ definitions should I keep or remove?
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

aprofiti

I tried to compile for 5D last month using vxworks branch an as you said I got stuck trying to solve a lot of errors...

Many of trubles appear to come due to the custom gui.c and other sources code in platform/5dc folder, which are defined for the vxworks specific cameras; I have no experience with these one, making this harder...

Here is the diff I stopped at: (noting more than change stuffs to be able to move at next errors)

diff --git a/platform/Makefile.platform.map b/platform/Makefile.platform.map
--- a/platform/Makefile.platform.map
+++ b/platform/Makefile.platform.map
@@ -13,11 +13,11 @@
     700D.115 \
     EOSM.202 \
     1100D.105 \
+    5DC.111 \
     6D.116

PLATFORM_MAP_UNMAINTAINED = \
     40D.111 \
-    5DC.111 \
     100D.100 \


diff --git a/src/bmp.h b/src/bmp.h
--- a/src/bmp.h
+++ b/src/bmp.h
@@ -10,17 +10,17 @@

/*
  * Copyright (C) 2009 Trammell Hudson <[email protected]>
- *
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- *
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the
  * Free Software Foundation, Inc.,
@@ -39,36 +39,43 @@

/** Returns a pointer to the real BMP vram, as reported by Canon firmware.
  *  Not to be used directly - it may be somewhere in the middle of VRAM! */
-inline uint8_t* bmp_vram_raw() { return bmp_vram_info[1].vram2; }
+inline uint8_t* bmp_vram_raw() { return bmp_vram_info[1].vram2; }

/**
  * The total BMP area starts at 0x***80008 or 0x***00008 and has 960x540 pixels.
- *
- * Normally, only the center part (720x480) is used. So, Canon BMP functions
+ *
+ * Normally, only the center part (720x480) is used. So, Canon BMP functions
  * will return a pointer with an offset equal to 30*960 + 120 => VRAM address will end in 0x7100.
- *
+ *
  * End of BMP VRAM is at 0x***80008 + 0x7E900 (960x540). It's not safe to write past this address.
- *
- * The problem is that HDMI properties are not reliable for telling HDMI size
+ *
+ * The problem is that HDMI properties are not reliable for telling HDMI size
  * (race condition while changing display modes).
- *
+ *
  * Workaround: ML will always use a pointer to the CROPPED (720x480) BMP VRAM.
- *
+ *
  * Advantages:
- *
+ *
  * - Zero chances to write past the end of the VRAM due to race condition when changing display modes
  * - Everything you draw on the screen will be visible and centered well on HDMI
  * - Keeps most of the existing code (designed for LCD) unchanged
- *
+ *
  * Disadvantage:
  * - On HDMI, you may have to draw BEHIND the VRAM pointer (you can go at most 30 lines and 120 columns back).
  *   Could be a bit ugly to code.
- *
+ *
  */

/** These are the hard limits - never ever write outside them! */
#ifdef CONFIG_VXWORKS

+//int D2V(unsigned color);
+void set_ml_palette();
+/** converting dryos palette to vxworks one */
+extern char bmp_palette_lut[80];
+
+#define D2V(color) bmp_palette_lut[COERCE(color, 0, 79)]
+
#define BMP_W_PLUS 720
#define BMP_W_MINUS 0
#define BMP_H_PLUS 480
@@ -400,7 +407,7 @@


/** 5dc bitmap icons (ones that work and what they are) */
-/* 
+/*
  0x9EBDEF   =   squigly line like a tilde
  0x8DBCEF   =   dash
  0xBA96EE   =   play icon
diff --git a/src/fio-ml.c b/src/fio-ml.c
--- a/src/fio-ml.c
+++ b/src/fio-ml.c
@@ -83,7 +83,7 @@

     char drive_path[4];
     snprintf(drive_path, sizeof(drive_path), "%s:/", card->drive_letter);
-   
+
     if (!cf_card_workaround)
     {
         /* save the config with workaround enabled now, because if the test fails, we may no longer able to save it */
@@ -110,7 +110,7 @@
         FIO_CloseFile(f);
         FIO_RemoveFile(testFile);
         bmp_fill(COLOR_BLACK, 0, 0, 400, 38);
-       
+
         if (fail) // fsck!
         {
             int warning_enabling_workaround = (cf_card_workaround==0 && card->drive_letter[0] == 'A');
@@ -132,7 +132,7 @@
                 info_led_blink(1, 1000, 1000);
             }
         }
-       
+
         if (!cf_card_workaround)
         {
             /* test OK, save config once again to make sure we won't end up with the compatibility flag enabled by mistake */
@@ -143,7 +143,7 @@
}
#endif

-/**
+/**
  * Called from debug_init_stuff
  */
void _card_tweaks()
@@ -153,19 +153,19 @@
     {
         if (available_cards[CARD_A].free_space_raw > 10) card_test(&available_cards[CARD_A]);
         if (available_cards[CARD_B].free_space_raw > 10) card_test(&available_cards[CARD_B]);
-       
+
         /* if it reaches this point, the cards are OK */
         card_test_enabled = 0;
     }
#endif
-   
+
#ifdef CONFIG_DUAL_SLOT
     /* on startup enforce selected card.
        if that card type is not available, canon will ignore this change */
     if (card_force_type)
     {
         uint32_t value = card_force_type;
-       
+
         /* ensure valid property value (side effect safe) */
         if ((value == 1 && is_dir("A:/")) ||
             (value == 2 && is_dir("B:/")))
@@ -195,14 +195,14 @@
{
     /* note: this function is called before load_fonts, so in order to print something, we need to load them */
     _load_fonts();
-   
+
     if (!DISPLAY_IS_ON)
     {
         /* force playback mode if we start with display off */
         SetGUIRequestMode(1);
         msleep(1000);
     }
-   
+
     bmp_printf(FONT_LARGE, 0, 0, msg);
     redraw_after(5000);
}
@@ -218,7 +218,7 @@
         ml_cf = is_file("A:/AUTOEXEC.BIN");
         ml_sd = is_file("B:/AUTOEXEC.BIN");
     }
-   
+
     /* maybe todo: if both cards have autoexec, check which one is bootable? important? */

     if (ml_cf && !ml_sd)
@@ -241,7 +241,7 @@
         startup_warning("Could not find ML files.");
     }
}
-
+#if !defined(CONFIG_VXWORKS) // DryOS
PROP_HANDLER(PROP_CARD_SELECT)
{
     int card_select = buf[0] - 1;
@@ -312,7 +312,7 @@
{
     available_cards[CARD_C].folder_number = buf[0];
}
-
+#endif // DryOS
PROP_HANDLER(PROP_DCIM_DIR_SUFFIX)
{
     snprintf(dcim_dir_suffix, sizeof(dcim_dir_suffix), (const char *)buf);
@@ -362,14 +362,14 @@
{
     char new_filename[FIO_MAX_PATH_LENGTH];
     fixup_filename(new_filename, filename, sizeof(new_filename));
-   
+
     FILE* f = _FIO_OpenFile(new_filename, mode);
-   
+
     if (f != PTR_INVALID)
     {
         return f;
     }
-   
+
     return 0;
}

@@ -444,7 +444,7 @@
{
     //~ NotifyBox(2000, "create dir: %s ", path); msleep(2000);
     // B:/ML/something
-   
+
     if (is_dir(path)) return;

     int n = strlen(path);
@@ -498,7 +498,7 @@
     {
         return f;
     }
-   
+
     /* return 0 on error, just like in plain C */
     return 0;
}
@@ -600,13 +600,13 @@
     FIO_CloseFile(f);
     FIO_CloseFile(g);
     fio_free(buf);
-   
+
     if (err)
     {
         FIO_RemoveFile(dst);
         return -1;
     }
-   
+
     /* all OK */
     return 0;
}
@@ -641,7 +641,7 @@
     {
         return 0; // this dir does not exist
     }
-    else
+    else
     {
         FIO_FindClose(dirent);
         return 1; // dir found
@@ -751,13 +751,13 @@
         .children =  (struct menu_entry[]) {
             /*
             {
-                .name = "CF card",
+                .name = "CF card",
                 .update = &card_info_display,
                 .help = "CF card info: make and model."
             },*/
#ifdef CONFIG_5D3
             {
-                .name = "Card test at startup",
+                .name = "Card test at startup",
                 //~ .priv = &card_test_enabled, /* don't use priv, so it doesn't get displayed in the modified settings menu */
                 .select = card_test_toggle,
                 .update = card_test_update,
@@ -772,7 +772,7 @@
             },
#endif
             {
-                .name = "Preferred card",
+                .name = "Preferred card",
                 .priv = &card_force_type,
                 .min = 0,
                 .max = 2,
@@ -790,7 +790,7 @@
     #ifdef CONFIG_DUAL_SLOT
     menu_add( "Prefs", card_menus, COUNT(card_menus) );
     #endif
-   
+
     #ifdef CARD_A_MAKER
     available_cards[CARD_A].maker = (char*) CARD_A_MAKER;
     available_cards[CARD_A].model = (char*) CARD_A_MODEL;
diff --git a/src/gui-common.h b/src/gui-common.h
--- a/src/gui-common.h
+++ b/src/gui-common.h
@@ -36,17 +36,17 @@
  */
/*
  * Copyright (C) 2009 Trammell Hudson <[email protected]>
- *
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- *
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the
  * Free Software Foundation, Inc.,
@@ -171,6 +171,8 @@
#define GUISTATE_PLAYMENU 0
#define GUISTATE_MENUDISP 1
#define GUISTATE_QR 2
+#define GUISTATE_QR_ZOOM 12 // QuickReview zoom
+
// 3:   QR erase [unused?]
#define GUISTATE_IDLE 4
#define GUISTATE_QMENU 9
diff --git a/src/mem.c b/src/mem.c
--- a/src/mem.c
+++ b/src/mem.c
@@ -1,11 +1,11 @@
/**
  * Memory management routines that can wrap all malloc-like memory backends in a transparent way.
- *
+ *
  * Instead of a few small allocation functions, from user code you will only see a huge memory pool, ready to use.
- *
- * Temporary hack: in order to work with existing code,
+ *
+ * Temporary hack: in order to work with existing code,
  * it intercepts calls to malloc/free, AllocateMemory, alloc_dma_memory, shoot_malloc and SmallAlloc.
- *
+ *
  * Implementation based on memcheck by g3gg0.
  */
#define NO_MALLOC_REDIRECT
@@ -82,9 +82,9 @@
     mem_free_func free_dma;
     mem_get_free_space_func get_free_space; /* can be null; if unknown, it's assumed to be large enough (30 MB) */
     mem_get_max_region_func get_max_region; /* can be null; if unknown, it's assumed to be free space / 4 */
-   
+
     int is_preferred_for_temporary_space;   /* prefer using this for memory that will be freed shortly after used */
-   
+
     int preferred_min_alloc_size;           /* if size is outside this range, it will try from other allocators */
     int preferred_max_alloc_size;           /* (but if it can't find any, it may still use this buffer) */
     int preferred_free_space;               /* if free space would drop under this, will try from other allocators first */
@@ -92,7 +92,7 @@
     int minimum_alloc_size;                 /* will never allocate a buffer smaller than this */
     int depends_on_malloc;                  /* will not allocate if malloc buffer is critically low */
     int try_next_allocator;                 /* if this allocator fails, try the next one */
-   
+
     /* private stuff */
     int mem_used;
     int num_blocks;
@@ -186,7 +186,7 @@
         .free_dma = _shoot_free,
         .get_free_space = _shoot_get_free_space,
         .get_max_region = _shoot_get_free_space,    /* we usually have a bunch of large contiguous chunks */
-       
+
         .is_preferred_for_temporary_space = 1,  /* if we know we'll free this memory quickly, prefer this one */

         /* AllocateContinuousMemoryResource also calls malloc for each request, and may run out of space (5D3) */
@@ -273,11 +273,11 @@
const char * format_memory_size(uint64_t size)
{
     static char str[16];
-   
+
     const uint32_t kB = 1024;
     const uint32_t MB = 1024*1024;
     const uint64_t GB = 1024*1024*1024;
-   
+
     if (size >= 10*GB)
     {
         int size_gb = (size + GB/2) / GB;
@@ -338,7 +338,7 @@

     unsigned int failed = 0;
     unsigned int failed_pos = 0;
-   
+
     for(int pos = sizeof(struct memcheck_hdr); pos < MEM_SEC_ZONE; pos++)
     {
         unsigned char value = ((unsigned char *)ptr)[pos];
@@ -407,7 +407,7 @@
         {
             task_name = current_task->name;
         }
-       
+
         if (allocator >= 0 && allocator < COUNT(allocators))
         {
             allocator_name = allocators[allocator].name;
@@ -429,25 +429,25 @@
             file, line, task_name
         );
     }
-   
+
     if (entry < COUNT(memcheck_entries))
     {
         memcheck_entries[entry].failed |= failed;
     }
-   
+
     return failed;
}

static unsigned int memcheck_get_failed()
{
     unsigned int buf_pos = 0;
-   
+
     for(buf_pos = 0; buf_pos < MEMCHECK_ENTRIES; buf_pos++)
     {
         if(memcheck_entries[buf_pos].ptr)
         {
             memcheck_check(memcheck_entries[buf_pos].ptr, buf_pos);
-           
+
             /* marked as failed? */
             if(memcheck_entries[buf_pos].failed)
             {
@@ -465,13 +465,13 @@
#endif

     int tries = MEMCHECK_ENTRIES;
-   
+
     unsigned int state = cli();
     while(memcheck_entries[memcheck_bufpos].ptr != 0)
     {
         memcheck_bufpos++;
         memcheck_bufpos %= MEMCHECK_ENTRIES;
-       
+
         if(--tries <= 0)
         {
             ((struct memcheck_hdr *)ptr)->id = UNTRACKED;
@@ -485,9 +485,9 @@
     memcheck_entries[memcheck_bufpos].file = file_name_without_path(file);
     memcheck_entries[memcheck_bufpos].line = line;
     memcheck_entries[memcheck_bufpos].task_name = current_task->name;
-   
+
     ((struct memcheck_hdr *)ptr)->id = memcheck_bufpos;
-   
+
     sei(state);
}

@@ -523,7 +523,7 @@
             {
                 memcheck_entries[i].ptr = (intptr_t) PTR_INVALID;
                 memcheck_entries[i].failed |= (0x00000001 | failed);
-            }           
+            }
         }
     }
     else
@@ -538,7 +538,7 @@
static void *memcheck_malloc( unsigned int len, const char *file, unsigned int line, int allocator_index, unsigned int flags)
{
     unsigned int ptr;
-   
+
     //~ dbg_printf("alloc %d %s:%d\n ", len, file, line);
     //~ int t0 = get_ms_clock_value();

@@ -554,7 +554,7 @@

     //~ int t1 = get_ms_clock_value();
     //~ dbg_printf("alloc returned %x, took %s%d.%03d s\n", ptr, FMT_FIXEDPOINT3(t1-t0));
-   
+
     /* some allocators may return invalid ptr; discard it and return 0, as C malloc does */
     if ((intptr_t)ptr & 1) return 0;
     if (!ptr) return 0;
@@ -574,13 +574,13 @@

     /* did our allocator return a cacheable or uncacheable pointer? */
     unsigned int uncacheable_flag = (ptr == (unsigned int) UNCACHEABLE(ptr)) ? UNCACHEABLE_FLAG : 0;
-   
+
     ((struct memcheck_hdr *)ptr)->length = len;
     ((struct memcheck_hdr *)ptr)->allocator = allocator_index;
     ((struct memcheck_hdr *)ptr)->flags = flags | uncacheable_flag;

     memcheck_add(ptr, file, line);
-   
+
     /* keep track of allocated memory and update history */
     allocators[allocator_index].num_blocks++;
     allocators[allocator_index].mem_used += len + 2 * MEM_SEC_ZONE;
@@ -589,7 +589,7 @@
     alloc_total_peak_with_memcheck = MAX(alloc_total_peak_with_memcheck, alloc_total_with_memcheck);
     history[history_index] = MIN(alloc_total_with_memcheck / 1024, USHRT_MAX);
     history_index = MOD(history_index + 1, HISTORY_ENTRIES);
-   
+
     return (void*)(ptr + MEM_SEC_ZONE);
}

@@ -598,9 +598,9 @@
     unsigned int ptr = ((unsigned int)buf - MEM_SEC_ZONE);

     int failed = memcheck_check(ptr, 0xFFFFFFFF);
-   
+
     memcheck_remove(ptr, failed);
-   
+
     /* if there are errors, do not free this block */
     if (failed)
     {
@@ -641,7 +641,7 @@
         require_tmp == 1 ? "tmp1 " : require_tmp == 2 ? "tmp2 " : require_tmp == -1 ? "tmp_no" : require_tmp ? "err" : "",
         require_dma ? "dma " : ""
     );
-   
+
     for (int a = 0; a < COUNT(allocators); a++)
     {
         int has_non_dma = allocators[a].malloc ? 1 : 0;
@@ -668,17 +668,17 @@
             dbg_printf("%s: tmp mismatch (%d,%d)\n", allocators[a].name, require_tmp, preferred_for_tmp);
             continue;
         }
-       
+
         /* matches preferred size criteria? */
         int preferred_min = allocators[a].preferred_min_alloc_size;
         int preferred_max = allocators[a].preferred_max_alloc_size ? allocators[a].preferred_max_alloc_size : INT_MAX;
-        if
+        if
             (!(
                 (
                     require_preferred_size <= 0||
                     (size >= preferred_min && size <= preferred_max)
                 )
-                &&
+                &&
                 (
                     /* minimum_alloc_size is important, but can be relaxed as a last resort
                      * (e.g. don't allocate 5-byte blocks from shoot_malloc, unless there is no other way) */
@@ -690,7 +690,7 @@
             dbg_printf("%s: pref size mismatch (req=%d, pref=%d..%d, min=%d)\n", allocators[a].name, size, preferred_min, preferred_max, allocators[a].minimum_alloc_size);
             continue;
         }
-       
+
         /* do we have enough free space without exceeding the preferred limit? */
         int free_space = allocators[a].get_free_space ? allocators[a].get_free_space() : 30*1024*1024;
         //~ dbg_printf("%s: free space %s\n", allocators[a].name, format_memory_size(free_space));
@@ -713,7 +713,7 @@
             dbg_printf("%s: free space mismatch (req=%d,free=%d,pref=%d,min=%d)\n", allocators[a].name, size, free_space, allocators[a].preferred_free_space, allocators[a].minimum_free_space);
             continue;
         }
-       
+
         /* do we have a large enough contiguous chunk? */
         /* use a heuristic if we don't know, use a safety margin even if we know */
         int max_region = allocators[a].get_max_region ? allocators[a].get_max_region() - 1024 : free_space / 4;
@@ -722,7 +722,7 @@
             dbg_printf("%s: max region mismatch %s\n", allocators[a].name, format_memory_size(max_region));
             continue;
         }
-       
+
         /* if this allocator requires malloc for its internal data structures,
          * do we have enough free space there? (if not, we risk ERR70) */
         if (allocators[a].depends_on_malloc && GetFreeMemForMalloc() < 8*1024)
@@ -730,7 +730,7 @@
             dbg_printf("%s: not enough space for malloc (%d)\n", allocators[a].name, GetFreeMemForMalloc());
             continue;
         }
-       
+
         /* yes, we do! */
         return a;
     }
@@ -740,12 +740,12 @@
static int choose_allocator(int size, unsigned int flags)
{
     /* note: free space routines may be queried more than once (this can be optimized) */
-   
+
     int needs_dma = (flags & MEM_DMA) ? 1 : 0;
     int prefers_tmp = (flags & MEM_TEMPORARY) ? 1 : (flags & MEM_SRM) ? 2 : -1;
-   
+
     int a;
-   
+
     /* first try to find an allocator that meets all the conditions (preferred size, free space, temporary preference and DMA); */
     a = search_for_allocator(size, 1, 1, prefers_tmp, needs_dma);
     if (a >= 0) return a;
@@ -773,7 +773,7 @@
         a = search_for_allocator(size, 0, 0, 0, needs_dma);
         if (a >= 0) return a;
     }
-   
+
     /* DMA is mandatory, don't relax it */

     /* last resort: try ignoring the free space / block size limits */
@@ -793,13 +793,13 @@
     take_semaphore(mem_sem, 0);

     dbg_printf("alloc(%s) from %s:%d task %s\n", format_memory_size_and_flags(size, flags), file, line, current_task->name);
-   
+
     /* show files without full path in error messages (they are too big) */
     file = file_name_without_path(file);

     /* choose an allocator (a preferred memory pool to allocate memory from it) */
     int allocator_index = choose_allocator(size, flags);
-   
+
     /* did we find one? */
     if (allocator_index >= 0 && allocator_index < COUNT(allocators))
     {
@@ -811,13 +811,13 @@
             allocators[allocator_index].get_free_space ? allocators[allocator_index].get_free_space() : -1,
             allocators[allocator_index].get_max_region ? allocators[allocator_index].get_max_region() : -1
         );
-       
+
         #ifdef MEM_DEBUG
         int t0 = get_ms_clock_value();
         #endif
-       
+
         void* ptr = memcheck_malloc(size, file, line, allocator_index, flags);
-       
+
         if (!ptr && allocators[allocator_index].try_next_allocator)
         {
             ptr = memcheck_malloc(size, file, line, allocator_index + 1, flags);
@@ -826,7 +826,7 @@
         #ifdef MEM_DEBUG
         int t1 = get_ms_clock_value();
         #endif
-       
+
         if (!ptr)
         {
             /* didn't work? */
@@ -842,11 +842,11 @@

             dbg_printf("alloc ok, took %s%d.%03d s => %x (size %x)\n", FMT_FIXEDPOINT3(t1-t0), ptr, size);
         }
-       
+
         give_semaphore(mem_sem);
         return ptr;
     }
-   
+
     /* could not find an allocator (maybe out of memory?) */
     snprintf(last_error_msg_short, sizeof(last_error_msg_short), "alloc(%s)", format_memory_size_and_flags(size, flags));
     snprintf(last_error_msg, sizeof(last_error_msg), "No allocator for %s at %s:%d, %s.", format_memory_size_and_flags(size, flags), file, line, current_task->name);
@@ -870,7 +870,7 @@
     buf = (flags & UNCACHEABLE_FLAG) ? UNCACHEABLE(buf) : CACHEABLE(buf);

     dbg_printf("free(%x %s) from task %s\n", buf, format_memory_size_and_flags(((struct memcheck_hdr *)ptr)->length, flags), current_task->name);
-   
+
     if (allocator_index >= 0 && allocator_index < COUNT(allocators))
     {
         memcheck_free(buf, allocator_index, flags);
@@ -880,7 +880,7 @@
     {
         dbg_printf("free fail\n");
     }
-   
+
     give_semaphore(mem_sem);
}

@@ -1044,7 +1044,7 @@

     /* test the new SRM job allocator */
     struct memSuite * srm_suite = _srm_malloc_suite(0);
-   
+
     if (!srm_suite)
     {
         beep();
@@ -1052,7 +1052,7 @@
         give_semaphore(mem_sem);
         return;
     }
-   
+
     srm_num_buffers = srm_suite->num_chunks;
     currentChunk = GetFirstChunkFromSuite(srm_suite);
     srm_buffer_size = GetSizeOfMemoryChunk(currentChunk);
@@ -1074,7 +1074,7 @@
     ASSERT(srm_buffer_size * srm_num_buffers == srm_suite->size);

     exmem_clear(srm_suite, 0);
-   
+
     _shoot_free_suite(shoot_suite);
     _srm_free_suite(srm_suite);

@@ -1181,12 +1181,12 @@
             MENU_SET_VALUE("%s", format_memory_size(max_shoot_malloc_frag_mem));
             MENU_SET_WARNING(MENU_WARN_INFO, shoot_malloc_frag_desc);
             guess_needed = 1;
-           
+
             /* paint memory map */
             for (int i = 0; i < 720; i++)
                 if (memory_map[i])
                     draw_line(i, 400, i, 410, memory_map[i]);
-           
+
             /* show some common addresses on the memory map */
             for (int i = 0; i < COUNT(common_addresses); i++)
             {
@@ -1228,7 +1228,7 @@
                 MENU_SET_VALUE("%s of ",format_memory_size(ml_used_mem));
                 MENU_APPEND_VALUE("%s", format_memory_size(ml_reserved_mem));
             }
-           
+
             if (ml_reserved_mem < ml_used_mem)
             {
                 MENU_SET_WARNING(MENU_WARN_ADVICE, "ML uses too much memory!!");
@@ -1265,7 +1265,7 @@
         entry->shidden = 1;
         return;
     }
-   
+
     MENU_SET_NAME(allocators[index].name);

     int used = allocators[index].mem_used;
@@ -1282,7 +1282,7 @@
         MENU_SET_VALUE("%s used", format_memory_size(used));
         MENU_SET_HELP("Memory used from %s. %d blocks allocated.", allocators[index].name, allocators[index].num_blocks);
     }
-   
+
     if (allocators[index].get_max_region)
     {
         MENU_SET_WARNING(MENU_WARN_INFO, "Max region: %s.", format_memory_size(allocators[index].get_max_region()));
@@ -1291,7 +1291,7 @@
     {
         MENU_SET_WARNING(MENU_WARN_ADVICE, "This allocator does not implement get_max_region.");
     }
-   
+
     if (free_space > 0 && free_space < allocators[index].preferred_free_space)
     {
         MENU_SET_WARNING(MENU_WARN_ADVICE, "Would be nice to have at least %s free here.", format_memory_size(allocators[index].preferred_free_space));
@@ -1306,7 +1306,7 @@
         /* this will fill last_error strings if there's any error */
         memcheck_get_failed();
     }
-   
+
     if (strlen(last_error_msg))
     {
         MENU_SET_NAME("Memory Error");
@@ -1336,11 +1336,11 @@
         {
             void* ptr = (void*) memcheck_entries[buf_pos].ptr;
             if (!ptr) continue;
-           
+
             int size = ((struct memcheck_hdr *)ptr)->length;
             int flags = ((struct memcheck_hdr *)ptr)->flags;
             int allocator = ((struct memcheck_hdr *)ptr)->allocator;
-           
+
             if (size < 32768 || y > 300)
             {
                 small_blocks++;
@@ -1375,13 +1375,13 @@

         bmp_printf(FONT_MED, x, y, msg);
         y += font_med.height * 2;
-       
+
         /* show history */
-       
+
         int first_index = history_index + 1;
         while (history[first_index] == 0)
             first_index = MOD(first_index + 1, HISTORY_ENTRIES);
-       
+
         int peak_y = y+10;
         int peak = alloc_total_peak_with_memcheck / 1024;
         int total = alloc_total_with_memcheck / 1024;
@@ -1492,8 +1492,9 @@
             MENU_EOL
         },
     },
+    #endif
};
-#endif
+

void mem_menu_init()
{
diff --git a/src/property.h b/src/property.h
--- a/src/property.h
+++ b/src/property.h
@@ -4,17 +4,17 @@
  */
/*
  * Copyright (C) 2009 Trammell Hudson <[email protected]>
- *
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- *
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the
  * Free Software Foundation, Inc.,
@@ -245,7 +245,7 @@

// values of PROP_WB_MODE_*:
#define WB_AUTO 0
-#define WB_SUNNY 1
+#define WB_SUNNY 1
#define WB_SHADE 8
#define WB_CLOUDY 2
#define WB_TUNGSTEN 3
@@ -330,7 +330,7 @@
#define PROP_VIDEOSNAP_MODE 0x80000041
//Passwords around 0x77cb4 but no dialog :( Def=0000
//0x2 Restricted Mode (mymenu only) /0x1 Normal? /0x0 Off
-#define PROP_PHOTO_STUDIO_MODE 0x80040016
+#define PROP_PHOTO_STUDIO_MODE 0x80040016
#define PROP_GPS_TIME_SYNC 0x80040045
#define PROP_GUIGROUND_STATE 0x80020011
#define PROP_STROBO_SYNC_AV 0x8000004c //Array 0x77C04
@@ -377,7 +377,7 @@
// buf[1]: 14 if 1080p (20fps), 1e if 720p or 480p (30fps)
// buf[2]: a if 1080p (1/2 of 20fps??), f if 720p or 480p (1/2 of 30fps??)
#else
-#define PROP_VIDEO_MODE 0x80000039
+#define PROP_VIDEO_MODE 0x80000039
// buf[0]: 8 if crop else 0
// buf[1]: 0 if full hd, 1 if 720p, 2 if 680p
// buf[2]: fps
@@ -408,8 +408,22 @@
     #define PROP_CARD_RECORD       0x8003000B
     #define PROP_CLUSTER_SIZE      0x2010004
     #define PROP_FREE_SPACE        0x2010006
+  /*  #define PROP_CARD_SELECT  0x0
+    #define PROP_CLUSTER_SIZE_A 0x1
+    #define PROP_CLUSTER_SIZE_B 0x2
+    #define PROP_CLUSTER_SIZE_C 0x3
+    #define PROP_FREE_SPACE_A 0x4
+    #define PROP_FREE_SPACE_B 0x5
+    #define PROP_FREE_SPACE_C 0x6
+    #define PROP_FILE_NUMBER_A  0x7
+    #define PROP_FILE_NUMBER_B  0x8
+    #define PROP_FILE_NUMBER_C  0x9
+    #define PROP_FOLDER_NUMBER_A  0x10
+    #define PROP_FOLDER_NUMBER_B  0x11
+    #define PROP_FOLDER_NUMBER_C  0x12
+    */
#else // DryOS
-   
+
     #define PROP_CARD_SELECT         0x80040002 //  1=CF, 2=SD

     // CF card
@@ -425,7 +439,7 @@
     #define PROP_CLUSTER_SIZE_B      0x02010007
     #define PROP_FREE_SPACE_B        0x0201000a
     #define PROP_CARD_RECORD_B       0x8003000c
-   
+
     // WFT drive
     #define PROP_FOLDER_NUMBER_C     0x02010002
     #define PROP_FILE_NUMBER_C       0x02010005
@@ -504,7 +518,7 @@
#define PROP_LOUDNESS_BUILT_IN_SPEAKER 0x205001B
#define PROP_LED_LIGHT 0x80030042
#define PROP_AFSHIFT_LVASSIST_STATUS 0x8003003D
-#define PROP_AFSHIFT_LVASSIST_SHIFT_RESULT 0x8003003E
+#define PROP_AFSHIFT_LVASSIST_SHIFT_RESULT 0x8003003E
#define PROP_MULTIPLE_EXPOSURE_CTRL 0x80070001
#define PROP_MIRROR_DOWN_IN_MOVIE_MODE 0x80030034

@@ -534,7 +548,7 @@
#define PROP_DCIM_DIR_SUFFIX 5 // :)
#define PROP_FILE_PREFIX 0x1000007

-#define PROP_AEB 0x8000000B
+#define PROP_AEB 0x8000000B


#ifdef CONFIG_600D
@@ -565,7 +579,7 @@
  * int* data = 0;
  * int len = 0;
  * int err = prop_get_value(prop, &data, &len);
- *
+ *
  * Returns 0 on success.
  */
// int prop_get_value( unsigned property, void** addr, size_t* len );


A1ex pointed me at trying with vxworks-dm-spy intead, as he told me it was compiling for other cameras not so much time ago; but I didn't tried to see if it's better for 5D.

scrax

I'll tri with that too, but there are a lot of stuff probably lost away for vworks.
I've tried to remove the parts giving errors to go on with compilation. But in the end even if can compile not sure it will work I'm moving almost blidly.
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

scrax

After another try with the wxworks_dm_spy I'm still stuck with making a working ML for 5DC.

attached the patch with the changes I made to compile it, but when all source files are compiled can't build autoexec.bin

any help appreciated

I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

scrax

I've also tried to clone and compile that old repo for 5DC and can't compile it anymore for similar errors as before.
That's strange because that repo should compile or at least it was compiling IIRC. I have a different compiler and arm toolchain now, could be that the problem?

-------------------------------

EDIT: added to config.h:
struct config_var* get_config_vars_start();
struct config_var* get_config_vars_end();


and old 5DC code can compile ok as before.
Now looking in the new one...

EDIT2: pushed the changes to the old 5DC repo since is the last one I know that compiles for 5DC. I can't solve LD errors in wxworks_dm_spy branch still stuck.

EDIT3: Seems the new compiled autoexec.bin can't load, blue led stay on and can't go in ML menu. camera works but some buttons are unresponsive (like SET).
I'm now using this that is the most up to date I belive around.

Found the problem being picoc not loading right, disabling it solved the problem, now I have at least one repo compiling and working...

Complete feature list bold what's new vs beta4 (was removed flash/no flash feat not working):
   - zebras, focus peaking, spotmeter, histogram, waveform, vectorscope (in playback mode)
   - exposure bracketing: shutter, ISO, flash; 2x0.5 ... 9x5EV; auto mode (covers the entire dynamic range).
   - DOF bracketing (changes aperture and shutter while keeping exposure constant)
   - Intervalometer
   - Mirror lockup (shortcut key PRINT, or link to self-timer)
   - Shoot Preferences (Pics at once, Use autofocus, Post scripts, Snap sim)
   - Display saturation (grayscale/normal/oversaturated)
   - Image Review (CanonMnu:Hold->Play)
   - Fast zoom (one click goes to 100%, like on 5D3/1Dx)
   - Quick erase (like on 5D3)
   - "Ken Rockwell" zoom (press Zoom In after you took a picture, without pressing PLAY)
   - Exposure adjustment in playback mode (very rough)
   - Timelapse playback - http://vimeo.com/48482815
   - Warning for bad settings (only "mode" warning working good)
   - Config file (Autosave, Save now, Restore ML defaults, Show modified settings)
   - Customize menus
   - Screenshots
   - Burn in tests

   - Benchmark (check read/write speed of the card)
   - Display operating system internals (tasks, free memory)
   - Junkie Menu


NOTE: there is no optiond to dump rom for 5DC so far from ML but the portable rom dumper works ok.
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

scrax

I've made some progress for the errors in compiling 5DC by comparing with 450D and 40D on wxworks_dm_spy branch.
Edited init.c to make it similar to the other two models and fixed some compiling errors, now from what I understand there are a lot of missing stubs to make it compile, and so far I dind't understand well how to find them. I've added the ones that were already there without the _ by duplicating them, now I'm stuck. :(

this is the list of missing stubs so far:

current_task
FIO_SeekSkipFile
GetSizeOfMaxRegion
SetGUIRequestMode
_shoot_free
_shoot_free_suite
_shoot_get_free_space
_shoot_malloc
_shoot_malloc_suite
_srm_free
_srm_free_suite
_srm_get_free_space
_srm_get_max_region
_srm_malloc
_srm_malloc_suite
_shoot_malloc_suite_contig


Last error I get is this from both 40D and 5DC, instead 450D can compile after small fixes:

tasks.o: In function `get_current_task_name':
tasks.c:(.text+0x60): undefined reference to `current_task

I can't understand why it works ok on 450D and not on 40D since stubs.S are same (with different values)
(is another stub missing)
Here full compiler log of 5DC:

make -j4
[ VERSION  ]   ../../platform/5DC.111/version.bin
[ AS       ]   ../../platform/5DC.111/stubs.o
[ VERSION  ]   ../../platform/5DC.111/version.c
make -C ../../tcc
make[1]: Nothing to be done for `all'.
[ CC       ]   version.o
[ LD       ]   magiclantern
posix.o: In function `time':
posix.c:(.text+0x5c): multiple definition of `time'
console.o: In function `printf':
console.c:(.text+0x794): multiple definition of `printf'
console.o: In function `puts':
console.c:(.text+0x804): multiple definition of `puts'
fio-ml.o: In function `startup_warning':
fio-ml.c:(.text+0x24): undefined reference to `SetGUIRequestMode'
fio-ml.o: In function `FIO_CreateFileOrAppend':
fio-ml.c:(.text+0x530): undefined reference to `FIO_SeekSkipFile'
mem.o: In function `GetMaxRegionForAllocateMemory':
mem.c:(.text+0x184): undefined reference to `GetSizeOfMaxRegion'
mem.o: In function `__priv_free':
mem.c:(.text+0x248): undefined reference to `_free'
mem.o: In function `__priv_FreeMemory':
mem.c:(.text+0x250): undefined reference to `_FreeMemory'
mem.o: In function `__priv_alloc_dma_memory':
mem.c:(.text+0x254): undefined reference to `_alloc_dma_memory'
mem.o: In function `__priv_free_dma_memory':
mem.c:(.text+0x258): undefined reference to `_free_dma_memory'
mem.o: In function `__priv_shoot_malloc':
mem.c:(.text+0x25c): undefined reference to `_shoot_malloc'
mem.o: In function `__priv_shoot_free':
mem.c:(.text+0x260): undefined reference to `_shoot_free'
mem.o: In function `shoot_malloc_suite':
mem.c:(.text+0xdfc): undefined reference to `_shoot_malloc_suite'
mem.o: In function `shoot_free_suite':
mem.c:(.text+0xe34): undefined reference to `_shoot_free_suite'
mem.o: In function `srm_malloc_suite':
mem.c:(.text+0xe64): undefined reference to `_srm_malloc_suite'
mem.o: In function `srm_free_suite':
mem.c:(.text+0xe9c): undefined reference to `_srm_free_suite'
mem.o: In function `shoot_malloc_suite_contig':
mem.c:(.text+0xecc): undefined reference to `_shoot_malloc_suite_contig'
mem.o:(.data+0x18): undefined reference to `_free'
mem.o:(.data+0x68): undefined reference to `_FreeMemory'
mem.o:(.data+0x6c): undefined reference to `_alloc_dma_memory'
mem.o:(.data+0x70): undefined reference to `_free_dma_memory'
mem.o:(.data+0xb4): undefined reference to `_shoot_malloc'
mem.o:(.data+0xb8): undefined reference to `_shoot_free'
mem.o:(.data+0xbc): undefined reference to `_shoot_malloc'
mem.o:(.data+0xc0): undefined reference to `_shoot_free'
mem.o:(.data+0xc4): undefined reference to `_shoot_get_free_space'
mem.o:(.data+0xc8): undefined reference to `_shoot_get_free_space'
mem.o:(.data+0x104): undefined reference to `_srm_malloc'
mem.o:(.data+0x108): undefined reference to `_srm_free'
mem.o:(.data+0x10c): undefined reference to `_srm_malloc'
mem.o:(.data+0x110): undefined reference to `_srm_free'
mem.o:(.data+0x114): undefined reference to `_srm_get_free_space'
mem.o:(.data+0x118): undefined reference to `_srm_get_max_region'
menu.o: In function `menu_benchmark':
menu.c:(.text+0x6848): undefined reference to `SetGUIRequestMode'
menu.o: In function `menu_request_image_backend':
menu.c:(.text+0x7c98): undefined reference to `SetGUIRequestMode'
debug.o: In function `bsod':
debug.c:(.text+0xa70): undefined reference to `SetGUIRequestMode'
rbf_font.o: In function `font_by_name':
rbf_font.c:(.text+0x6bc): undefined reference to `FIO_SeekSkipFile'
rbf_font.c:(.text+0x6e8): undefined reference to `FIO_SeekSkipFile'
shoot.o: In function `exit_play_qr_mode':
shoot.c:(.text+0x25b4): undefined reference to `SetGUIRequestMode'
shoot.o: In function `enter_play_mode':
shoot.c:(.text+0x2664): undefined reference to `SetGUIRequestMode'
tasks.o: In function `get_current_task_name':
tasks.c:(.text+0x60): undefined reference to `current_task'
make: *** [magiclantern] Error 1
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

Ant123

Quote from: scrax on March 25, 2019, 02:55:32 PM
I can't understand why it works ok on 450D and not on 40D since stubs.S are same (with different values)

Because of this line

I did not found 64bit function FIO_SeekSkipFile:

NSTUB(0xFFCCD344, FIO_SeekFile)

extern int32_t FIO_SeekFile( FILE* stream, int32_t position, int whence );
int64_t FIO_SeekSkipFile( FILE* stream, int64_t position, int whence )
{
return (int64_t) FIO_SeekFile(stream, (int32_t) position, whence );
}

scrax

yes, found it later the difference, thanks. mistery solved for that at least...

I've put FIO_SeekSkipFile in dummy.c and got rid of it in the errors, now looking at what you posted about

Last changes got rid of errors about:

FIO_SeekSkipFile
GetSizeOfMaxRegion

by putting what was missing in dummy.c copied from 450D's one
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

scrax

I've managed to get a compiled autoexec.bin for 5DC by putting all missing subs in dummy.c and commented out the two (printf and puts) that are defined in console.c

but in the end it didn't load and back buttons are unresponsive. I think I got a dead end for now...
After some tryed to revert init.c and now seems to load something because blue led blinks one second on and one second off, camera works as without ML and trash button don't load ML menu...
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

scrax

After small changes I got it loading a bit more, now I can enter ML menu but can't see any font maybe the ML folder is not ok since I've just used the autoexec.bin over old 2.3 build.
Menu just show the mic icon (that should not be there) and like 8 items without text. if I try to change menu folder ML hangs.
I'm a bitfeared to softbrick now...
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

scrax

found some commeted lines in dummy.c:

//void* shoot_malloc(size_t size) { return AllocateMemory(size); }
//void shoot_free(void* ptr) { FreeMemory(ptr); }

that I've adapted like this:

void* _shoot_malloc(size_t size) { return malloc(size); }
void _shoot_free(void* ptr) { free(ptr); }
void* _srm_malloc(size_t size) { return malloc(size); };

but not sure if it's ok

still missing:

void SetGUIRequestMode(int mode) {};

int _shoot_free_suite() { return 1; };
int _shoot_get_free_space() { return 1; };

int _shoot_malloc_suite() { return 1; };
void _srm_free(void* ptr) {};
void _srm_free_suite(struct memSuite * suite) {};
int _srm_get_free_space() { return 1; };
int _srm_get_max_region() { return 1; };

struct memSuite * _srm_malloc_suite(int num_requested_buffers) { return 0; };
int _shoot_malloc_suite_contig() { return 1; };


another one that I'm not sure if is right is:

extern int32_t FIO_SeekFile( FILE* stream, int32_t position, int whence );
int64_t FIO_SeekSkipFile( FILE* stream, int64_t position, int whence )
{
return (int64_t) FIO_SeekFile(stream, (int32_t) position, whence );
}


For the font problem in ml_big_init_task() 450D and 40D have different commands: _load_fonts() and load_fonts() I've tried both in 5DC without any dfferences, what is best to use?

in the ROM1.BIN.dis (made using the perl script) I found this line:
"[GUI] GUIRequestMode(%d)":
that could be useful to find the SetGUIRequestMode stub but I don''t understand the language and if 0xFF0153B0 is the correct value or if it is 0xFF815E9C, but could be also 0xFF015E9C or 0xFF8153B0 or more probably none of them...
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-