Changeset 365 for branches/msl


Ignore:
Timestamp:
08/13/10 10:13:01 (4 years ago)
Author:
msl
Message:

PTP-Interface

  • Support für IXUS100 1.00c hinzugefügt, Danke CHDKLover.
  • Funktion Windows-Programm chdkcam ist ungeprüft, Linux ist ok.
Location:
branches/msl
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/msl/include/camera.h

    r361 r365  
    18221822    // camera name 
    18231823    #define PARAM_CAMERA_NAME           4           // parameter number for GetParameterData sd990: OK 
     1824     
     1825    #define CAM_CHDK_PTP                1 
    18241826 
    18251827//---------------------------------------------------------- 
  • branches/msl/platform/ixus100_sd780/lib.c

    r278 r365  
    6464} 
    6565 
    66  
     66void switch_mode(int mode) { //sollte immer so sein 
     67    if ( mode == 0 ) { 
     68        _Rec2PB(); 
     69        _set_control_event(0x80000902); // 0x10A5 ConnectUSBCable 
     70    } else if ( mode == 1 ) { 
     71        _set_control_event(0x902); // 0x10A6 DisconnectUSBCable 
     72        _PB2Rec(); 
     73   } 
     74} 
  • branches/msl/platform/ixus100_sd780/sub/100c/boot.c

    r278 r365  
    596596//VERIFY_SD780 - What does this do for us? 
    597597void CreateTask_spytask() { 
    598         _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0); 
     598    _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0); 
     599    _CreateTask("InitCHDKPTP", 0x19, 0x2000, init_chdk_ptp, 0); 
    599600} 
    600601 
  • branches/msl/platform/ixus100_sd780/sub/100c/lib.c

    r278 r365  
    6363void *vid_get_viewport_fb_d() 
    6464{ 
    65     return (void*)(*(int*)(0x26F4 + 0x58)); 
     65    //return (void*)(*(int*)(0x26F4 + 0x58)); 
     66    int x=*(int*)(0x26F4 + 0x58); 
     67    // if we start camera in PB mode with movie on display, this pointer will be NULL 
     68    return (void*) (x ? x : 0xFFC00000) ; 
    6669} 
    67  
    6870 
    6971//SD780 - 720px real screen width 
     
    105107//VERIFY_SD780 
    106108long vid_get_bitmap_buffer_height() { return 270; } 
     109 
     110long vid_get_image_buffer_width_for_ptp()  
     111{  
     112    return 720;  
     113}  
     114 
     115//PTP 
     116long vid_get_image_width_for_ptp() 
     117{ 
     118    return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:*(int*)0x43BC; // VRAM DataSize --> FF8B1574 960? 
     119}  
     120   
     121   
     122long vid_get_image_height_for_ptp() 
     123{ 
     124    return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:*(int*)(0x43BC+4); // VRAM DataSize 270? 
     125} 
     126 
     127void *vid_get_bitmap_fb_for_ptp() 
     128{ 
     129    return (void*)(*(int*)(0x8378+0x14)); 
     130} 
     131 
     132long vid_get_bitmap_buffer_width_for_ptp(){ return vid_get_bitmap_buffer_width();} 
     133long vid_get_bitmap_width_for_ptp() {return vid_get_bitmap_buffer_width();} 
     134long vid_get_bitmap_height_for_ptp() {return vid_get_bitmap_buffer_height();} 
     135 
     136unsigned int *vid_get_palette() 
     137{ 
     138    static unsigned pal[16]; 
     139    unsigned int*syspal= (unsigned int*)(0x4CB8+0x28); 
     140    int i; 
     141    for (i=0;i<16; i++) {  // big-endian to little-endian 
     142    pal[i] = (syspal[i]>>24) | 
     143             ((syspal[i]<<8) & 0x00FF0000) | 
     144             ((syspal[i]>>8) & 0x0000FF00) |  
     145             (syspal[i]<<24); 
     146    } 
     147    return pal; 
     148} 
  • branches/msl/platform/ixus100_sd780/sub/100c/stubs_entry_2.S

    r322 r365  
    6262NHSTUB(SetScriptMode, 0xDEADC0DE) 
    6363 
    64  
     64//PTP 
     65NHSTUB(add_ptp_handler, 0xFF9EABDC)  
     66NHSTUB(set_control_event, 0xFF873E74) // nicht sicher 
     67NHSTUB(PB2Rec, 0xFF8772BC) // via aAcPb2rec  
     68NHSTUB(Rec2PB, 0xFF8772FC) // via aAcRec2pb 
Note: See TracChangeset for help on using the changeset viewer.