@scrax I tried again starting from vxworks-dm-spy branch (haven't tried your patch yet, but looks like it isn't complete, how should I use it?), but I get stuck with a 5 seconds blue led on and 5 seconds off, which I need to track down.
Anyone know what it means? Trash button doesn't works and firmware version in Canon l's Menu wasn't replaced by ML
Will try to post a diff later if I can go over; I tried to not put all inside dummy.c and find what was possible, but some stubs looks like are not present in the Rom disassembly compared to 40D/450D.
Didn't change init.c a lot, just lunch firmware as a pointer because I wasn't able to find why compiler is not able to find reference inside Stubs S...
Noticed it is much different from the one used in 40D and 450D. Does it need to be updated or is better to leave as is because more specific to 5dc?
To make them compile, I had to add dm-spy-extra and exmem into makefile as extra objs
EDIT: ML initialization hangs when calling hijack_gui_main_task(), when malloc memory for bmp_vram_idle_ptr or ml_big_init_task(); Menu and other buttons get partially overridden by hijacking function
diff --git a/platform/40D.111/Makefile.setup.default b/platform/40D.111/Makefile.setup.default
--- a/platform/40D.111/Makefile.setup.default
+++ b/platform/40D.111/Makefile.setup.default
@@ -13,4 +13,5 @@
ML_SRC_EXTRA_OBJS = \
init.o \
dummy.o \
- dm-spy.o
+ dm-spy.o \
+ dm-spy-extra.o
diff --git a/platform/40D.111/stubs.S b/platform/40D.111/stubs.S
--- a/platform/40D.111/stubs.S
+++ b/platform/40D.111/stubs.S
@@ -221,6 +221,9 @@
NSTUB(0xFFD56470, TryPostStageEvent)
NSTUB(0xFFD564FC, TryPostStageEvent_end) // PendStageEvent
+//TODO:
+NSTUB(0xFFD6A1C8, current_task) // 0x22E00
+
NSTUB(0xFFD6A1C8, get_current_task) // 0x22E00
NSTUB(0xFFD69F8C, get_task_info)
NSTUB(0xFFD6B8B0, get_active_task_list)
diff --git a/platform/Makefile.platform.map b/platform/Makefile.platform.map
--- a/platform/Makefile.platform.map
+++ b/platform/Makefile.platform.map
@@ -14,10 +14,10 @@
700D.114 \
EOSM.202 \
1100D.105 \
+ 5DC.111 \
6D.116
PLATFORM_MAP_UNMAINTAINED = \
- 5DC.111 \
100D.100 \
platform_map = $(filter $(1).%, $(PLATFORM_MAP))
diff --git a/platform/unmaintained/5DC.111/Makefile.setup.default b/platform/unmaintained/5DC.111/Makefile.setup.default
--- a/platform/unmaintained/5DC.111/Makefile.setup.default
+++ b/platform/unmaintained/5DC.111/Makefile.setup.default
@@ -10,16 +10,18 @@
fps-engio.o \
audio-ak.o \
movtweaks.o \
- exmem.o \
liveview.o \
bootflags.o \
lv-img-engio.o \
hdr.o \
+ exmem.o \
+
ML_SRC_EXTRA_OBJS = \
init.o \
dummy.o \
dm-spy.o \
- tp-spy.o
+ dm-spy-extra.o \
+ # tp-spy.o
CFLAG_USER += -Wno-unused-variable
diff --git a/platform/unmaintained/5DC.111/consts.h b/platform/unmaintained/5DC.111/consts.h
--- a/platform/unmaintained/5DC.111/consts.h
+++ b/platform/unmaintained/5DC.111/consts.h
@@ -2,8 +2,12 @@
* 5Dc 1.1.1 consts
*/
+extern int _dummy_variable;
+
#define CANON_SHUTTER_RATING 100000
+#define CARD_DRIVE "A:/"
+
#define CARD_LED_ADDRESS 0xC02200A0 // http://magiclantern.wikia.com/wiki/Led_addresses
#define LEDBLUE *(int*)0xC02200F0
#define LEDRED *(int*)0xC02200A0
@@ -14,7 +18,7 @@
#define FORMAT_BTN "[Q]"
#define STR_LOC 11
-#define YUV422_LV_BUFFER_1 0x10b63e8
+#define YUV422_LV_BUFFER_1 0x10b63e8
#define YUV422_LV_BUFFER_2 0x10b63ec
#define YUV422_LV_BUFFER_3 0x10b63f0
#define YUV422_LV_BUFFER_DISPLAY_ADDR YUV422_LV_BUFFER_1
@@ -39,7 +43,11 @@
#define PLAY_MODE (gui_state == GUISTATE_PLAYMENU && MEM(0x27D8) && !MEM(0x3D50)) // StartPl1App, but not StartPlEraseApp
#define MENU_MODE (gui_state == GUISTATE_PLAYMENU && MEM(0x4C48)) // StartMenuMainHeaderApp
-#define CURRENT_GUI_MODE (gui_state == GUISTATE_PLAYMENU ? 1 : 0)
+// TODO:
+//#define CURRENT_GUI_MODE (gui_state == GUISTATE_PLAYMENU ? 1 : 0)
+#define CURRENT_GUI_MODE 1
+#define GUIMODE_PLAY 2
+#define GUISTATE_QR_ZOOM 3
#define NUM_PICSTYLES 9
#define PROP_PICSTYLE_SETTINGS(i) (PROP_PICSTYLE_SETTINGS_STANDARD - 1 + i)
@@ -106,4 +114,3 @@
//~ #define ARROW_MODE_TOGGLE_KEY ""
#define WINSYS_BMP_DIRTY_BIT_NEG 0
-
diff --git a/platform/unmaintained/5DC.111/dummy.c b/platform/unmaintained/5DC.111/dummy.c
--- a/platform/unmaintained/5DC.111/dummy.c
+++ b/platform/unmaintained/5DC.111/dummy.c
@@ -2,6 +2,7 @@
#include "bmp.h"
#include "gui.h"
#include "menu.h"
+#include "timer.h"
// dummy stubs
@@ -14,17 +15,17 @@
//~ void *CreateRecursiveLock(int n){}
void *ReleaseRecursiveLock(void *lock){ return NULL; }
//void bmp_zoom(uint8_t* dst, uint8_t* src, int x0, int y0, int denx, int deny) { return; }
-struct memSuite * shoot_malloc_suite_contig(size_t size) { return 0; }
-struct memSuite *shoot_malloc_suite(size_t size) { return 0; }
+struct memSuite * _shoot_malloc_suite_contig(size_t size) { return 0; }
+struct memSuite * _shoot_malloc_suite(size_t size) { return 0; }
struct memChunk * GetFirstChunkFromSuite(struct memSuite * suite) { return 0; }
-void* GetMemoryAddressOfMemoryChunk(struct memChunk * chunk) { return 0; }
-void shoot_free_suite(struct memSuite * hSuite) { return; }
+//void* GetMemoryAddressOfMemoryChunk(struct memChunk * chunk) { return 0; }
+//void shoot_free_suite(struct memSuite * hSuite) { return; }
struct memChunk * GetNextMemoryChunk(struct memSuite * suite, struct memChunk * chunk) { return 0; }
int audio_meters_are_drawn() { return 0; }
int override_zoom_buttons = 0;
void lcd_release_step(){};
void force_liveview() {};
-int lcd_release_running = 0;
+//int lcd_release_running = 0;
void set_shooting_mode(){};
int get_screen_layout(){ return 0; };
void rec_notify_trigger(){};
@@ -41,9 +42,9 @@
int is_mvr_buffer_almost_full(){ return 0; }
void rec_notify_continuous(){};
void movie_indicators_show(){};
-void display_shooting_info(){};
-void free_space_show_photomode(){};
-void dialog_redraw(){}
+//void display_shooting_info(){};
+//void free_space_show_photomode(){};
+void dialog_redraw(struct dialog * dialog){}
int digic_iso_gain_photo;
int digic_iso_gain_movie;
void MuteOff_0(){}
@@ -77,7 +78,7 @@
void volume_up(){};
void volume_down(){};
-void _EngDrvOut(int addr, int value) { MEM(addr) = value; }
+void _EngDrvOut(uint32_t reg, uint32_t value) { MEM(reg) = value; }
uint32_t shamem_read(uint32_t addr) { return 0; }
void _engio_write() {}
@@ -105,10 +106,12 @@
int get_effective_hdr_iso_for_display(int raw_iso ) { return 1; };
void set_movie_digital_iso_gain(int gain) {};
-int bmp_is_on() { return 1; }
+//int bmp_is_on() { return 1; }
-void* shoot_malloc(size_t size) { return AllocateMemory(size); }
-void shoot_free(void* ptr) { FreeMemory(ptr); }
+//void* shoot_malloc(size_t size) { return AllocateMemory(size); }
+void* _shoot_malloc(size_t size) { return malloc(size); }
+void _shoot_free(void* ptr) { free(ptr); }
+//void shoot_free(void* ptr) { FreeMemory(ptr); }
void display_gain_toggle(){};
//void yuv_resize(){};
@@ -118,3 +121,31 @@
void movie_tweak_menu_init() {};
//int hdr_video_enabled() { return 0; };
int get_digic_iso_gain_movie() { return 0; };
+
+//Altre
+//int sound_recording_enabled() { return 0; }
+//void DeleteMemorySuite(struct memSuite * suite) { }
+int SetTimerAfter(int delay_ms, timerCbr_t timer_cbr, timerCbr_t overrun_cbr, void* priv) { return 0; }
+void CancelDateTimer();
+int64_t FIO_SeekSkipFile( FILE* stream, int64_t position, int whence ) { return 0; }
+//0xFF015E9C
+void SetGUIRequestMode(int mode){}
+void* _srm_malloc(size_t size){ return malloc(size);}
+void _srm_free(void* ptr){free(ptr);}
+int _srm_get_free_space(){return 0;}
+int _srm_get_max_region(){return 0;}
+int _shoot_get_free_space(){return 0;}
+int _shoot_free_suite(){return 0;}
+struct memSuite * _srm_malloc_suite(int num_requested_buffers){}
+void _srm_free_suite(struct memSuite * suite){}
+
+/* per exmec.c */
+struct memSuite * CreateMemorySuite(void* first_chunk_address, size_t first_chunk_size, uint32_t flags) { return 0; }
+struct memChunk * CreateMemoryChunk(void* address, size_t size, uint32_t flags) { return 0; }
+void DeleteMemorySuite(struct memSuite * suite) { }
+int sound_recording_enabled() { return 0; }
+void SRM_AllocateMemoryResourceFor1stJob(void (*callback)(void** dst_ptr, void* raw_buffer, uint32_t raw_buffer_size), void** dst_ptr) { }
+int AddMemoryChunk(struct memSuite * suite, struct memChunk * chunk) { return 0; }
+void CancelDateTimer();
+void SRM_FreeMemoryResourceFor1stJob(void* raw_buffer, int unk1_zero, int unk2_zero) { }
+//int GetSizeOfMaxRegion(int* max_region) { return 0; }
diff --git a/platform/unmaintained/5DC.111/features.h b/platform/unmaintained/5DC.111/features.h
--- a/platform/unmaintained/5DC.111/features.h
+++ b/platform/unmaintained/5DC.111/features.h
@@ -17,7 +17,7 @@
#define FEATURE_HISTOGRAM
#define FEATURE_WAVEFORM
#define FEATURE_VECTORSCOPE
- #define FEATURE_OVERLAYS_IN_PLAYBACK_MODE
+//TODO: fixme #define FEATURE_OVERLAYS_IN_PLAYBACK_MODE
//#define FEATURE_FALSE_COLOR
/** Shoot menu **/
@@ -60,7 +60,7 @@
/** Debug menu **/
- #define FEATURE_SCREENSHOT
+//TODO: Enable later #define FEATURE_SCREENSHOT
#define FEATURE_DONT_CLICK_ME
@@ -72,4 +72,3 @@
#define FEATURE_SHOW_FREE_MEMORY
//#define FEATURE_SHOW_SHUTTER_COUNT //not working
#define FEATURE_SHOW_CMOS_TEMPERATURE
-
diff --git a/platform/unmaintained/5DC.111/gui.c b/platform/unmaintained/5DC.111/gui.c
--- a/platform/unmaintained/5DC.111/gui.c
+++ b/platform/unmaintained/5DC.111/gui.c
@@ -16,19 +16,28 @@
#include "dryos.h"
struct semaphore * gui_sem;
+extern void gui_massive_event_loop2( uint32_t, void *, uint32_t );
+extern void unknown_gui_function(uint32_t,uint32_t);
+extern void GUI_ChangeMode(uint32_t);
+extern void other_gui_post_event(uint32_t,uint32_t*,uint32_t);
+extern int bindGUISwitchCBR(int,int,int,int);
+extern void DeleteTask(int);
+extern int QueryTaskByName(char *);
+extern int handle_mlu_toggle(struct event * event);
+//TODO: Adapt to gui.c from 40D - was refactored?
// return 0 if you want to block this event
static int handle_buttons(struct event * event)
{
ASSERT(event->type == 0)
-
+
if (event->type != 0) return 1; // only handle events with type=0 (buttons)
if (handle_common_events_startup(event) == 0) return 0;
extern int ml_started;
if (!ml_started) return 1;
if (handle_common_events_by_feature(event) == 0) return 0;
-
+
if (handle_mlu_toggle(event) == 0) return 0;
return 1;
diff --git a/platform/unmaintained/5DC.111/init.c b/platform/unmaintained/5DC.111/init.c
--- a/platform/unmaintained/5DC.111/init.c
+++ b/platform/unmaintained/5DC.111/init.c
@@ -1,4 +1,5 @@
#include "dryos.h"
+#include "dryos-notes.h"
#include "bmp.h"
#include "gui.h"
#include "menu.h"
@@ -8,9 +9,14 @@
/** Specified by the linker */
extern uint32_t _bss_start[], _bss_end[];
extern void create_task_cmd_shell(const char * name);
+void hijack_gui_main_task();
void ml_big_init_task(); // forward declaration
int bmp_vram_idle_ptr;
+void config_parse_file( char * );
+extern uint32_t get_current_task();
+extern void ioGlobalStdSet(int,int);
+
void start_debug_mode() {
int file;
char filename[20] = "A:/DEBUG.LOG"; // default name
@@ -18,7 +24,9 @@
time_t t;
struct tm tm;
- file = (int) FIO_OpenFile(filename, O_CREAT | O_WRONLY , 644);
+// file = (int) FIO_OpenFile(filename, O_CREAT | O_WRONLY , 644);
+file = (int) FIO_OpenFile(filename, O_CREAT | O_WRONLY );
+
if(file > 0) {
// redirect stdout and stderr to our file
ioGlobalStdSet(1, file);
@@ -305,6 +313,7 @@
#endif
}/*}}}*/
+extern int init_code_run();
void copy_and_restart()
{/*{{{*/
//blink(1);
@@ -350,8 +359,11 @@
//cache_fake(0xFF810054, 0xE3A01078, TYPE_ICACHE); // MOV R1, #0x78
//cache_fake(0xFF810058, 0xE2811A01, TYPE_ICACHE); // ADD R1, R1, 0x1004 - enable caches
- firmware_entry();
+ //TODO: fixme
+// firmware_entry();
+ void (*reset)(void) = (void*) ROMBASEADDR;
+ reset();
// unreachable
while(1) {
@@ -450,7 +462,7 @@
To hijack an EventDispatch of a manager or module, remember:
- Modules have a StageClass
- Managers have a TaskClass
-
+
The structures for these are already defined in state-object.h
NOTE: you can only hijack one manager or module at a time. Never try to hijack more than one! (could brick camera).
**/
@@ -596,7 +608,7 @@
snprintf(assert_msg, sizeof(assert_msg),
"ML ASSERT:\n%s\n"
"at %s:%d (%s), task %s\n",
- msg,
+ msg,
file, line, func, get_task_name_from_id(get_current_task())
);
request_crash_log(2);
@@ -625,3 +637,15 @@
}
}/*}}}*/
+
+/* For gui-comon.c */
+int magic_off = 0; // Set to 1 to disable ML
+
+unsigned short int magic_is_off()
+{
+ return magic_off;
+}
+
+void _disable_ml_startup() {
+ magic_off_request = 1;
+}
diff --git a/platform/unmaintained/5DC.111/stubs.S b/platform/unmaintained/5DC.111/stubs.S
--- a/platform/unmaintained/5DC.111/stubs.S
+++ b/platform/unmaintained/5DC.111/stubs.S
@@ -52,8 +52,10 @@
NSTUB(0xFF811060, aIcuFirmwareVer)
NSTUB(0xFF811078, aK213)
NSTUB(0xFFB2A56C, alloc_dma_memory)
+NSTUB(0xFFB2A56C, _alloc_dma_memory)
NSTUB(0xFF8B6248, AllocateFileCacheItem)
NSTUB(0xFFB2F664, AllocateMemory)
+NSTUB(0xFFB2F664, _AllocateMemory)
NSTUB(0xFFB40474, armInitExceptionModes)
NSTUB(0xFF811000, aRomReady)
NSTUB(0xFFB44EC4, asctime)
@@ -172,8 +174,11 @@
NSTUB(0xFFB41CB0, fputs)
NSTUB(0xFFB41D38, fread)
NSTUB(0xFFB4CB14, free)
+NSTUB(0xFFB4CB14, _free)
NSTUB(0xFFB2A5B0, free_dma_memory)
+NSTUB(0xFFB2A5B0, _free_dma_memory)
NSTUB(0xFFB2F680, FreeMemory)
+NSTUB(0xFFB2F680, _FreeMemory)
NSTUB(0xFFB41E3C, freopen)
NSTUB(0xFFB39988, frexp)
NSTUB(0xFFB42024, fscanf)
@@ -195,6 +200,7 @@
NSTUB(0xFFB1A1D0, GetNameInformation)
NSTUB(0xFFB42AC4, gets)
NSTUB(0xFFB19564, GetSelfTaskHandle)
+NSTUB(0xffb2f734 ,GetSizeOfMaxRegion) //TODO: check again
NSTUB(0xFFB1FF74, GetSystemTime)
NSTUB(0xFFB18430, give_semaphore)
NSTUB(0xFF812308, GM_Initialize)
@@ -256,6 +262,7 @@
NSTUB(0xFFB4B400, logTask)
NSTUB(0xFFB4130C, longjmp)
NSTUB(0xFFB4CB08, malloc)
+NSTUB(0xFFB4CB08, _malloc)
NSTUB(0xFFB4CAF4, memAddToPool)
//NSTUB( 0xFFB4B774, memalign )
//NSTUB( 0xFFB44664, memcpy )
@@ -626,6 +633,7 @@
NSTUB(0xFFB29CC0, TryPostStageEvent)
NSTUB(0xFFB29D4C, TryPostStageEvent_end)
+NSTUB(0xFFB57898, current_task) //TODO: fixme
NSTUB(0xFFB57898, get_current_task)
NSTUB(0xFFB58490, get_task_info)
NSTUB(0xFFB561F0, get_active_task_list)
@@ -651,5 +659,3 @@
NSTUB(0xFFB4641C, sub_FFB4641C)
NSTUB(0xFFB46508, sub_FFB46508)
NSTUB(0xFFB46478, sub_FFB46478)
-
-
diff --git a/src/bootflags.c b/src/bootflags.c
--- a/src/bootflags.c
+++ b/src/bootflags.c
@@ -120,7 +120,7 @@
// http://www.datarescue.com/laboratory/partition.htm
// http://magiclantern.wikia.com/wiki/Bootdisk
-#if !defined(CONFIG_500D) && !defined(CONFIG_50D) && !defined(CONFIG_5D2) && !defined(CONFIG_40D) && !defined(CONFIG_450D)
+#if !defined(CONFIG_500D) && !defined(CONFIG_50D) && !defined(CONFIG_5D2) && !defined(CONFIG_40D) && !defined(CONFIG_450D) && !defined(CONFIG_5DC)
int
bootflag_write_bootblock( void )
{
@@ -204,17 +204,17 @@
{
#if defined CONFIG_500D
struct cf_device * const dev = sd_device[1];
-#elif defined(CONFIG_50D) || defined(CONFIG_5D2) || defined(CONFIG_40D) || defined(CONFIG_450D)// not good for 40D, need checking
+#elif defined(CONFIG_50D) || defined(CONFIG_5D2) || defined(CONFIG_40D) || defined(CONFIG_450D) || defined(CONFIG_5DC) // not good for 40D, need checking
struct cf_device * const dev = cf_device[5];
#endif
-
+
uint8_t *block = fio_malloc( 512 );
-
+
int i;
for(i=0; i<512; i++) block[i] = 0xAA;
dev->read_block( dev, 0, 1, block ); //overwrite our AAAs in our buffer with the MBR partition of the SD card.
-
+
// figure out if we are a FAT32 partitioned drive. this spells out FAT32 in chars.
// FAT16 not supported yet - I don't have a small enough card to test with.
//if( block[0x52] == 0x46 && block[0x53] == 0x41 && block[0x54] == 0x54 && block[0x55] == 0x33 && block[0x56] == 0x32 )
diff --git a/src/console.c b/src/console.c
--- a/src/console.c
+++ b/src/console.c
@@ -315,6 +315,7 @@
/* some functions from standard I/O */
+#ifndef CONFIG_5DC
int printf(const char* fmt, ...)
{
/* when called from init_task, 512 bytes are enough to cause stack overflow */
@@ -336,3 +337,4 @@
console_puts("\n");
return 0;
}
+#endif
diff --git a/src/debug.c b/src/debug.c
--- a/src/debug.c
+++ b/src/debug.c
@@ -2004,7 +2004,7 @@
return 1;
}
-#if defined (CONFIG_40D) || defined(CONFIG_450D)
+#if defined (CONFIG_40D) || defined(CONFIG_450D) || defined(CONFIG_5DC)
void _redraw_do() { }
#endif
diff --git a/src/dryos-notes.h b/src/dryos-notes.h
--- a/src/dryos-notes.h
+++ b/src/dryos-notes.h
@@ -54,6 +54,7 @@
extern void audio_level_task(void);
extern void audio_interval_unlock(void*);
+/*
extern FILE *
FIO_OpenFile(
const char * name
@@ -63,7 +64,7 @@
int mode
#endif
);
-
+*/
extern ssize_t
FR_SyncReadFile(
const char * filename,
diff --git a/src/fio-ml.c b/src/fio-ml.c
--- a/src/fio-ml.c
+++ b/src/fio-ml.c
@@ -353,18 +353,25 @@
FILE* _FIO_OpenFile(const char* filename, unsigned mode );
/* this one returns 0 on error, just like in plain C */
+/*#ifdef CONFIG_VXWORKS
+FILE* FIO_OpenFile(const char* filename, int flags,
+ int mode)
+
+#else*/
FILE* FIO_OpenFile(const char* filename, unsigned mode )
+//#endif
+
{
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;
}
diff --git a/src/fio-ml.h b/src/fio-ml.h
--- a/src/fio-ml.h
+++ b/src/fio-ml.h
@@ -100,7 +100,19 @@
};
// file IO
+/*
+#ifdef CONFIG_VXWORKS
+extern FILE *
+FIO_OpenFile(
+ const char * name
+ ,
+ int flags,
+ int mode
+);
+#else*/
extern FILE* FIO_OpenFile( const char* filename, unsigned mode );
+//#endif
+
extern int FIO_ReadFile( FILE* stream, void* ptr, size_t count );
extern int FIO_WriteFile( FILE* stream, const void* ptr, size_t count );
extern void FIO_CloseFile( FILE* stream );
diff --git a/src/mem.c b/src/mem.c
--- a/src/mem.c
+++ b/src/mem.c
@@ -1547,9 +1547,9 @@
},
MENU_EOL
},
- },
+ },
+#endif
};
-#endif
void mem_menu_init()
{
diff --git a/src/menu.c b/src/menu.c
--- a/src/menu.c
+++ b/src/menu.c
@@ -129,7 +129,7 @@
static int is_customize_selected();
-#if defined (CONFIG_40D) || defined(CONFIG_450D)
+#if defined (CONFIG_40D) || defined(CONFIG_450D) || defined(CONFIG_5DC)
void CancelDateTimer() { }
#else
extern void CancelDateTimer();
diff --git a/src/posix.c b/src/posix.c
--- a/src/posix.c
+++ b/src/posix.c
@@ -40,10 +40,12 @@
}
/* warning - not implemented yet */
+#ifndef CONFIG_5DC
int time()
{
return 0;
}
+#endif
int clock()
{
diff --git a/src/raw.c b/src/raw.c
--- a/src/raw.c
+++ b/src/raw.c
@@ -288,6 +288,15 @@
-887, 10000, 2129, 10000, 6051, 10000
#endif
+#ifdef CONFIG_5DC // these values are in ufraw-0.22
+ //~{ "Canon EOS 40D", 0, 0x3f60,
+ //~{ 6071,-747,-856,-7653,15365,2441,-2025,2553,7315 } },
+ #define CAM_COLORMATRIX1 \
+ 6071, 10000, -747, 10000, -856, 10000, \
+ -7653, 10000, 15365, 10000, 2441, 10000, \
+ -2025, 10000, 2553, 10000, 7315, 10000
+#endif
+
#ifdef CONFIG_40D // these values are in ufraw-0.22
//~{ "Canon EOS 40D", 0, 0x3f60,
//~{ 6071,-747,-856,-7653,15365,2441,-2025,2553,7315 } },
@@ -400,6 +409,11 @@
static int dynamic_ranges[] = {1100, 1094, 1060, 1005, 919, 826, 726, 633};
#endif
+#ifdef CONFIG_5DC
+// TODO: FIXME: correct values
+static int dynamic_ranges[] = {1100, 1094, 1060, 1005, 919, 826, 726, 633};
+#endif
+
#ifdef CONFIG_450D
// TODO: FIXME: correct values
static int dynamic_ranges[] = {1100, 1094, 1060, 1005, 919, 826, 726, 633};
diff --git a/src/shoot.c b/src/shoot.c
--- a/src/shoot.c
+++ b/src/shoot.c
@@ -1309,6 +1309,10 @@
void expo_adjust_playback(int dir)
{
#ifdef CONFIG_5DC
+ //TODO: fixme
+ extern void BmpDDev_take_semaphore();
+ extern void BmpDDev_give_semaphore();
+
static int expo_value = 0;
if (dir == 0)
{
diff --git a/src/tasks.c b/src/tasks.c
--- a/src/tasks.c
+++ b/src/tasks.c
@@ -210,6 +210,7 @@
info->custom_drawing = CUSTOM_DRAW_THIS_MENU;
#if defined(CONFIG_VXWORKS)
+/*extern int get_active_task_list(void* arr,int n)
if (entry->selected)
{
@@ -251,7 +252,7 @@
y = 10;
}
}
-
+*/
#else // DryOS - https://groups.google.com/forum/#!msg/ml-devel/JstGrNJiuVM/2L1QZpZ7F4YJ
#ifdef CONFIG_TSKMON
diff --git a/src/tweaks.c b/src/tweaks.c
--- a/src/tweaks.c
+++ b/src/tweaks.c
@@ -1098,8 +1098,8 @@
while (!quickzoom_unpressed && PLAY_MODE)
{
#ifdef CONFIG_5DC
- (int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR) = MIN((int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR) + 3, IMGPLAY_ZOOM_LEVEL_MAX);
- (int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR + 4) = MIN((int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR + 4) + 3, IMGPLAY_ZOOM_LEVEL_MAX);
+ MEM(IMGPLAY_ZOOM_LEVEL_ADDR) = MIN((int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR) + 3, IMGPLAY_ZOOM_LEVEL_MAX);
+ MEM(IMGPLAY_ZOOM_LEVEL_ADDR + 4) = MIN((int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR + 4) + 3, IMGPLAY_ZOOM_LEVEL_MAX);
#endif
fake_simple_button(BGMT_PRESS_ZOOM_IN);
msleep(50);