SX60HS Porting - page 84 - DryOS Development - CHDK Forum

SX60HS Porting

  • 915 Replies
  • 348072 Views
*

Offline reyalp

  • ******
  • 14080
Re: SX60HS Porting
« Reply #830 on: 10 / December / 2017, 16:12:27 »
Advertisements
Zoom for MF discussion split to https://chdk.setepontos.com/index.php?topic=13317.0
Don't forget what the H stands for.

*

Offline lyzby

  • **
  • 52
Re: SX60HS Porting
« Reply #831 on: 11 / December / 2017, 16:28:33 »
In accordance with guidance on the SX60HS hardware page, I downloaded and unzipped sx60_100b.7z. I see the sx60/sub/100b folder containing PRIMARY.BIN (32MB), but don't know what what I should do with it.

Is this explained somewhere? I have an SD card prepared, but don't know what to do next. (I have previously prepared CHDK for an SX40HS, but this is different, and SX60HS doesn't appear to be in the autobuilds.)

Re: SX60HS Porting
« Reply #832 on: 11 / December / 2017, 17:10:39 »
In accordance with guidance on the SX60HS hardware page, I downloaded and unzipped sx60_100b.7z. I see the sx60/sub/100b folder containing PRIMARY.BIN (32MB), but don't know what what I should do with it.
You've found the ROM firmware dump file for the SX60hs 1.00b.  There is nothing much you can do with that - it's used by the CHDK developers to port CHDK to the camera.
Quote
Is this explained somewhere? I have an SD card prepared, but don't know what to do next. (I have previously prepared CHDK for an SX40HS, but this is different, and SX60HS doesn't appear to be in the autobuilds.)
Build for the SX60hs are included in the 1.5.0 CHDK version (sometimes called the unstable or development version).

link > http://mighty-hoernsche.de/trunk/

I've updated the CHDK wiki hardwarepage to reflect that.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lyzby

  • **
  • 52
Re: SX60HS Porting
« Reply #833 on: 12 / December / 2017, 20:35:06 »
Thanks for the information and the link. I downloaded the CHDK firmware, but in following the "Prepare Your SD card" instructions, when I ran EOScard.exe, it failed with the message "EOScard has stopped working". This occurred multiple times one two different Win7 laptops, even after rebooting. This is what the screen looks like:
https://www.dropbox.com/s/42g6wpximwkhpeh/EOScard%20failure.jpg?dl=0

Any ideas on how to proceed?


SX60HS Porting
« Reply #834 on: 12 / December / 2017, 20:46:44 »
Any ideas on how to proceed?
As a matter of fact, yes I do. Don't use EOSCard. I'd recommend STICK or CHIMP.  Links at the top of the Prepare Your SD Card wiki page.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SX60HS Porting
« Reply #835 on: 12 / April / 2018, 16:10:03 »
Hi all!
today brought me a new SX60HS, and ... it have firmware 1.00h.
this is dump and firm.info, maybe someone will have a free time?  :-[

https://drive.google.com/open?id=1glkkcfweDTu4A0552TbR_fYS0GnB0a73

Re: SX60HS Porting
« Reply #836 on: 12 / April / 2018, 16:56:06 »
I'll do a port for it.  Hopefully very few differences from 100f.  Wonder why no one's mentioned 100g yet?
Might take a week!
« Last Edit: 12 / April / 2018, 16:57:58 by 62ndidiot »

SX60HS Porting
« Reply #837 on: 12 / April / 2018, 17:05:06 »
I'll do a port for it.  Hopefully very few differences from 100f.
You probably want to compare the dump files. If they are the same until almost the end* then you may not need a new port.

@srsa_4c can probably validate  that.

Quote
Wonder why no one's mentioned 100g yet?
And it's not unusual for Canon to skip firmware versions.  Or to release so few of one firmware version that nobody interested in CHDK owns one of them.

[ * ]  IIRC, if you find the highest address used in the various CHDK porting files, and then validate that the ROM dump from two firmware versions are identical below that point in memory,  then both camera versions can use the same CHDK port.
« Last Edit: 12 / April / 2018, 19:41:28 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: SX60HS Porting
« Reply #838 on: 12 / April / 2018, 21:38:41 »
Unfortunately, function addresses in functions_by_address.csv change about half way thru.  The good thing is that there is only one new offset of 40, but of course I'll need to check a few FLAGS which are not in functions.csv files....

Code: [Select]
Addr 100f    Name                  Addr2 100h             Name          offset
0xfc1615a5 strftime 0xfc1615a5 strftime 0
0xfc1619c9 srand 0xfc1619c9 srand 0
0xfc1619cf rand 0xfc1619cf rand 0
0xfc161a17 strncmp 0xfc161a17 strncmp 0
0xfc161a41 strchr 0xfc161a41 strchr 0
0xfc163d7f task_AprocMainTask 0xfc163d7f task_AprocMainTask 0
0xfc163e0b task_AprocBpPwmTask 0xfc163e0b task_AprocBpPwmTask 0
0xfc163e6b task_AprocBpGenTask 0xfc163e6b task_AprocBpGenTask 0
0xfc169a6f task_DetSeqT 0xfc169a6f task_DetSeqT 0
0xfc16a085 task_DetSeqSadT 0xfc16a085 task_DetSeqSadT 0
0xfc16cb81 AllocateUncacheableMemory 0xfc16cba9 AllocateUncacheableMemory -40
0xfc16cbad FreeUncacheableMemory 0xfc16cbd5 FreeUncacheableMemory -40
0xfc16d4e3 GetCurrentShutterSpeed_FW 0xfc16d50b GetCurrentShutterSpeed_FW -40
0xfc16d78f GetCurrentExposureTime_FW 0xfc16d7b7 GetCurrentExposureTime_FW -40
0xfc1735b9 task_BrtMsrTask 0xfc1735e1 task_BrtMsrTask -40
so any addresses above around 0xfc16a085 will need changing....so  boot.c capt_seq.c will need redoing
I think.
« Last Edit: 12 / April / 2018, 21:42:11 by 62ndidiot »

*

Offline reyalp

  • ******
  • 14080
Re: SX60HS Porting
« Reply #839 on: 13 / April / 2018, 01:26:34 »
so any addresses above around 0xfc16a085 will need changing....so  boot.c capt_seq.c will need redoing
I think.
Yes, all the capdis disassembly needs to be redone. Even code from addresses before the change may call functions whose address has changed in ROM.

If everything is offset by the same amount in the funcs_by_address.csv, it's pretty safe to assume that functions you need to find manually in that range are shifted by the same amount.

None of the RAM addresses in stubs_entry seem to have changed, so variables in stubs_min.S are probably OK. ROM addresses will need to be checked. Data in ROM (things like focus_len_table, raw buffers etc) might have shifted by different amounts than code.

[ * ]  IIRC, if you find the highest address used in the various CHDK porting files, and then validate that the ROM dump from two firmware versions are identical below that point in memory,  then both camera versions can use the same CHDK port.
FWIW, my approach is to copy the closest known sub (100f to 100h in this case), run rebuild-stubs on it and diff stubs_entry.S and funcs_by_address.csv

When I'm done with the new sub, I diff the .c and manually created stubs files. Scanning them to check that only addresses and comments have changed helps avoid missed hooks an things like that.
« Last Edit: 13 / April / 2018, 01:34:18 by reyalp »
Don't forget what the H stands for.

 

Related Topics