New stubs/signature finder (gensig2/finsig2) for DryOS cameras. - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

New stubs/signature finder (gensig2/finsig2) for DryOS cameras.

  • 103 Replies
  • 32483 Views
*

Offline whim

  • ******
  • 2041
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #10 on: 10 / July / 2011, 08:54:40 »
Advertisements
Hi Phil,

I have a suggestion for the new sig_ref2 system (although it has more to with the overall workflow,
it would be equally usefull for the old sig_ref)

Would it be possible to make it 'EXTERNAL PRIMARY' aware for the reference binaries as well,
as in: having it search for 'sig_ref2_dryos_X.bin' & friends in - say - {external primary path}\sig_ref2\  ?
This would remove the need to copy them into place for each new revision, and save disk space.
Haven't really looked into it, but I suppose this would involve modding 'makefile_sub.inc' ?

cheers,

wim


Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #11 on: 13 / July / 2011, 21:15:50 »
@philmoz : Updated NewSigZip.zip works properly with  font_8x16_pack tool - thanks.

Working through a port to a new camera (G10) and I get "undefined reference to" errors for the following symbols :

   ScreenLock
   ScreenUnlock
   Unmount_FileSystem
   Mount_FileSystem
   SetZoomActuatorSpeedPercent
   rewinddir
   MakeAFScan
   ExpCtrlTool_StartContiAE
   SetScriptMode
   UnsetZoomForMovie
   GetImageFolder

I put these into stub_entry_2.S and now need to go looking for them.  I'm wondering why your finsig2 code does not pick them up automatically ?

EDIT : doesn't find kbd_pwr_on either but the stub_entry.S file tells you that.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #12 on: 13 / July / 2011, 22:08:03 »
@philmoz : Updated NewSigZip.zip works properly with  font_8x16_pack tool - thanks.

Working through a port to a new camera (G10) and I get "undefined reference to" errors for the following symbols :

   ScreenLock
   ScreenUnlock
   Unmount_FileSystem
   Mount_FileSystem
   SetZoomActuatorSpeedPercent
   rewinddir
   MakeAFScan
   ExpCtrlTool_StartContiAE
   SetScriptMode
   UnsetZoomForMovie
   GetImageFolder

I put these into stub_entry_2.S and now need to go looking for them.  I'm wondering why your finsig2 code does not pick them up automatically ?

EDIT : doesn't find kbd_pwr_on either but the stub_entry.S file tells you that.


Thanks for that.

SetScriptMode and UnsetZoomForMovie I'd noticed already. I've fixed SetScriptMode; but haven't fully tested it yet.

kbd_pwr_on and kbd_pwr_off are carry overs from VxWorks and aren't really needed; at some point they should get removed altogether.

I think the others should have been found; will take a closer look tonight.

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: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #13 on: 13 / July / 2011, 22:34:30 »
I've noticed that these definitions seem to be pretty common in stub_entry_2.S for several cameras :

NHSTUB(kbd_pwr_on, NULLSUB )
NHSTUB(kbd_pwr_off, NULLSUB )
NHSTUB(rewinddir, NULLSUB )
NHSTUB(Unmount_FileSystem, NULLSUB )
NHSTUB(Mount_FileSystem, NULLSUB )
NHSTUB(SetZoomActuatorSpeedPercent, NULLSUB )

Might be something to add to your new format stubs_entry.S - commented out if necessary ?

Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #14 on: 14 / July / 2011, 05:14:15 »
@philmoz : Updated NewSigZip.zip works properly with  font_8x16_pack tool - thanks.

Working through a port to a new camera (G10) and I get "undefined reference to" errors for the following symbols :

   ScreenLock
   ScreenUnlock
   Unmount_FileSystem
   Mount_FileSystem
   SetZoomActuatorSpeedPercent
   rewinddir
   MakeAFScan
   ExpCtrlTool_StartContiAE
   SetScriptMode
   UnsetZoomForMovie
   GetImageFolder

I put these into stub_entry_2.S and now need to go looking for them.  I'm wondering why your finsig2 code does not pick them up automatically ?

EDIT : doesn't find kbd_pwr_on either but the stub_entry.S file tells you that.


