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 <hudson+ml@osresearch.net>
- *
+ *
* 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 <hudson+ml@osresearch.net>
- *
+ *
* 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 <hudson+ml@osresearch.net>
- *
+ *
* 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.