the sx10 porting thread - page 28 - General Discussion and Assistance - CHDK Forum  

the sx10 porting thread

  • 613 Replies
  • 339301 Views
*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: the sx10 porting thread
« Reply #270 on: 02 / June / 2009, 15:15:26 »
Advertisements
Thanks for your input - before I try the functions can I ask how you found these addresses? In the disassembly I can find no references to the 2 memory locations you gave. I'm concerned I have a bad firmware dump so are you able to tell me the locations in the firmware dumps where the references to these 2 locations are?

Starting point is InitFileModules task (SX10 1.01A):
Quote
ROM:FF884A54 task_InitFileModules                    ; DATA XREF: taskcreate_InitFileModules+24
ROM:FF884A54                 STMFD   SP!, {R4-R6,LR}
ROM:FF884A58                 BL      sub_FF879F78
ROM:FF884A5C                 LDR     R5, =0x5006
ROM:FF884A60                 MOVS    R4, R0
ROM:FF884A64                 MOVNE   R1, #0
ROM:FF884A68                 MOVNE   R0, R5
ROM:FF884A6C                 BLNE    PostLogicalEventToUI
ROM:FF884A70                 BL      sub_FF879FA4
ROM:FF884A74                 CMP     R4, #0
ROM:FF884A78                 MOVEQ   R0, R5
ROM:FF884A7C                 LDMEQFD SP!, {R4-R6,LR}
ROM:FF884A80                 MOVEQ   R1, #0
ROM:FF884A84                 BEQ     PostLogicalEventToUI
ROM:FF884A88                 LDMFD   SP!, {R4-R6,PC}

Then goto sub_FF879FA4:

