SD 4000 IS / IXUS 300 HS / IXY 30S porting thread - page 4 - DryOS Development - CHDK Forum supplierdeeply

SD 4000 IS / IXUS 300 HS / IXY 30S porting thread

  • 322 Replies
  • 163522 Views
*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SD 4000 IS / IXUS 300 HS / IXY 30S porting thread
« Reply #30 on: 28 / August / 2010, 03:01:06 »
Advertisements
for now I comment it and get pass it http://chdk.setepontos.com/index.php/topic,5045.msg54330.html#msg54330

about fastdir, I think that the function started at FFA95C90, and the you point at I have loc_FFA95CB8
« Last Edit: 28 / August / 2010, 03:06:44 by asm1989 »

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: SD 4000 IS / IXUS 300 HS / IXY 30S porting thread
« Reply #31 on: 28 / August / 2010, 17:59:03 »
about fastdir, I think that the function started at FFA95C90, and the you point at I have loc_FFA95CB8
Now i realised what you were trying to tell me...
Yes, you are right! openfastdir function entry is 0xFFA95C90. I was to sleepy...

BTW, the only thing i need to disable at core/main.c is histogram_process() (because some vid* address in lib.inc are not finished).

CreateTask_PhySw() is still disabled, as it completly disables all keys on camera (did not changed kbd.c yet).
« Last Edit: 28 / August / 2010, 18:06:12 by pixeldoc2000 »

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: SD 4000 IS / IXUS 300 HS / IXY 30S porting thread
« Reply #32 on: 29 / August / 2010, 08:47:08 »
Good News!

After fixing vid_get_bitmap_buffer_width() in lib.c, the CHDK Logo does now show correctly.

platform/ixus300_sd4000/sub/100d/lib.c
Code: [Select]
long vid_get_bitmap_buffer_width() { return 960; }

long vid_get_bitmap_buffer_height() { return 360; }

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SD 4000 IS / IXUS 300 HS / IXY 30S porting thread
« Reply #33 on: 29 / August / 2010, 10:34:12 »
Good news, does you logo stay or disappear after some time,

mine keeps in front yet.


*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: SD 4000 IS / IXUS 300 HS / IXY 30S porting thread
« Reply #34 on: 29 / August / 2010, 12:00:05 »
Good news, does you logo stay or disappear after some time.
The Logo does stay, but it's not centered. If i open Canon Menu, it disapear.

If tried to move gui_redraw() in core/main.c around, but this has no effect. Also enable gui_draw_debug_vals_osd() in core/gui.c (and other stuff there) has no effect. I guess there are still some issues with vid buffer.
« Last Edit: 29 / August / 2010, 12:06:44 by pixeldoc2000 »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SD 4000 IS / IXUS 300 HS / IXY 30S porting thread
« Reply #35 on: 29 / August / 2010, 14:31:05 »
yes looks like it has something to do with  vid_bitmap_refresh(); or with the three video buffer, dont know yet.

Look at this and find the number for your cammera
http://chdk.setepontos.com/index.php/topic,5045.msg54411.html#msg54411

EDIT: solved the refresh issue
« Last Edit: 29 / August / 2010, 16:15:16 by asm1989 »

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: SD 4000 IS / IXUS 300 HS / IXY 30S porting thread
« Reply #36 on: 01 / September / 2010, 09:46:05 »
Look at this and find the number for your cammera
http://chdk.setepontos.com/index.php/topic,5045.msg54411.html#msg54411
Thanx, now CHDK Logo / UI does work and refresh display!

lib.c
Code: (c) [Select]
void vid_bitmap_refresh() {
    extern int enabled_refresh_physical_screen;
    enabled_refresh_physical_screen=1;
    *(int*)0x926C=3;    // ROM:FFA114FC
    _RefreshPhysicalScreen(1);
}

stubs_min.S
Code: (c) [Select]
// ROM:FFA13398                 STMFD   SP!, {R4,LR}
// ROM:FFA1339C                 LDR     R4, =0x92AC  <---
// ROM:FFA133A0                 LDR     R0, [R4,#0x20] <---
// ROM:FFA133A4                 CMN     R0, #1
// ROM:FFA133A8                 LDREQ   R1, =0x5BC
// ROM:FFA133AC                 ADREQ   R0, aWindow_c   ; "Window.c"
DEF(enabled_refresh_physical_screen, 0x92CC)    // 0x92AC + 0x20 = 0x92CC

UI is still in Greyscale and the display ratio is not correct but gui_draw_debug_vals_osd() does work!

Now working on kbd.c...
« Last Edit: 01 / September / 2010, 11:57:17 by pixeldoc2000 »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SD 4000 IS / IXUS 300 HS / IXY 30S porting thread
« Reply #37 on: 01 / September / 2010, 10:00:31 »
Good news,
Mine dosnt work yet the gui_draw_debug_vals_osd(),

Have you updated your github with the latest changes?


*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: SD 4000 IS / IXUS 300 HS / IXY 30S porting thread
« Reply #38 on: 01 / September / 2010, 10:20:09 »
Mine dosnt work yet the gui_draw_debug_vals_osd(),
did you modified core/gui.c correctly and enabled OPT_DEBUGGING in buildconf.inc ? This is also mentioned at http://chdk.wikia.com/wiki/Adding_support_for_a_new_camera#Getting_the_main_CHDK_task_to_run .