Here's what I've found (will post an update to NewSigZip.zip soon):
- SetScriptMode, fixed in next version
- UnsetZoomForMovie, fixed in next version
- ExpCtrlTool_StartContiAE & ExpCtrlTool_StopContiAE, fixed in next version
- ScreenLock and ScreenUnLock, these only seem to apply from R39 onwards. For R31 RefreshPhysicalScreen will probably work.
- GetImageFolder, only applies to new cameras that use 'date' based folder naming, older cameras should not define CAM_DATE_FOLDER_NAMING in platform_camera.h
- Mount_FileSystem and Unmount_FileSystem seem to be leftovers from VxWorks, the remount_filesystem function in generic/wrappers.c should probably be conditionally compiled for VxWorks only.
- rewinddir seems to be a NULLSUB on a lot of cameras, the wrapper in generic/wrappers.c is never called by anything so this can probably be removed.
- SetZoomActuatorSpeedPercent, I think this is something older cameras could do (set zoom speed); but haven't seen anything like it on newer ones yet, if you find it let me know how so I can see if it can be added.
- MakeAFScan, I have not found any method of finding this reliably, will probably need to be done manually if needed (only used if you define CAM_AF_SCAN_DURING_VIDEO_RECORD in platform_camera.h).

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: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #15 on: 15 / July / 2011, 06:39:33 »
That's better - thanks.

There's also a few stubs_min.S definitions hanging out there still - were they simply hard to find automagically ?

Code: [Select]
DEF(focus_len_table,         0x0000)
DEF(full_screen_refresh,    0x0000)
DEF(zoom_busy,               0x0000)
DEF(focus_busy,                0x0000)
DEF(recreview_hold,          0x0000)

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #16 on: 15 / July / 2011, 07:32:55 »
That's better - thanks.

There's also a few stubs_min.S definitions hanging out there still - were they simply hard to find automagically ?

Code: [Select]
DEF(focus_len_table,         0x0000)
DEF(full_screen_refresh,    0x0000)
DEF(zoom_busy,               0x0000)
DEF(focus_busy,                0x0000)
DEF(recreview_hold,          0x0000)



focus_len_table isn't hard to find so long as you know the physical min & max zoom focus lengths - unfortunately finsig2 doesn't have this info.

The other are things I haven't been able to reliably find yet.

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: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #17 on: 16 / July / 2011, 15:21:41 »
I have another suggestion, if I may ? 

In the part of stubs_entry.S where it says :

Code: [Select]
// Stubs below should be checked. Stub not matched 100%, or difference
// found to current 'stubs_entry_2.S' or original 'stubs_entry.S'

Can you somehow flag it differently when the match is less than 100% but it matches the entry in stubs_entry_2.S ?

When checking a stubs_entry.S file,  its pretty important to know which values in the stubs_entry_2.S file are the same and which are different.

Sort of like you did so well in
Code: [Select]
// Values below go in 'stubs_min.S':
Ported :   A1200    SD940   G10    Powershot N    G16


Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #18 on: 18 / July / 2011, 09:47:53 »
Another question comes to mind.

As we port new cameras using this new sigfinder,  the stub_entry.S file will contain many definitions that would formerly have needed to be defined in stub_entry_2.S.   If we submit the resulting port with stubs_entry.S and stubs_entry_2.S based on the new sigfinder,  the port will only build properly until somebody rebuilds with primary.bin file in the stubs directory.  As long as the build process uses the old sigfinder this will be an issue.

One way around this is to cut & paste & edit all the NSTUB() lines in stubs_entry.S to NHSTUB() entries in stubs_entry_2.S. 

Does that make sense or is there a better, recommended way ?



Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #19 on: 18 / July / 2011, 10:03:35 »
Another question comes to mind.

As we port new cameras using this new sigfinder,  the stub_entry.S file will contain many definitions that would formerly have needed to be defined in stub_entry_2.S.   If we submit the resulting port with stubs_entry.S and stubs_entry_2.S based on the new sigfinder,  the port will only build properly until somebody rebuilds with primary.bin file in the stubs directory.  As long as the build process uses the old sigfinder this will be an issue.

One way around this is to cut & paste & edit all the NSTUB() lines in stubs_entry.S to NHSTUB() entries in stubs_entry_2.S. 

Does that make sense or is there a better, recommended way ?


One reason I haven't submitted a patch for this yet - trying to work out the safest way to add it without breaking anything.

Open to suggestions?

For now you can use this to find everything; but make sure it still builds with the old system (by manually moving things into stubs_entry_2.S). That's why I have the build option to enable/disable the new stuff.

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)

 

Related Topics