Quote
ROM:FF879FA4 sub_FF879FA4                            ; CODE XREF: task_InitFileModules+1C
ROM:FF879FA4                 STMFD   SP!, {R4,LR}
ROM:FF879FA8                 BL      Mount_FileSystem
ROM:FF879FAC                 BL      nullsub_66
ROM:FF879FB0                 LDR     R4, =0x58CC
ROM:FF879FB4                 LDR     R0, [R4,#4]
ROM:FF879FB8                 CMP     R0, #0
....

In VxWorks (a710):

Quote
ROM:FFD99138 InitFileModulesTask                     ; DATA XREF: ROM:off_FFD991F4o
ROM:FFD99138                 STMFD   SP!, {R4,LR}    
ROM:FFD9913C                 BL      sub_FFEE1D70    
ROM:FFD99140                 SUBS    R4, R0, #0    
ROM:FFD99144                 MOV     R0, #0x5000  
ROM:FFD99148                 MOV     R1, #0          
ROM:FFD9914C                 ADD     R0, R0, #6    
ROM:FFD99150                 BEQ     loc_FFD99158  
ROM:FFD99154                 BL      PostLogicalEventToUI
ROM:FFD99158
ROM:FFD99158 loc_FFD99158                            ; CODE XREF: InitFileModulesTask+18j
ROM:FFD99158                 BL      sub_FFEE1D9C    
ROM:FFD9915C                 MOV     R0, #0x5000    
ROM:FFD99160                 CMP     R4, #0          
ROM:FFD99164                 MOV     R1, R4          
ROM:FFD99168                 ADD     R0, R0, #6    
ROM:FFD9916C                 LDMNEFD SP!, {R4,PC}  
ROM:FFD99170                 LDMFD   SP!, {R4,LR}  
ROM:FFD99174                 B       PostLogicalEventToUI

Quote
ROM:FFEE1D9C sub_FFEE1D9C                            ; CODE XREF: InitFileModulesTask:loc_FFD99158p
ROM:FFEE1D9C                 STR     LR, [SP,#-4]!  
ROM:FFEE1DA0                 BL      Mount_FileSystem
ROM:FFEE1DA4                 LDR     R3, =0xAF68    
ROM:FFEE1DA8                 LDR     R2, [R3]      
ROM:FFEE1DAC                 CMP     R2, #0        
ROM:FFEE1DB0                 BNE     loc_FFEE1DD8  
....
« Last Edit: 02 / June / 2009, 15:18:32 by ewavr »

Re: the sx10 porting thread
« Reply #271 on: 03 / June / 2009, 04:20:18 »
Thanks for that; I can now see that the source of my confusion over addresses is that my IDA dump has this as its first line of task_InitFileModules:

ROM:FFC74A54 task_InitFileModules                    ; DATA XREF: taskcreate_InitFileModules+24o

but you have:

ROM:FF884A54 task_InitFileModules                    ; DATA XREF: taskcreate_InitFileModules+24

I have followed the instructions at http://chdk.wikia.com/wiki/DryOS_Porting to load the dump to IDA and it does say
Quote
Rom Start address: 0xFFC00000
and
Quote
Loading address: 0xFFC00000
so I am confused why you have not done this with your dump. I assume you have left the starting address as whatever it comes up as when you first load the binary into IDA?

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: the sx10 porting thread
« Reply #272 on: 03 / June / 2009, 04:47:54 »
I have followed the instructions at http://chdk.wikia.com/wiki/DryOS_Porting to load the dump to IDA and it does say
Quote
Rom Start address: 0xFFC00000
and
Quote
Loading address: 0xFFC00000

On this page:
Quote
S/SD/G-Series start address is 0xFF810000
or just look:

ROM:FF810130                 LDR     R0, =unk_FFB9B27C  ; <---absolute constant
ROM:FF810134                 LDR     R1, =0x1900
ROM:FF810138                 LDR     R3, =0x10A50


Re: the sx10 porting thread
« Reply #273 on: 04 / June / 2009, 04:10:45 »
Quote
On this page:
Quote
S/SD/G-Series start address is 0xFF810000

Ok, but the page did not say "SX". Anyway, I changed the start address and loading address to 0xFF810000 and the disassembly matches yours now :D.

Also, your predictions of Mount_FileSystem at 0xFF85AB08 and Unmount_FileSystem 0xFF85ABD0 were correct and I no longer have write-caching problems!

I am well impressed by how you spotted those functions especially the Unmount_FileSystem one. I think I will have to study a book on ARM assembly to unravel this mystery a bit more.


Re: the sx10 porting thread
« Reply #274 on: 04 / June / 2009, 15:43:41 »
Is anyone working on CHDK for sx10 Firmware version 1.00c? if not can anyone direct to "how to" and i'll get to work....

*

Offline reyalp

  • ******
  • 14089
Re: the sx10 porting thread
« Reply #275 on: 04 / June / 2009, 16:54:50 »
Is anyone working on CHDK for sx10 Firmware version 1.00c? if not can anyone direct to "how to" and i'll get to work....
http://chdk.wikia.com/wiki/SX10
http://chdk.wikia.com/wiki/For_Developers
Don't forget what the H stands for.

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: the sx10 porting thread
« Reply #276 on: 04 / June / 2009, 17:21:38 »
Some *.S files for 1.01B firmware for future developers  - http://ewavr.nm.ru/chdk/trash/sx10-101b.zip
Sorry, I can't continue this work.

« Last Edit: 05 / June / 2009, 03:26:54 by ewavr »

*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: the sx10 porting thread
« Reply #277 on: 05 / June / 2009, 01:52:05 »
Some *.S files for 1.01B firmware for future developers  - http://ewavr.nm.ru/chdk/trash/sx10-101b.zip.
Sorry, I can't continue this work.
Could you upload it somewhere else ?
« Last Edit: 07 / June / 2009, 14:32:12 by fe50 »


Re: the sx10 porting thread
« Reply #278 on: 05 / June / 2009, 02:13:20 »
Hello, i am not a developer but let me know how can i help, ciao

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: the sx10 porting thread
« Reply #279 on: 05 / June / 2009, 03:27:52 »
« Last Edit: 05 / June / 2009, 03:30:00 by ewavr »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal