Read about our upcoming Code of Conduct on this issue

Commit d65f319d authored by hudson@kremvax.wan's avatar hudson@kremvax.wan
Browse files

Functional beta for 2.0.4

parent 94db59c0db73
......@@ -32,7 +32,7 @@
#include "version.h"
/** If CONFIG_EARLY_PORT is defined, only a few things will be enabled */
#define CONFIG_EARLY_PORT
#undef CONFIG_EARLY_PORT
/** These are called when new tasks are created */
void my_task_dispatch_hook( struct context ** );
......@@ -250,6 +250,10 @@ call_init_funcs( void * priv )
#endif // !CONFIG_EARLY_PORT
static void nop( void ) { }
void menu_init( void ) __attribute__((weak,alias("nop")));
void debug_init( void ) __attribute__((weak,alias("nop")));
/** Initial task setup.
*
......
......@@ -152,25 +152,24 @@ ML_OBJS-y = \
stubs-5d2.204.o \
version.o \
stdio.o \
menu.o \
config.o \
debug.o \
menu.o \
bmp.o \
font-huge.o \
font-large.o \
font-med.o \
font-small.o \
gui.o \
audio.o \
lens.o \
focus.o \
zebra.o \
lens.o \
spotmeter.o \
audio.o \
zebra.o \
hotplug.o \
config.o \
bootflags.o \
ptp.o \
bmp.o \
bracket.o \
font-huge.o \
font-large.o \
font-med.o \
font-small.o \
ML_OBJS-$(CONFIG_PYMITE) += \
script.o \
......
......@@ -786,6 +786,7 @@ my_sounddev_task( void )
TASK_OVERRIDE( sounddev_task, my_sounddev_task );
#if 0
/** Replace the audio level task with our own.
*
* This task runs when the sound device is activated to keep track of
......@@ -884,3 +885,4 @@ my_audio_level_task( void )
TASK_OVERRIDE( audio_level_task, my_audio_level_task );
#endif
......@@ -96,7 +96,7 @@ bmp_puts(
{
const uint32_t pitch = bmp_pitch();
uint8_t * vram = bmp_vram();
if( !vram )
if( !vram || ((uintptr_t)vram & 1) == 1 )
return;
const unsigned initial_x = *x;
uint8_t * first_row = vram + (*y) * pitch + (*x);
......
......@@ -32,16 +32,6 @@ is_space( char c )
return c == ' ' || c == '\t' || c == '\r' || c == '\n';
}
// Don't use strcmp since we don't have it
int
streq( const char * a, const char * b )
{
while( *a && *b )
if( *a++ != *b++ )
return 0;
return *a == *b;
}
struct config *
config_parse_line(
const char * line
......
......@@ -10,6 +10,7 @@
#include "config.h"
//#include "lua.h"
#if 0
void
display_full_hd(
void * priv,
......@@ -94,6 +95,8 @@ void enable_full_hd( void * priv )
lv_output_device( &full_hd );
#endif
}
#endif
void call_dispcheck( void * priv )
{
......@@ -186,6 +189,7 @@ mvr_time_const_display(
);
}
#if 0
static void
mvr_time_const_select( void * priv )
{
......@@ -214,7 +218,7 @@ mvr_time_const_select( void * priv )
*(unsigned *)( mvr_hdr + 0x64 ) = 100;
*(unsigned *)( mvr_hdr + 0x68 ) = 24;
}
#endif
CONFIG_INT( "debug.draw-prop", draw_prop, 0 );
......
......@@ -25,7 +25,7 @@
#include "dryos.h"
extern struct semaphore * gui_sem;
struct semaphore * gui_sem;
struct gui_main_struct {
void * obj; // off_0x00;
......
# Zebra levels
zebra.level = 61440
zebra.draw = 0
zebra.draw = 1
# Edge detection (too slow for real use)
edge.draw = 0
......
......@@ -33,7 +33,7 @@
static struct semaphore * menu_sem;
struct semaphore * gui_sem;
extern struct semaphore * gui_sem;
static int menu_damage;
static int menu_hidden;
static int menu_timeout;
......@@ -520,11 +520,13 @@ menu_handler(
menu_entry_select( menu );
break;
#if 0
case PRESS_ZOOM_IN_BUTTON:
gui_hide_menu( 100 );
lens_focus_start( 0 );
break;
#if 0
// This breaks playback if enabled; figure out why!
case PRESS_ZOOM_OUT_BUTTON:
......@@ -538,6 +540,7 @@ menu_handler(
gui_hide_menu( 2 );
lens_focus_stop();
break;
#endif
case 1:
// Synthetic redraw event
......@@ -653,6 +656,7 @@ static void
menu_task( void )
{
int x, y;
DebugMsg( DM_MAGIC, 3, "%s: Starting up\n", __func__ );
// Add the draw_prop menu
menu_add( "Debug", draw_prop_menus, COUNT(draw_prop_menus) );
......
......@@ -9,7 +9,7 @@
*/
#include "dryos.h"
#include <errno.h>
//#include <errno.h>
int
fprintf(
......@@ -59,7 +59,8 @@ ISSPACE( char c )
//int __errno;
#define SET_ERRNO(x) __errno = (x)
//#define SET_ERRNO(x) __errno = (x)
#define SET_ERRNO(x) /* NOP */
static unsigned long
......@@ -130,7 +131,7 @@ strto_l(
|| ((number == cutoff) && (digit > cutoff_digit))) {
number = ULONG_MAX;
negative &= sflag;
SET_ERRNO(ERANGE);
//SET_ERRNO(ERANGE);
} else {
number = number * base + digit;
}
......@@ -199,3 +200,13 @@ strtoul(
}
// Don't use strcmp since we don't have it
int
streq( const char * a, const char * b )
{
while( *a && *b )
if( *a++ != *b++ )
return 0;
return *a == *b;
}
/** \file
* Entry points into the firmware image.
*
* These are the functions that we can call from our tasks
* in the Canon 1.1.0 firmware.
*
* \todo Sort this file?
*/
/*
* 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.,
* 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
.text
#define NSTUB(addr,name) \
.global name; \
name = addr
NSTUB( ROMBASEADDR, firmware_entry )
/** These must be found first for any progress to be made */
NSTUB( 0xFF810894, cstart )
NSTUB( 0xFFC456C0, bzero32 ) // called by cstart()
NSTUB( 0xFF811DBC, init_task ) // passed as arg to create_init_task, look for dmSetup
NSTUB( 0xFF817470, create_init_task )
/** Look for the normal printf strings */
NSTUB( 0xFF86AF48, DebugMsg )
/** Task dispatch hook hasn't moved in several versions */
NSTUB( 0x1934, task_dispatch_hook )
/** Find the additioanl version string in GUI_GetFirmVersion */
NSTUB( 0x13420, additional_version )
// Everything below here is not needed for the first boot
/** Camera interface? */
NSTUB( 0xC0220000, camera_engine )
/** Find the shell register commands */
NSTUB( 0xFF81C4DC, register_func )
/** Debugging commands are all registered by name. Search for the strings */
NSTUB( 0xFF86AEC8, dmstart )
NSTUB( 0xFF86B7DC, dumpf )
......@@ -68,7 +68,7 @@ NSTUB( 0xFF86B7DC, dumpf )
NSTUB( 0xFF9B7164, vsnprintf )
NSTUB( 0xFF86E210, msleep )
NSTUB( 0xFF9B955C, task_create )
NSTUB( 0xFF86E2C8, task_create )
NSTUB( 0xFF86AF08, dmstop )
NSTUB( 0xFF9AA9FC, FIO_Open)
NSTUB( 0xFF9AAAB0, FIO_CreateFile )
......@@ -102,7 +102,7 @@ NSTUB( 0xFF81DE08, hotplug_task )
NSTUB( 0x1AA4, hotplug_struct )
NSTUB( 0x1AD8, hotplug_usb_buf )
NSTUB( 0xFF864679, dispcheck )
NSTUB( 0x2762C, bmp_vram_info )
NSTUB( 0x27624, bmp_vram_info )
NSTUB( 0x38920, vram_info )
NSTUB( 0xFFA413FC, vram_get_number )
NSTUB( 0xFF8773A4, task_trampoline )
......
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