Read about our upcoming Code of Conduct on this issue

Commit 0e152a38 authored by hudson@andromeda.local's avatar hudson@andromeda.local
Browse files

More 550D fixes: gray color and bmp_vram_info. Still no zebras

--HG--
branch : 550d
parent 96345eb02894
......@@ -308,7 +308,7 @@ my_init_task(void)
msleep( 500 );
// Parse our config file
const char * config_filename = "A:/magiclantern.cfg";
const char * config_filename = "B:/magiclantern.cfg";
global_config = config_parse_file( config_filename );
bmp_printf( FONT_MED, 0, 40,
"Magic Lantern version %s (%s)\n"
......@@ -318,13 +318,19 @@ my_init_task(void)
build_date,
build_user
);
bmp_printf( FONT_MED, 0, 400,
bmp_printf( FONT_MED, 0, 300,
"Config file %s: %s",
config_filename,
global_config ? "YES" : "NO"
);
msleep( 500 );
bmp_printf( FONT(FONT_HUGE,COLOR_YELLOW,COLOR_BLUE),
80, 80,
" Magic \nLantern\n %s ",
build_version
);
msleep( 2000 );
bmp_fill(0, 80, 80, 7*60, 3 *70);
init_funcs_done = 0;
//task_create( "init_func", 0x1f, 0x1000, call_init_funcs, 0 );
......
......@@ -76,6 +76,7 @@ FLAGS=\
-fomit-frame-pointer \
-fno-strict-aliasing \
-DCONFIG_MAGICLANTERN=1 \
-DCONFIG_550D=1 \
-DRESTARTSTART=$(RESTARTSTART) \
-DROMBASEADDR=$(ROMBASEADDR) \
-DVERSION=\"$(VERSION)\" \
......@@ -165,17 +166,15 @@ ML_OBJS-y = \
font-small.o \
config.o \
menu.o \
debug.o \
stdio.o \
audio.o \
lens.o \
property.o \
NO2=\
zebra.o \
gui.o \
NO=\
debug.o \
zebra.o \
focus.o \
spotmeter.o \
hotplug.o \
......
......@@ -157,7 +157,8 @@ bmp_fill(
/** Some selected colors */
#define COLOR_EMPTY 0x00 // total transparent
#define COLOR_BG 0x03 // transparent black
#define COLOR_BG 0x14 // transparent gray
#define COLOR_BG_DARK 0x03 // transparent black
#define COLOR_WHITE 0x01 // Normal white
#define COLOR_BLUE 0x0B // normal blue
#define COLOR_RED 0x08 // normal red
......
......@@ -409,6 +409,10 @@ dump_task( void )
//dm_set_store_level( 0x15, 2 );
//dm_set_store_level( 0x2f, 0x16 );
//msleep(1000);
//bmp_draw_palette();
//dispcheck();
if( timed_dump == 0 )
return;
......
......@@ -437,7 +437,7 @@ mvr_create_logfile(
return;
// Movie starting
mvr_logfile = FIO_CreateFile( "A:/movie.log" );
mvr_logfile = FIO_CreateFile( "B:/movie.log" );
if( mvr_logfile == INVALID_PTR )
{
bmp_printf( FONT_LARGE, 0, 40,
......@@ -544,7 +544,7 @@ PROP_HANDLER( PROP_LV_LENS )
PROP_HANDLER( PROP_LVCAF_STATE )
{
bmp_hexdump( FONT_SMALL, 200, 50, buf, len );
//bmp_hexdump( FONT_SMALL, 200, 50, buf, len );
return prop_cleanup( token, property );
}
......@@ -553,6 +553,7 @@ PROP_HANDLER( PROP_LV_FOCUS )
{
const struct prop_focus * const focus = (void*) buf;
const int16_t step = (focus->step_hi << 8) | focus->step_lo;
if (0)
bmp_printf( FONT_SMALL, 200, 30,
"FOCUS: %08x active=%02x dir=%+5d (%04x) mode=%02x",
*(unsigned*)buf,
......
......@@ -85,9 +85,10 @@ NSTUB( 0xFF056E38, prop_request_change )
NSTUB( 0xFF057418, prop_deliver ) // maybe?
NSTUB( 0xFF1C924C, dispcheck )
NSTUB( 0x2E5BC, bmp_vram_info )
NSTUB( 0x2E5B0, bmp_vram_info )
NSTUB( 0x8194C, vram_info )
NSTUB( 0xFF28A6F8, vram_get_number )
NSTUB( 0xFF1C7EA8, vram_get_pos_and_size )
NSTUB( 0xFF018270, malloc )
NSTUB( 0xFF0182cc, free )
......
......@@ -29,8 +29,10 @@
/** VRAM accessors */
extern uint32_t
/** VRAM accessors.
* \returns -1 if the vram is not enabled.
*/
extern int
vram_get_number(
uint32_t number
);
......@@ -57,7 +59,7 @@ struct vram_object
{
const char * name; // "Vram Instance" 0xFFCA79E5
uint32_t off_0x04;
uint32_t off_0x08;
uint32_t initialized; // off_0x08;
uint32_t off_0x0c;
uint32_t off_0x10;
struct semaphore * sem; // off 0x14;
......
......@@ -46,7 +46,7 @@ static volatile unsigned sensor_cleaning = 1;
CONFIG_INT( "zebra.draw", zebra_draw, 1 );
CONFIG_INT( "zebra.level", zebra_level, 0xF000 );
CONFIG_INT( "crop.draw", crop_draw, 1 );
CONFIG_STR( "crop.file", crop_file, "A:/cropmarks.bmp" );
CONFIG_STR( "crop.file", crop_file, "B:/cropmarks.bmp" );
CONFIG_INT( "edge.draw", edge_draw, 0 );
CONFIG_INT( "enable-liveview", enable_liveview, 1 );
CONFIG_INT( "hist.draw", hist_draw, 1 );
......@@ -409,6 +409,23 @@ draw_zebra( void )
if( !bvram )
return;
static struct vram_info _vram_info;
vram_get_pos_and_size(
&_vram_info.width,
&_vram_info.height,
&_vram_info.pitch,
&_vram_info.vram
);
bmp_printf(FONT_SMALL, 300, 300, "bmp=%08x vram=%08x %d %d %d",
bvram,
_vram_info.vram,
_vram_info.width,
_vram_info.pitch,
_vram_info.height
);
return;
// If we are not drawing edges, or zebras or crops, nothing to do
if( !edge_draw && !zebra_draw && !hist_draw && !waveform_draw )
{
......@@ -418,9 +435,10 @@ draw_zebra( void )
return;
}
struct vram_info * vram = &vram_info[ vram_get_number(2) ];
//struct vram_info * vram = &vram_info[ vram_get_number(2) ];
struct vram_info * vram = &_vram_info;
hist_build();
//hist_build();
// skip the audio meter at the top and the bar at the bottom
// hardcoded; should use a constant based on the type of display
......@@ -686,7 +704,15 @@ zebra_task( void )
);
}
while(1)
{
draw_zebra();
msleep(1000);
}
#ifndef CONFIG_550D
#error "liveview!"
if( enable_liveview )
{
/*
......@@ -702,8 +728,7 @@ zebra_task( void )
}
#endif
menu_add( "Video", zebra_menus, COUNT(zebra_menus) );
//menu_add( "Video", zebra_menus, COUNT(zebra_menus) );
while(1)
{
......@@ -720,4 +745,4 @@ zebra_task( void )
}
TASK_CREATE( "zebra_task", zebra_task, 0, 0x1f, 0x1000 );
TASK_CREATE( "zebra_task", zebra_task, 0, 0x18, 0x1000 );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment