Looking to dump SX30 IS firmware. Who can help?! - page 3 - Firmware Dumping - CHDK Forum

Looking to dump SX30 IS firmware. Who can help?!

  • 32 Replies
  • 22745 Views
Re: Looking to dump SX30 IS firmware. Who can help?!
« Reply #20 on: 23 / November / 2010, 19:12:35 »
Advertisements
core/main.dump is disassembly of your CHDK code, so you can look up any CHDK RAM addresses you find in the registers or stack dump there.

Hmmm .. I don't see anything called main.dump in trunk964/core. Am I looking in the right place ?

[Edit : got it now - its deleted by the makefile unless you comment that part out]

There are some functions that can't safely be replaced with a BX LR, for example anything that is expected to return a value ;)

That is true - but RefreshPhysicalScreen() takes no input parameters and returns void so I think that's okay ?
« Last Edit: 23 / November / 2010, 19:22:15 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
Re: Looking to dump SX30 IS firmware. Who can help?!
« Reply #21 on: 23 / November / 2010, 23:21:05 »
core/main.dump is disassembly of your CHDK code, so you can look up any CHDK RAM addresses you find in the registers or stack dump there.

Hmmm .. I don't see anything called main.dump in trunk964/core. Am I looking in the right place ?

[Edit : got it now - its deleted by the makefile unless you comment that part out]
It isn't that I know of. make fir leaves it behind.

That is true - but RefreshPhysicalScreen() takes no input parameters and returns void so I think that's okay ?
Yes, that was in response to philmoz "Everything else in stubs_entry_2.s I pointed to a null subroutine (BX LR)."
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Looking to dump SX30 IS firmware. Who can help?!
« Reply #22 on: 24 / November / 2010, 06:23:31 »
A bit more progress (and more questions)  :)

Now have the logo and debug_osd displaying (can't get the draw_restore to work yet).
Found the physw_status location and mapped out the keys.

Questions:
- can't seem to locate the RefreshPhysicalScreen, LockAndRefresh and UnlockAndRefresh routines in the firmware, any thoughts on how best to locate these?
- sx30 has a new button (Zoom Assist), is it worth adding a new key value for this?
- Zoom switch has 2 bits for each direction of the zoom (multiple zoom speeds), how should this be mapped? CHDK only appears to handle a single bit for each button (unless I'm missing something).

Regards,
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)

Re: Looking to dump SX30 IS firmware. Who can help?!
« Reply #23 on: 24 / November / 2010, 11:57:17 »
- can't seem to locate the RefreshPhysicalScreen, LockAndRefresh and UnlockAndRefresh routines in the firmware, any thoughts on how best to locate these?

Tried posting something about this a couple of days ago : http://chdk.setepontos.com/index.php?topic=5857.0

144 hits but no comments posted back - that's the way it goes.

Here's what I've found so far - there are two strings "ScreenLock" and "ScreenUnLock" just below what I'm guessing are the screenlock() and screenunlock() functions (at 0xFF9D1E44 and 0xFF9D1E84 for the SD940).   They are each referenced over 450 times in the firmware so I'm thinking that might be a good clue.  I'm working backwards to see how they are called rather than what they do - that may help.   I wonder if there is a RefreshPhysicalScreen() function at all - that may be an artifact from the VxWorks ports or something ?

Finally,  here's a thread I found that might help :

http://chdk.kernreaktor.org/mantis/view.php?id=260

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
Re: Looking to dump SX30 IS firmware. Who can help?!
« Reply #24 on: 24 / November / 2010, 12:13:56 »
RefreshPhysicalScreen is an alias for ScreenUnLock on modern cameras. The name is a historical artifact.
Don't forget what the H stands for.

Re: Looking to dump SX30 IS firmware. Who can help?!
« Reply #25 on: 24 / November / 2010, 20:49:44 »
posted a temporary hack for RefreshPhysicalScreen() here :

http://chdk.setepontos.com/index.php?topic=5857.msg57329#msg57329
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Looking to dump SX30 IS firmware. Who can help?!
« Reply #26 on: 25 / November / 2010, 16:13:15 »
posted a temporary hack for RefreshPhysicalScreen() here :

http://chdk.setepontos.com/index.php?topic=5857.msg57329#msg57329


Thanks again, that gets me over the screen redraw for now; but I'll need to come back and fix it properly.

The keyboard hook is now working, including unlocking the SD card. Once booted I can now take pictures and use the camera normally. For some reason the Print button isn't triggering CHDK yet - most of the problems so far have been to do with bad function mappings or addresses so I suspect this is more of the same.

Regards,
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)

Re: Looking to dump SX30 IS firmware. Who can help?!
« Reply #27 on: 25 / November / 2010, 18:51:13 »
most of the problems so far have been to do with bad function mappings or addresses so I suspect this is more of the same.

Found why the OSD was not displaying for me.   I need to find canon_mode_active and canon_menu_active in the firmware before the routine gui_draw_osd() will display OSD information  (or comment out the check for now  ;) )
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Looking to dump SX30 IS firmware. Who can help?!
« Reply #28 on: 25 / November / 2010, 20:23:31 »
most of the problems so far have been to do with bad function mappings or addresses so I suspect this is more of the same.

Found why the OSD was not displaying for me.   I need to find canon_mode_active and canon_menu_active in the firmware before the routine gui_draw_osd() will display OSD information  (or comment out the check for now  ;) )


Thanks, I've got canon_menu_active and canon_shoot_menu_active; but no canon_mode_active. Are those the ones you meant.

Regards,
Phi.
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)

Re: Looking to dump SX30 IS firmware. Who can help?!
« Reply #29 on: 25 / November / 2010, 20:53:56 »
Thanks, I've got canon_menu_active and canon_shoot_menu_active; but no canon_mode_active. Are those the ones you meant.

Yup- sorry, fat fingers.   How did you find canon_shoot_menu_active ?
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal