IXUS145/ELPH135 Porting attempt - page 2 - DryOS Development - CHDK Forum

IXUS145/ELPH135 Porting attempt

  • 126 Replies
  • 47828 Views
*

Offline akira

  • *
  • 19
Re: IXUS145/ELPH135 Porting attempt
« Reply #10 on: 28 / December / 2014, 07:19:19 »
Advertisements
Hi all,

A little progress here, the boot is completing (need more work later), now working in core_spytask:
- camera is starting in playback mode, display showing last shoot image, pressing the shot button it goes to shoot mode;
- gui_init doesn't crash, but don't show the logo. Frame buffer address ?
- play_sound in gui_init, seems to not  playing any sound, even with PT_PlaySound address found by finsig;
- mkdir("A/CHDK") and the following mkdir is crashing, MakeDirectory_Fut was not found by finsig, I tried manually, no sucess, so I commented the calls to address later;
- shooting_init doesn't crash, but I think it's not working as the camera still in playback mode;

Now I will concentrate effort in making LCD to work.

Any suggestions ?


Regards
« Last Edit: 28 / December / 2014, 07:53:40 by akira »

*

Offline srsa_4c

  • ******
  • 3936
Re: IXUS145/ELPH135 Porting attempt
« Reply #11 on: 28 / December / 2014, 07:56:20 »
- camera is starting in playback mode, display showing last shoot image, pressing the shot button it goes to shoot mode;
This will have to be dealt with later, PSM doesn't need direct shooting mode so that code may not do that part of initialization.
Quote
- gui_init doesn't crash, but don't show the logo. Frame buffer address ?
You have copied (and uncommented) the framebuffer related lines from stubs_entry.S, I suppose?
If you have this in one of your lib.c files:
Code: [Select]
extern int active_bitmap_buffer;
extern char* bitmap_buffer[];
void *vid_get_bitmap_active_buffer()
{
    return bitmap_buffer[active_bitmap_buffer];
}
copied from a different port, it probably won't work because active_bitmap_buffer and bitmap_buffer is not currently found automatically for new models. (edit) Use vid_get_bitmap_fb() found by the sigfinder and remove DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY from platform_camera.h . Disable the CHDK custom palette too (CAM_LOAD_CUSTOM_COLORS).

The keyboard buttons found by the sigfinder look bogus, some of them may not be correct.
Quote
- mkdir("A/CHDK") and the following mkdir is crashing, MakeDirectory_Fut was not found by finsig
That function may no longer be present in newer cameras, mkdir is used to substitute it in stubs_entry_2.S - see the other DryOS r52 ports (a1400, ixus140_elph130, sx510, etc.).

You may want to share your source somewhere (like @ assembla.com), so we don't have to guess.

edit:
corrections
« Last Edit: 28 / December / 2014, 08:05:27 by srsa_4c »

*

Offline akira

  • *
  • 19
Re: IXUS145/ELPH135 Porting attempt
« Reply #12 on: 28 / December / 2014, 17:00:19 »
Hi,

I don't think my code is good enough to share yet, but ok, I will upload to assembla soon.
By the way, the sound is working, it's the default config that is not set.
The logo on PSM code works, but it's a different aproach, without refresh.

Regards

*

Offline srsa_4c

  • ******
  • 3936
Re: IXUS145/ELPH135 Porting attempt
« Reply #13 on: 28 / December / 2014, 17:08:53 »
I don't think my code is good enough to share yet
Don't worry about that, ports always start with messy source code. And you can remove the development repository later.


*

Offline akira

  • *
  • 19
Re: IXUS145/ELPH135 Porting attempt
« Reply #14 on: 29 / December / 2014, 11:19:57 »
Hi,

Adjusted the: vid_get_bitmap_fb() and vid_get_viewport_fb(), now the splash shows up, but no color, maybe wrong palette.
Pushing the trigger, some OSD is showed in shot mode, but garbled. Battery status and timestamp correct. Screen parameters  ?

I uploaded the code to:
https://www.assembla.com/code/ixus145/subversion/nodes/1/CHDK
https://subversion.assembla.com/svn/ixus145/CHDK/

Regards

Re: IXUS145/ELPH135 Porting attempt
« Reply #15 on: 29 / December / 2014, 11:36:08 »
Were you able to get the firmware version display with the standard method? I tried (creating ver.req and vers.req in the top level directory, power up using play key, holding func.set and pressing disp.) but couldn't get any key combination to show anything.

*

Offline akira

  • *
  • 19
Re: IXUS145/ELPH135 Porting attempt
« Reply #16 on: 29 / December / 2014, 13:12:00 »
Were you able to get the firmware version display with the standard method? I tried (creating ver.req and vers.req in the top level directory, power up using play key, holding func.set and pressing disp.) but couldn't get any key combination to show anything.

I didn't try.

*

Offline srsa_4c

  • ******
  • 3936
Re: IXUS145/ELPH135 Porting attempt
« Reply #17 on: 29 / December / 2014, 16:03:28 »
now the splash shows up, but no color, maybe wrong palette.
That's to be expected. Once you have keyboard, you can load the palette viewer to inspect the palette. Talking about palette: please comment out
#define CAM_LOAD_CUSTOM_COLORS
in platform_camera.h (you probably don't have the appropriate addresses of the fw variables involved, CHDK will try to overwrite some memory it should not). I'd recommend finding the right addresses for the stubs_min.S variables, as some of those are written by CHDK at runtime. "Finding" means: you locate the variable in the reference firmware disassembly and based on that you find the ixus145 equivalent (look for surrounding code patterns, called functions, callers, assert strings and line numbers, regular strings). There are lots of named functions in the funcs_by_*.csv files you can use to make the disassembly more comfortable.

Quote
Pushing the trigger, some OSD is showed in shot mode, but garbled.
Can you take a screenshot?

Next (after fixing stubs_min) could be the keyboard:
find this block in core/gui_osd.c and uncomment it:
Code: [Select]
        /*
        // debug keymap, KEYS_MASKx, SD_READONLY_FLAG, USB_MASK
Since you still won't have usable keyboard, replace
Code: [Select]
if (conf.debug_misc_vals_show) {with
Code: [Select]
if (1) {some lines above. Since PSM doesn't need keyboard, you have to find all buttons. You can start with what you find in stubs_entry.S, but it will likely not be all correct. Bits belonging to most buttons (except KEY_POWER) go to KEYS_MASK's in kbd.c .
If something is not clear, please ask.

Which CHDK revision are you using? I'd recommend the current "stable" 1.3 branch.

@polymath69
You can try some of these instead (you'll need an untouched JPEG from your camera):
ACID
http://chdk.wikia.com/wiki/CameraVersion
exiftool (look for "Firmware Revision" in its output)
You can also dump the camera's firmware and look for the "GM1." string inside.


*

Offline akira

  • *
  • 19
Re: IXUS145/ELPH135 Porting attempt
« Reply #18 on: 30 / December / 2014, 06:23:25 »
Hi,

I commented the CAM_LOAD_CUSTOM_COLORS, but did'nt make difference, I will search the addresses.

Display image attached, I mean "garbled", but misused the word, more correct is shifted.

I'm using the 1.2 trunk, I thought the 1.3 was not stable yet, I will merge later.


Regards

*

Offline srsa_4c

  • ******
  • 3936
Re: IXUS145/ELPH135 Porting attempt
« Reply #19 on: 30 / December / 2014, 11:20:44 »
I commented the CAM_LOAD_CUSTOM_COLORS, but did'nt make difference
At least those routines won't have the chance to cause problems until the needed variables are found.
Quote
I will search the addresses
Let us know if you need help with that.
Quote
Display image attached, I mean "garbled", but misused the word, more correct is shifted.
The display is OK. The clock is only partially shown by default (don't know why).

 

Related Topics