core/gui.c
Code: (c) [Select]
...
void gui_draw_debug_vals_osd() {
#ifdef OPT_DEBUGGING
    //if (conf.debug_misc_vals_show) {           // <--------------- DISABLE
        //        long v=get_file_counter();
        // sprintf(osd_buf, "1:%03d-%04d  ", (v>>18)&0x3FF, (v>>4)&0x3FFF);
        // sprintf(osd_buf, "1:%d, %08X  ", xxxx, eeee);

       // <------------------- ENABLE HERE
        extern long physw_status[3];
        sprintf(osd_buf, "1:%8x  ", physw_status[0]);
        draw_txt_string(28, 10, osd_buf, conf.osd_color);

        sprintf(osd_buf, "2:%8x  ", physw_status[1]);
        draw_txt_string(28, 11, osd_buf, conf.osd_color);

        sprintf(osd_buf, "3:%8x  ", physw_status[2]);
        draw_txt_string(28, 12, osd_buf, conf.osd_color);
       // <------------------- TILL HERE

        //      sprintf(osd_buf, "4:%8x  ", vid_get_viewport_fb_d());

        /*
        sprintf(osd_buf, "u:%8x  ", get_usb_power(1));
        draw_txt_string(28,  9, osd_buf, conf.osd_color);

        sprintf(osd_buf, "1:%8x  ", (void*) (*(int*)conf.mem_view_addr_init));
        draw_txt_string(28, 10, osd_buf, conf.osd_color);

    extern volatile long focus_busy;
        sprintf(osd_buf, "f:%8x  ", focus_busy);
        draw_txt_string(28, 11, osd_buf, conf.osd_color);

    extern volatile long zoom_busy;
        sprintf(osd_buf, "z:%8x  ", zoom_busy);
        draw_txt_string(28, 12, osd_buf, conf.osd_color);

        // some cameras missing zoom_status
        #if 0
        sprintf(osd_buf, "t:%8x  ", zoom_status);
        draw_txt_string(28, 13, osd_buf, conf.osd_color);
        #endif
        */
    //}           // <--------------- DISABLE
    {
        static char sbuf[100];
        int r,i, p, len;
        if (conf.debug_display == DEBUG_DISPLAY_PROPS){

            for (i=0;i<10;i++){
                r = 0;
                p = conf.debug_propcase_page*10+i;
                get_property_case(p, &r, 4);
                sprintf(sbuf, "%3d: %d              ", p, r);
                sbuf[20]=0;
                draw_string(64,16+16*i,sbuf, conf.osd_color);
            }
        }

        if (conf.debug_display == DEBUG_DISPLAY_PARAMS){
            extern long* FlashParamsTable[];
            char s[30];
            int count;

            for (i=0;i<10;i++){
                r = 0;
                p = conf.debug_propcase_page*10+i;
                if (p>=get_flash_params_count()) {
                    sprintf(sbuf, "%3d: This parameter does not exists", p);
                } else  {
                    len=FlashParamsTable[p][1]>>16;
                    if ((len==1)||(len==2)||(len==4)){
                        get_parameter_data(p, &r, len);
                        sprintf(sbuf, "%3d: %30d :%2d ", p, r,len);
                    }
                    else {
                        if (len>=sizeof(s)) count=sizeof(s)-1; else count=len;
                        get_parameter_data(p, &s, count);
                        s[count]=0;
                        sprintf(sbuf, "%3d: %30s :%2d ", p, s,len);
                    }
                }
                draw_string(16,16+16*i,sbuf, conf.osd_color);
            }
        }
    }

    if(conf.debug_display == DEBUG_DISPLAY_TASKS) {
            gui_debug_draw_tasklist();
    }
#endif
}
//-------------------------------------------------------------------
//extern int xxxx, eeee;
//-------------------------------------------------------------------
void gui_draw_osd() {
    unsigned int m, /*n = 0,*/ mode_photo, mode_video;
    coord x;
#if CAM_SWIVEL_SCREEN
    static int flashlight = 0;
#endif
    static int pressed = 0;
    static int half_disp_press_old=0;
    int half_disp_press;
    int need_restore = 0;
    m = mode_get();

// uncomment if you want debug values always on top
    gui_draw_debug_vals_osd();    // <------------------- ENABLE
...


Have you updated your github with the latest changes?
Done.
« Last Edit: 01 / September / 2010, 10:25:15 by pixeldoc2000 »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SD 4000 IS / IXUS 300 HS / IXY 30S porting thread
« Reply #39 on: 01 / September / 2010, 12:12:15 »
Quote
did you modified core/gui.c correctly and enabled OPT_DEBUGGING in buildconf.inc ?
Yes I did,

As I'm using the sx200 as base for the port, and it is an "old" DRYOS version 2.3, release #0031, and sx210 is release #0043

I'm going to look for diferences with ports of at least "DRYOS version 2.3, release #0039",
Like the sx20 or the sd980

-> Finally get the debug display to work now for the keys
« Last Edit: 01 / September / 2010, 12:59:03 by asm1989 »

 

Related Topics