Windows GUI for CHDK porting - page 3 - General Discussion and Assistance - CHDK Forum

Windows GUI for CHDK porting

  • 98 Replies
  • 138361 Views
Re: Windows GUI for CHDK porting tools
« Reply #20 on: 30 / May / 2011, 07:07:21 »
Advertisements

Re: Windows GUI for CHDK porting tools
« Reply #21 on: 30 / May / 2011, 08:59:23 »
conversation moved to A495 porting thread>  http://chdk.setepontos.com/index.php?topic=5570.msg67568#msg67568
« Last Edit: 30 / May / 2011, 09:05:16 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Windows GUI for CHDK porting tools
« Reply #22 on: 04 / June / 2011, 13:55:06 »
Updated to version 1.02.  Changes :

1) Finally fixed the LDRD & STRD dissassembly.
2) Convert stubs function now ignores any line not starting with "N".
3) Local dissassembly address box now accepts lower case letters a-f as well as A-F
4) Tracks the current working directory between invocations.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Windows GUI for CHDK porting tools
« Reply #23 on: 08 / June / 2011, 23:12:04 »
Updated to version 1.03.  Changes :

1) Added Up & Down buttons to local disassembly mode to make it easier to scroll through code
2) Internal change to temporary file structure so that multiple running instances of the application do not interfere with each other.
3) Corrected the spelling of Disassemble on main window.

Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline funnel

  • ****
  • 349
Re: Windows GUI for CHDK porting tools
« Reply #24 on: 13 / July / 2011, 07:55:01 »
Good job. This is a great tool.
It would be nice if you could add the option to copy/paste the code from the window. Is there a specific reason why it is not included?

Re: Windows GUI for CHDK porting tools
« Reply #25 on: 13 / July / 2011, 08:39:50 »
It would be nice if you could add the option to copy/paste the code from the window. Is there a specific reason why it is not included?
The window is a bit of a hack I found somewhere on an AutoIt forum.  I've tried to cut&paste myself at times when I forget its not supported.   You can use the Save button to save everything in the window to a file and edit that - but its extra steps.

I'll take a look at some point about adding C&P - no promises on when through.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline openuas

  • **
  • 58
  • OpenUAS
    • OpenUAS
Re: Windows GUI for CHDK porting tools
« Reply #26 on: 13 / August / 2011, 19:14:35 »

Re: Windows GUI for CHDK porting tools
« Reply #27 on: 13 / August / 2011, 21:17:10 »
maybe this helps http://vista.tutorialref.com/autoit/autoit-copy-paste.html

Some interesting things at that link but nothing that helps with the CHDK-PT problem.  It seems to be hard to build a big scrollable text box in Autoit - something to dump the output from a dissassembler into for example.  I pieced together the code for CHDK-PT from several AutoIt forum postings but would love to find an easier way.  As it stands, there is probably a flag I can set in one of the Window's API calls that will allow text to be selected with the mouse for a "copy to clipboard" but I have not been able to puzzle that out.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Windows GUI for CHDK porting tools
« Reply #28 on: 20 / August / 2011, 02:59:34 »
Updated to version 1.04.   Added to  Setup | Show Address Info  so that it shows the memory content as well as the memory address.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Windows GUI for CHDK porting tools
« Reply #29 on: 28 / August / 2011, 20:45:00 »
Thank you waterwingz for this great tool! following the wiki instructions I have been able to get to the converting CHDK boot.c, movie_rec.c, and capt_set.c part of the porting process (I am working to port genie's SX230HS 100C to SX230HS 101B).

I got a little lost with the instructions about the address.txt file, so I started just looking at where the boot.c code references locations in the firmware memory, like
Code: [Select]
"loc_FF0001F8:\n"
" SUB R0, R12, R0 \n"
" STR R0, [R2] \n"
" SUB R0, LR, R1 \n"
" STR R0, [R3] \n"
" LDMFD SP!, {R4-R7,PC} \n"   
and then comparing those locations in the two different firmware dumps and changing any of the associated code.

But then I saw code like
Code: [Select]
void __attribute__((naked,noinline)) sub_FF000358_my() {
   
   *(int*)0x1938=(int)taskHook;
   *(int*)0x193C=(int)taskHook;


 if ((*(int*) 0xC022012C) & 1)
*(int*)(0x25E4) = 0x200000;
else
*(int*)(0x25E4) = 0x100000;

   asm volatile (

"loc_FF000358:\n"
                "LDR     R0, =0xFF0003D0\n"
                "MOV     R1, #0\n"
                "LDR     R3, =0xFF000408\n"
and I wasn't sure what to do. I assume that if loc_F000358 changes I have some work to do on sub_FF000358_my, but if I just look at all the loc_XXXXXXXX codes and change them to reflect the addresses in the firmware I am porting to, does that make things simpler?

AND, am I making this all harder on myself because I don't understand what addresses and labels to pull out of boot.c and put into addresses.txt? I looked at the sample addresses.txt file but I couldn't figure out how to make a similar list of addresses and task lengths from the boot.c file I am working with.

Thanks again for your tools that at least make me feel like I have a chance of succeeding.
A720 1.00c | D10 1.00b |SX220 1.01a | SX230 ? | SX30 1.00p CHDK ver. 1.1.0-r1727

 

Related Topics