IXUS 1100 HS ELPH 510 Porting Thread - page 5 - DryOS Development - CHDK Forum supplierdeeply

IXUS 1100 HS ELPH 510 Porting Thread

  • 89 Replies
  • 38360 Views
Re: IXUS 1100 HS ELPH 510 Porting Thread
« Reply #40 on: 10 / February / 2014, 15:17:59 »
Advertisements
So I put some variables in via guesstimate or by putting in empty junk just to get it to compile and it compiles, but I don't dare boot it without knowing that this isn't going to do something nasty.  also, it built a file DISKBOOT.BIN do I just put that file in the root of the card and it boots?  do I need to modify the extend.m to know what to boot? I've never built a bootable card from scratch before, so I need pointers there. 

What I did to get the above working:

I added this to stubs_min.S in the sub 100b:

Code: [Select]
//To stop errors on compile for testing
DEF(focus_len_table,                    0xfff4a4c8) // stolen from ixus240
DEF(sub_FF2F34E8_my,                    0x00000678) // fake to build
DEF(cds_gain_value,                     0x0000abd0) //stolen from ixus240 test
DEF(sub_FF2F2F3C_my,                    0x000003d3) //again faked to build

I don't know if those values can hurt anything (the sub ones I just put something random in there, because I couldn't find any reference anywhere else).  the focus_len_table and cts_gain_value I found in ixus240 and nafraf had used those before. 

I also put:

Code: [Select]
long kbd_use_zoom_as_mf() {
                return 0;
}

in kbd.c as that was done somewhere else as well, so we have a noop function to return 'success' for doing nothing. 

and finally I put:

Code: [Select]
# dummy to get it compiling
NHSTUB(SetCDSGain,                              0x12345678)
NHSTUB(GetCdsGainValue,                         0x12345678)

in stubs_entry_2.S

to get those some generic value (Read this on a wiki page on how to get compilation working, they can be fixed later when you know what to put there, just so you can test boot)

Anyone that can venture a guess if this is sane?  Do I try a boot?

~Phil

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS 1100 HS ELPH 510 Porting Thread
« Reply #41 on: 10 / February / 2014, 18:45:38 »
DEF(focus_len_table,                    0xfff4a4c8) // stolen from ixus240
AFAIK this is only used in platform code, find the function that references it and make that work (return a constant or something). Some ports manage without that table.
Quote
DEF(cds_gain_value,                     0x0000abd0) //stolen from ixus240 test
NHSTUB(SetCDSGain,                              0x12345678)
NHSTUB(GetCdsGainValue,                         0x12345678)
This isn't needed for CHDK, probably required by leftover, now commented (video manual exposure) functions from the ixus310 port.

Quote
DEF(sub_FF2F34E8_my,                    0x00000678) // fake to build
DEF(sub_FF2F2F3C_my,                    0x000003d3) //again faked to build
these _my functions should contain a copy of the original fw routine (that's what CHDK-PT is good for), usually with some modifications. Defining them as nonsense addresses will only cause crashes (if the code that references them is actually used).

Note that nafraf is using the code_gen utility which makes most of manual code copying unnecessary.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: IXUS 1100 HS ELPH 510 Porting Thread
« Reply #42 on: 10 / February / 2014, 18:55:07 »
DEF(focus_len_table,                    0xfff4a4c8) // stolen from ixus240
AFAIK this is only used in platform code, find the function that references it and make that work (return a constant or something). Some ports manage without that table.

This is should be found with the latest version of finsig_dryos from 1.3.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline nafraf

  • *****
  • 1308
Re: IXUS 1100 HS ELPH 510 Porting Thread
« Reply #43 on: 10 / February / 2014, 19:50:54 »
Some changes:
focus_len_table is found.
filewrite_task is complete.
kbd.c clean up.

Remember that this port is under development, and it is a blind port..  :blink:

loader code is missing.
platform_camera.h has not been verified.
See notes.txt.
« Last Edit: 10 / February / 2014, 19:53:15 by nafraf »


Re: IXUS 1100 HS ELPH 510 Porting Thread
« Reply #44 on: 10 / February / 2014, 22:37:48 »
I'll see if I can get the loader dirs setup.  I'm looking at the main.c and am not sure how to find that assembler block.  I'll get the remainder in place. 

Re: IXUS 1100 HS ELPH 510 Porting Thread
« Reply #45 on: 10 / February / 2014, 22:59:27 »
I've got the files ready to go but I don't have access to your repo, should I create my own on setepontos?   Not sure how.

~Phil

Re: IXUS 1100 HS ELPH 510 Porting Thread
« Reply #46 on: 11 / February / 2014, 01:22:29 »
I created my own on assembla like yours, trying to import from yours but its still 'queued'

~Phil

*

Offline nafraf

  • *****
  • 1308
Re: IXUS 1100 HS ELPH 510 Porting Thread
« Reply #47 on: 11 / February / 2014, 03:18:21 »
I've got the files ready to go but I don't have access to your repo, should I create my own on setepontos?   Not sure how.

~Phil
Could you post your patch?


Re: IXUS 1100 HS ELPH 510 Porting Thread
« Reply #48 on: 11 / February / 2014, 03:32:25 »
I don't have a patch against an empty file.  I'm adding files that didn't exist. 

~Phil

Re: IXUS 1100 HS ELPH 510 Porting Thread
« Reply #49 on: 11 / February / 2014, 12:58:58 »
the import still has never happened, I also didn't have much luck finding the entry point from main.c in my dissasembly of the PRIMARY.BIN.  I hope to have more time to look into it tonight.

~Phil

 

Related Topics