G16 Porting Thread - Test Versions Available - page 12 - DryOS Development - CHDK Forum supplierdeeply

G16 Porting Thread - Test Versions Available

  • 229 Replies
  • 127276 Views
Re: G16 Porting Thread - Test Versions Available
« Reply #110 on: 05 / November / 2017, 10:23:33 »
Advertisements
Unfortunately I have the firmware 101b, which won't be supported for any new firmware. I gladly would like to get my G16 prepared for testing.
Check back here periodically. I have the 101b port started - it's just a question of me finding a few quiet hours to get the first test version finished.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: G16 Porting Thread - 1.01b version now available
« Reply #111 on: 09 / December / 2017, 13:31:34 »
I've added a port for the 1.01b firmware to the download links in the first post of this thread.   I'm naturally interested to hear any testing results.
« Last Edit: 09 / December / 2017, 13:33:26 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14114
Re: G16 Porting Thread - Test Versions Available
« Reply #112 on: 12 / December / 2017, 00:19:47 »
Thanks waterwingz for doing all the work on this.  The code is now in the trunk, and the 101c port is available from the trunk autobuild. Test builds for other versions are still in this thread.

A few comments:
The loader/generic/compat_table.h from the patch was different from what I got by running make compat-table (PID address 0xfff60040 vs 0xfff20040, and also missing the #elif for encoding 12)
I checked in the newly built version.

There's a comment in notes.txt
Quote
value for focus_len_table in stubs_min.S found for 1.01c by memory search - assumed valid for other f/w versions - FIXME?
I think different subs generally have the same value, but this can be verified in dumps with a hex editor.

in platform/lib.c there's a comment on the jogdial functions:
Quote
//RotateJogDialRight FIXME : not checked
This can be checked by calling wheel_left() and wheel_right() in lua and verifying they behave the same as the real jogdial.

Cameras that have a ND controllable in the Canon UI should generally define CAM_HAS_NATIVE_ND_FILTER. This causes the propcase to be updated to correctly reflect ND state when ND is overridden.

Some blink code seems to be hooked up in the boot.c files. I would generally disable this kind of thing for stuff that's in the autobuild.

init_required_fw_features can go away completely

stubs_entry.S reports several modes missing from the mode map. There's a few that don't make sense to add to the modemap (like C mode) but if any of them are normal settable modes, they should be added.

The active_bitmap_buffer value in stubs_min.S is different from the sigfinder value. I'd the sigfinder value is incorrect, let me know. The value should toggle between 0 and 1 when the UI updates. It's possible they both work.
Don't forget what the H stands for.

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: G16 Porting Thread - Test Versions Available
« Reply #113 on: 16 / December / 2017, 03:22:24 »
Added the
  • G16 1.01B
full 32MB dump by gandy from this forum post to the CHDK P&S FW dumps repository.

@reyalp - thx for the hint !


Re: G16 Porting Thread - Test Versions Available
« Reply #114 on: 17 / December / 2017, 14:46:30 »
The code is now in the trunk, and the 101c port is available from the trunk autobuild. Test builds for other versions are still in this thread.
Your "clean up" changes all look good - thanks.  I'll submit a patch file for new changes and update the test versions posted at the start if this thread.

Comments on the more fundamental issues below.

Quote
The loader/generic/compat_table.h from the patch was different from what I got by running make compat-table (PID address 0xfff60040 vs 0xfff20040, and also missing the #elif for encoding 12)
Fumble fingers early in the porting process no doubt. It's curious that wrong PID address did not cause problems with the compat checks?

Quote
There's a comment in notes.txt
Quote
value for focus_len_table in stubs_min.S found for 1.01c by memory search - assumed valid for other f/w versions - FIXME?
I think different subs generally have the same value, but this can be verified in dumps with a hex editor.
IIRC, I had to find that table in memory beyond the area saved in the ROM dump file.  So it has to be scanned live in memory for each firmware version as I think that's the only way to find it.

Quote
in platform/lib.c there's a comment on the jogdial functions:
Quote
//RotateJogDialRight FIXME : not checked
This can be checked by calling wheel_left() and wheel_right() in lua and verifying they behave the same as the real jogdial.
Tests okay.

Quote
Cameras that have a ND controllable in the Canon UI should generally define CAM_HAS_NATIVE_ND_FILTER. This causes the propcase to be updated to correctly reflect ND state when ND is overridden.
Added to patch file.  It looks like the G9 and G11 ports probably need this too?

Quote
Some blink code seems to be hooked up in the boot.c files. I would generally disable this kind of thing for stuff that's in the autobuild.
Commented out so that I can enable later if there are issues with the other firmware versions.

Quote
init_required_fw_features can go away completely
Done (or at least commented out completely).

Quote
stubs_entry.S reports several modes missing from the mode map. There's a few that don't make sense to add to the modemap (like C mode) but if any of them are normal settable modes, they should be added.
Spent an hour fiddling with this.  Found one "missing" value and the values used to invoke C1 and C2. The others are a mystery - I even tried writing to the SHOOTING_MODE prop which seemed to sometimes do something but not anything I could decode.

Quote
The active_bitmap_buffer value in stubs_min.S is different from the sigfinder value. I'd the sigfinder value is incorrect, let me know. The value should toggle between 0 and 1 when the UI updates. It's possible they both work.
Looking at my patch files, it appears active_bitmap_buffer started showing up in stub_entry.S sometime in mid July.  I found the value used in stubs_min.S several months earlier than that by looking at the other D6 ports.

I added code to main.c to display both values and to count the number of times they are not equal.  The values appear to switch between 0 & 1 together but the counter increases each time, telling me they don't always change at the exact same time.

How do I figure out which one is "correct"?


« Last Edit: 17 / December / 2017, 15:07:27 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14114
Re: G16 Porting Thread - Test Versions Available
« Reply #115 on: 17 / December / 2017, 16:56:01 »
IIRC, I had to find that table in memory beyond the area saved in the ROM dump file.
No, it's in the dump:  fdf2bd38 - fc000000 = offset 1F2BD38. I've verified that this is the same in all the G16 firmware dumps.

As an aside, the stuff that appears from fe000000 to the end of ROM is a mirror of the preceding 32 megs anyway (presumably due to addressing, not a physical copy) so a PID at 0xfff20270 also appears at 0xfdf20270. The FF version is used in the compat check because it's safe on cameras with smaller ROM address ranges, while lower addresses might trigger an exception.
Quote
Quote
Cameras that have a ND controllable in the Canon UI should generally define CAM_HAS_NATIVE_ND_FILTER. This causes the propcase to be updated to correctly reflect ND state when ND is overridden.
Added to patch file.  It looks like the G9 and G11 ports probably need this too?
If you can verify it doesn't cause problems on the G11, we can do that one at least. You may need to find the ND propcase.

When philmoz added this, the reason was
> Prevents screen flickering when ND filter enabled in CHDK menu/script.
for  G12 & G1X

This may not be an issue for other native ND cameras, but setting the propcase should make the EXIF consistent at least.

Quote
Quote
stubs_entry.S reports several modes missing from the mode map. There's a few that don't make sense to add to the modemap (like C mode) but if any of them are normal settable modes, they should be added.
Spent an hour fiddling with this.  Found one "missing" value and the values used to invoke C1 and C2. The others are a mystery - I even tried writing to the SHOOTING_MODE prop which seemed to sometimes do something but not anything I could decode.
You can try set_capture_mode_canon()
On g7x and sx710 I think 33297 is related to face ID registration, which probably doesn't make sense in the modemap.

Quote
Quote
The active_bitmap_buffer value in stubs_min.S is different from the sigfinder value. I'd the sigfinder value is incorrect, let me know. The value should toggle between 0 and 1 when the UI updates. It's possible they both work.
Looking at my patch files, it appears active_bitmap_buffer started showing up in stub_entry.S sometime in mid July.  I found the value used in stubs_min.S several months earlier than that by looking at the other D6 ports.

I added code to main.c to display both values and to count the number of times they are not equal.  The values appear to switch between 0 & 1 together but the counter increases each time, telling me they don't always change at the exact same time.

How do I figure out which one is "correct"?
The UI overlay should be stale more with one than the other in PTP live view, I guess. If you can't tell the difference, it probably doesn't matter much.
You could maybe figure out which one changes first.
Don't forget what the H stands for.

Re: G16 Porting Thread - Test Versions Available
« Reply #116 on: 19 / December / 2017, 08:50:27 »
I have tried to load CHDK to my G16 1.00h  trying ASSIST, STICK, formatting and no effect so far.

What else to do?


Re: G16 Porting Thread - Test Versions Available
« Reply #117 on: 19 / December / 2017, 14:33:26 »
I have tried to load CHDK to my G16 1.00h  trying ASSIST, STICK, formatting and no effect so far. 
The 1.00h port was reported as working (or at least booting properly - full testing was not done). I can't tell from your question if you are having problems installing CHDK or problems with making it run.

Your post does not give me much to work on.  I'll need a lot more detail about what you did.   For example, ASSIST is not the correct utility to use and won't help.  If you tried STICK,  did you use these STICKX instructions for unsupported builds  ?

You could also try using the CHIMP utility to format the card?

Quote
What else to do?
If you believe that you have configured your card correctly, please tell me what you did after that?

Did you put the little card lock switch on your SD card into the locked position before inserting it into your camera?  When you press the ON/OFF button on your camera, what happens?  Do you see a "Memory card Locked" message at the top of the LCD screen?  Did you see the CHDK logo on the screen for a few seconds?
Ported :   A1200    SD940   G10    Powershot N    G16


Re: G16 Porting Thread - Test Versions Available
« Reply #118 on: 20 / December / 2017, 09:42:00 »
I have followed your suggestion. Trying two different Micro SD (8 and 16 GB) with adapter.
Formatted cards with PC (Fat 32) and with G16 (low level format).

When using STICK it stops at step 3 -analyse card.
 (Drive:???? size, partitioning, bootability unknown. Stick needs permission to analyse disk)

With CHIMP it stops at Detect Camera: Unsupported model.
(firmware ver. 1.00 rev 8.00)

On STICK I have loaded test100h.zip and also tried to drop into STICK a photo from A720 IS and installed A720 files. When putting to G16 with SD card locked, it showed Memory Card locked" on the screen. In Playback menu of the camera appeared Firm Update option.



Re: G16 Porting Thread - Test Versions Available
« Reply #119 on: 20 / December / 2017, 12:35:56 »
When using STICK it stops at step 3 -analyse card.
 (Drive:???? size, partitioning, bootability unknown. Stick needs permission to analyse disk)
I believe you need to run STICK with administrator privileges ? 

One of the batch files it ships with does that for you - STICKX.CMD

Quote
With CHIMP it stops at Detect Camera: Unsupported model.
(firmware ver. 1.00 rev 8.00)
I recall having conversations with CHIMP"s author about supporting new development builds.  He didn't think it was necessary because so few new builds were being release IIRC.   I can't find the thread now - or any instructions - so I don't know if he added it or how you would use it if he did.  Sorry.


Quote
On STICK I have loaded test100h.zip and also tried to drop into STICK a photo from A720 IS and installed A720 files. When putting to G16 with SD card locked, it showed Memory Card locked" on the screen. In Playback menu of the camera appeared Firm Update option.
If you are seeing a "Firmware Update" option with your G16 then you have left A720 files on the card.  Firmware Update is not supported for the G16 (or any other DIGIC6 camera AFAIK).
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal