ixus175_elph180_100c porting attempt - page 3 - DryOS Development - CHDK Forum supplierdeeply

ixus175_elph180_100c porting attempt

  • 201 Replies
  • 107795 Views
Re: ixus175_elph180_100c porting attempt
« Reply #20 on: 17 / March / 2017, 10:44:40 »
Advertisements
@blackhole You remind me to updated stubs_min.S.  lot of time to compare many firmware.
@waterwingz Helpful trick guided to gui_redraw() problem.
@srsa_4c I'm dumped 128 MB RAM but how to interpret.  :D

Following some values in stub_min.S that i'm not able to replace.
Code: [Select]
DEF(video_target_framesize, 0xBDB4)
DEF(video_target_framesize2, 0xBDB0)


and these value in platform_kbd.h.  How to find it.
Code: [Select]
#define KEYS_MASK0 0x0000 //Logic OR of group 0 Keymap values
#define KEYS_MASK1 0x0000 //Logic OR of group 1 Keymap values
#define KEYS_MASK2 0x101 //Logic OR of group 2 Keymap values

in lib.c, this line not sure.
Code: [Select]
int get_flash_params_count(void) { return 0xf1; }   
Now, press Play button IXUS175 boot and preview image and show CHDK a while. Press Play button again it's OFF. Try to press shoot half, len extrude go to shooting mode then press Play button it's show <ALT> mode and CHDK menu but not respond with key press except MENU button it's show Canon menu.

stub_entry.S suggest mode for shooting.c but i'm not sure how to pair value with mode name in CapturemodeMap modemap[].

Thank you.
https://drive.google.com/open?id=0B4ujGHeVgSW0cGdQbGpTd1VUbTA

*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: ixus175_elph180_100c porting attempt
« Reply #21 on: 17 / March / 2017, 12:38:55 »
Quote
@blackhole You remind me to updated stubs_min.S.  lot of time to compare many firmware.
Look at stubs_min.S of ixus150 or sx410, there is all explained.
Quote
Following some values in stub_min.S that i'm not able to replace.
Code: [Select]
DEF(video_target_framesize, 0xBDB4)
DEF(video_target_framesize2, 0xBDB0)
Comment out this for now,at this point you do not need this.
Remove and movie_rec from the /././sub/100c/Makefile
Quote
and these value in platform_kbd.h.  How to find it.
Code: [Select]
#define KEYS_MASK0 0x0000 //Logic OR of group 0 Keymap values
#define KEYS_MASK1 0x0000 //Logic OR of group 1 Keymap values
#define KEYS_MASK2 0x101 //Logic OR of group 2 Keymap values
This is the sum of all values of the same physw_status [] from the the keymap (kbd.c).
In your case
Code: [Select]
//static KeyMap keymap[] = {
//    { 0, KEY_VIDEO           ,0x00000002 }, // Found @0xffbe399c, levent 0x02
//    { 0, KEY_POWER           ,0x00000020 }, // Found @0xffbe39a4, levent 0x100
//    { 0, KEY_PLAYBACK        ,0x00000040 }, // Found @0xffbe39ac, levent 0x101
//    { 0, KEY_SET             ,0x00000100 }, // Found @0xffbe39b4, levent 0x0a
//    { 0, KEY_UP              ,0x00000200 }, // Found @0xffbe39bc, levent 0x06
//    { 0, KEY_RIGHT           ,0x00000400 }, // Found @0xffbe39c4, levent 0x09
//    { 0, KEY_DOWN            ,0x00000800 }, // Found @0xffbe39cc, levent 0x07
//    { 0, KEY_LEFT            ,0x00001000 }, // Found @0xffbe39d4, levent 0x08
//    { 0, KEY_HELP            ,0x00004000 }, // Found @0xffbe39e4, levent 0x0d
#define KEYS_MASK0 0x00005F42 //Logic OR of group 0 Keymap values
KEY_POWER is not included,comment out this in kbd.c

Code: [Select]
//    { 2, KEY_SHOOT_FULL      ,0x00000003 }, // Found @0xffbe39fc, levent 0x01
//    { 2, KEY_SHOOT_FULL_ONLY ,0x00000002 }, // Found @0xffbe39fc, levent 0x01
//    { 2, KEY_SHOOT_HALF      ,0x00000001 }, // Found @0xffbe39f4, levent 0x00
//    { 2, KEY_ZOOM_OUT        ,0x00000010 }, // Found @0xffbe3a04, levent 0x04
//    { 2, KEY_ZOOM_IN         ,0x00000020 }, // Found @0xffbe3a0c, levent 0x03
#define KEYS_MASK2 0x00000036 //Logic OR of group 2 Keymap values

Quote
Now, press Play button IXUS175 boot and preview image and show CHDK a while. Press Play button again it's OFF.
Try this in codegen.txt
Code: [Select]
*(int*)(0x2BD4 + 4) = (*(int*)0xC022F484)&0x20000 ? 0x400000 : 0x200000;
Quote
stub_entry.S suggest mode for shooting.c but i'm not sure how to pair value with mode name in CapturemodeMap modemap[].
Follow instructions here: http://chdk.wikia.com/wiki/Adding_support_for_a_new_camera  section modemap[]
« Last Edit: 17 / March / 2017, 13:07:19 by blackhole »

Re: ixus175_elph180_100c porting attempt
« Reply #22 on: 18 / March / 2017, 23:50:28 »
Apply all recommendation, GUI looking normal. Insert manually this
Code: [Select]
{ 0, KEY_MENU            ,0x00008000 }, to enable MENU button which not found in stubs_entry.S. Use OSD debug to verify modemap
Code: [Select]
const CapturemodeMap modemap[] = { //verify by OSD Debug
    { MODE_P,                   32773 }, //
    { MODE_AUTO,                32768 }, //
    { MODE_PORTRAIT,            32790 }, //
    { MODE_LONG_SHUTTER,        32775 }, //
    { MODE_LOWLIGHT,            32813 }, //
    { MODE_FACE_SELF_TIMER,     33332 }, //
    { MODE_FISHEYE,             33335 }, //
    { MODE_TOY_CAMERA,          33339 }, //
    { MODE_MONOCHROME,          33343 }, //
    { MODE_SUPER_VIVID,         33330 }, //
{ MODE_POSTER_EFFECT,       33331 }, //
    { MODE_MINIATURE,           33336 }, //
{ MODE_DIGITAL_IS,          33347 }, //
{ MODE_FIREWORK,            32800 }, //
} ;
but setmode.lua result all fail. Also, very simple shoot.lua not work.
physw_status[3] in normal mode show
Code: [Select]
0x4400033 //shutter button not press
0x4400032 //shoot half
0x4400030 //shoot full
in ALT mode show
Code: [Select]
0x4400037 //shutter button not press
0x4400036 //shoot half
0x4400036 //shoot full script start but not take picture
aperture_sizes_table, shutter_speeds_table and iso_table not update yet. :blink:
« Last Edit: 19 / March / 2017, 22:36:49 by tsamma »

*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: ixus175_elph180_100c porting attempt
« Reply #23 on: 19 / March / 2017, 03:19:00 »
As I see on the internet your camera does not have HELP button, instead HELP button you have the ERASE button.
Correct this in the keymap.
Check does your camera has more speeds during zooming.
Check once again by hand all keys, suggestions from stubs_entry.S may be wrong.
Do not forget to update your platform_kbd.h file when you add a new button in the keymap.
Quote
but setmode.lau result all fail. Also, very simple shoot.lau not work.
The cause may be a problem in kbd.c
The same problem I had on the sx410, before I solved the problem with a keymap.
If you have no luck, the problem may be more difficult, but in this case I can not help you,in that case you will need the help of a guru in the forum. :)
https://chdk.setepontos.com/index.php?topic=12794.0
After compilation, what do you see in the regenerated stubs_entry.S, related to modemap?


*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: ixus175_elph180_100c porting attempt
« Reply #24 on: 19 / March / 2017, 03:57:43 »
Your camera uses the same keymap as ixus170, there was confirmed that the scripts work well.
https://chdk.setepontos.com/index.php?topic=12471.msg131041#msg131041
Put this in platform_kbd.h
Code: [Select]
#define KEYS_MASK0 0xDF42 //Logic OR of group 0 Keymap values
#define KEYS_MASK1 0x0000 //Logic OR of group 1 Keymap values
#define KEYS_MASK2 0x0033 //Logic OR of group 2 Keymap values
and this in kbd.c
Code: [Select]
// Keymap values for kbd.c. Additional keys may be present, only common values included here.
KeyMap keymap[] = {
    { 0, KEY_MENU            ,0x00008000 },
    { 0, KEY_ERASE            ,0x00004000 },
    { 0, KEY_LEFT            ,0x00001000 },
    { 0, KEY_DOWN            ,0x00000800 },
    { 0, KEY_RIGHT           ,0x00000400 },
    { 0, KEY_UP              ,0x00000200 },
    { 0, KEY_SET             ,0x00000100 },
    { 0, KEY_PLAYBACK        ,0x00000040 },
    { 0, KEY_VIDEO           ,0x00000002 },
    { 2, KEY_ZOOM_IN         ,0x00000020 },
    { 2, KEY_ZOOM_OUT        ,0x00000010 },
    { 2, KEY_SHOOT_FULL      ,0x00000003 },
    { 2, KEY_SHOOT_FULL_ONLY ,0x00000002 },
    { 2, KEY_SHOOT_HALF      ,0x00000001 },
    { 0, 0, 0 }
};

*

Offline srsa_4c

  • ******
  • 4451
Re: ixus175_elph180_100c porting attempt
« Reply #25 on: 19 / March / 2017, 06:49:39 »
but setmode.lau result all fail. Also, very simple shoot.lau not work.
I would expect this camera to have a propset newer than 6 . You can try 8 or 7 by modifying the CAM_PROPSET define in platform_camera.h . Propsets 9 and 10 are used by the 2 EOS M models (M3 and M10), these are less likely to be used on a point&shoot model - but you can try those too if 8 or 7 doesn't match.

To verify whether a propset is appropriate for your camera, you can use the built-in CHDK tools:
  • One is the propset display that shows 10 propcases at once.
    Miscellaneous stiff -> Debug parameters -> Debug data display [Props]
    Page can be specified by
    Miscellaneous stiff -> Debug parameters -> Propcase/Paramsdata page

    Or, if you have a button assigned as RAW shortcut, set
    ALT +/- debug action
    to "Page" and use single or double clicks on that button in ALT mode while the propcase display is active.
    This button is the video button on your cam, because of this setting:
Code: [Select]
#define SHORTCUT_TOGGLE_RAW             KEY_VIDEO
  • Other tool is the propcase compare facility. To use this, set ALT +/- debug action to CmpProp. When this is set, pressing the video button in ALT mode will compare the propcases to their previous value. Note that you'll have to stare the screen for minutes (this tool has a terrible user interface) if too many propcases changed between button presses.

    Choose low and high propcases for verification and also some between the two. Some propcases have easily recognizable values, some do not.

I'm sure there are scripts that can be used for easier propcase research, if anyone knows one, please post links here.

edit:
One such script is linked on the above wikia page: http://chdk.wikia.com/wiki/PropertyCaseDump
« Last Edit: 19 / March / 2017, 06:56:52 by srsa_4c »

*

Offline reyalp

  • ******
  • 14118
Re: ixus175_elph180_100c porting attempt
« Reply #26 on: 19 / March / 2017, 15:42:12 »
I'm sure there are scripts that can be used for easier propcase research, if anyone knows one, please post links here.
If chdkptp is available, the devutil propcase commands let you compare quickly without having to download files or look at the tiny screen https://chdk.setepontos.com/index.php?topic=12759.msg129296#msg129296
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: ixus175_elph180_100c porting attempt
« Reply #27 on: 19 / March / 2017, 19:49:25 »
Almost forgot one more thing that can make shoot() fail. The keyboard task will likely need additional attention in order to make some button emulations (most probably, the shutter) work. See the kbd_p1_f_cont_my() replacement in the M10 port. Only do this if the shoot and half_shoot buttons don't react when emulated in scripts.


Re: ixus175_elph180_100c porting attempt
« Reply #28 on: 20 / March / 2017, 10:16:34 »
@blackhole My stubs_entry.S relate to modemap is
Code: [Select]
// Check of modemap from 'platform/CAMERA/shooting.c':
// Firmware modemap table found @ffaed6b0 -> ffce5408
// No problems found with modemap table.

@srsa_4c Manually propset with build in PropCmp but most of it unable identify.

I can't zoom in/out in ALT mode by zoom in/out botton. Another working well.
Try CHDK-PTP but no respond at all, just download image and some cmd.
Many thing to do!!!  ;)
Thank you.

mypropset: https://drive.google.com/open?id=0B4ujGHeVgSW0R0MxcjdQREtwdlE
« Last Edit: 21 / March / 2017, 12:38:07 by tsamma »

*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: ixus175_elph180_100c porting attempt
« Reply #29 on: 20 / March / 2017, 12:33:55 »
Quote
mypropset: https://drive.google.com/open?id=0B4ujGHeVgSW0R0MxcjdQREtwdlE
Looks like propset10, with a few differences.
Your propset:
Code: [Select]
#define PROPCASE_DIGITAL_ZOOM_MODE               102
#define PROPCASE_FLASH_ADJUST_MODE               115
#define PROPCASE_FLASH_FIRE                      135
#define PROPCASE_FLASH_EXP_COMP                  218


propset10
Code: [Select]
#define PROPCASE_DIGITAL_ZOOM_MODE               99         // [m10:untested] Digital Zoom Mode/State 0 = off, 1=standard, 2 = 1.5x, 3 = 2.0x
#define PROPCASE_EV_CORRECTION_1                 115
#define PROPCASE_FLASH_EXP_COMP                  135        // APEX96 units
#define PROPCASE_EV_CORRECTION_2                 218        // g7x ok, ps6 +6
I would first try to check PROPCASE_EV_CORRECTION_1 and PROPCASE_EV_CORRECTION_2.
I'm not sure that this is done for propset10.
If scripts are now working,set #define CAM_PROPSET 10 in platform_camera.h and try script setmode.lua, if you have not tried it.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal