ELPH300HS aka IXUS220HS - Porting Thread - page 90 - DryOS Development - CHDK Forum

ELPH300HS aka IXUS220HS - Porting Thread

  • 899 Replies
  • 427948 Views
*

Offline koshy

  • *****
  • 1096
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #890 on: 23 / November / 2019, 07:13:31 »
Advertisements
So if it isn't isn't confirmed, can you try on the current trunk:
CHDK installed, card unlocked.
Run firm update to start CHDK
Plug in USB
Nothing happens. The PC does not see the camera. Remote is not enabled.
Want a test build with the USB bit visible again?
Without CHDK, the PC sees the camera just fine, with the card locked we get the crash.
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline koshy

  • *****
  • 1096
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #891 on: 23 / November / 2019, 07:27:14 »
Can you check on a trunk build:
Under CHDK Miscellaneous -> tools -> Memory browser, set the address to 0x2488.
Report the value after DWORD
1

Is it just me or does the memory browser have a small bug? You start out with increments 4 which is the minimum stepping you can use, using the zoom setting you can select larger increments. While 100 and 1000 and so forth are multiples of 4 the second choice - 10 - is not. So, I got myself entangled in a place where I could not reach 0x2488 but only 0x2486 and I then had to fiddle with the 10 again to correct this. Long story short: Should the ten be a twelve or an eight?

Edit: I figured I'd try this just in case. When I display the 0x2488 value and then plug in the USB cable the value's display stays at one until the screen goes black from the crash. I can't see it going to 0. It still migh in the moment the screen goes black.
« Last Edit: 23 / November / 2019, 07:54:39 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline reyalp

  • ******
  • 14125
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #892 on: 23 / November / 2019, 15:28:09 »
Nothing happens. The PC does not see the camera. Remote is not enabled.
:blink:
That's interesting. Can you try the same test with A2200?

Can you check on a trunk build:
Under CHDK Miscellaneous -> tools -> Memory browser, set the address to 0x2488.
Report the value after DWORD
1
:blink:
That's interesting too. I expected it would only be set somewhere immediately in the connection process, so you probably wouldn't see it. My impression is it's some kind of error flag.

Quote
Is it just me or does the memory browser have a small bug? You start out with increments 4 which is the minimum stepping you can use, using the zoom setting you can select larger increments. While 100 and 1000 and so forth are multiples of 4 the second choice - 10 - is not. So, I got myself entangled in a place where I could not reach 0x2488 but only 0x2486 and I then had to fiddle with the 10 again to correct this. Long story short: Should the ten be a twelve or an eight?
It's all hex, so 0x10 is 16. You should not be able to get 0x2486?!? If you have "0x10" selected, the last digit should not change. It certainly doesn't on my cams.

On some of these displays it can be hard to tell some digits like B, 8, 0 apart.

Quote
Edit: I figured I'd try this just in case. When I display the 0x2488 value and then plug in the USB cable the value's display stays at one until the screen goes black from the crash. I can't see it going to 0. It still migh in the moment the screen goes black.
Yeah, I was originally going to suggest that but realized it would probably be ambiguous.
Don't forget what the H stands for.

*

Offline koshy

  • *****
  • 1096
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #893 on: 23 / November / 2019, 16:44:42 »
Quote
Is it just me or does the memory browser have a small bug? You start out with increments 4 which is the minimum stepping you can use, using the zoom setting you can select larger increments. While 100 and 1000 and so forth are multiples of 4 the second choice - 10 - is not. So, I got myself entangled in a place where I could not reach 0x2488 but only 0x2486 and I then had to fiddle with the 10 again to correct this. Long story short: Should the ten be a twelve or an eight?
It's all hex, so 0x10 is 16. You should not be able to get 0x2486?!? If you have "0x10" selected, the last digit should not change. It certainly doesn't on my cams.

On some of these displays it can be hard to tell some digits like B, 8, 0 apart.
Thank you, I have no idea what I saw, a trick of either the mind or the light I guess. Or deprivation of sleep...
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline koshy

  • *****
  • 1096
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #894 on: 23 / November / 2019, 16:56:32 »
Nothing happens. The PC does not see the camera. Remote is not enabled.
:blink:
That's interesting. Can you try the same test with A2200?
Sure, loaded trunk CHDK 5296 on A2200 by FW update, plugged a USB cable in connected with CHDKPTP, switched to Rec nothing out of the ordinary. Figured that's nuts and with earlier confusion re-tried Ixus 220 in the same way but no nothing. No crash no, camera on Windows device manager, none for CHDKPTP. Without CHDK CHDKPTP shows the cam but says the expected host:2.8 cam 1 and warns about incompatibility etc. upon connect.
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline reyalp

  • ******
  • 14125
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #895 on: 28 / November / 2019, 01:27:57 »
Here's another test build. Please report the values shown for AD, M1 and M2.

No need to try connecting USB.

Sure, loaded trunk CHDK 5296 on A2200 by FW update, plugged a USB cable in connected with CHDKPTP, switched to Rec nothing out of the ordinary. Figured that's nuts and with earlier confusion re-tried Ixus 220 in the same way but no nothing. No crash no, camera on Windows device manager, none for CHDKPTP.
Thanks. A2200 behavior is expected.

I was using A2200 as a comparison since it's another dryos 47, digic IV camera released around the same time. Comparing the firmware with Ghidra versioning, much of the reboot related code is identical. I did find one notable difference: On Ixus 220, SD power is apparently controlled by i2c, while on a2200, it's controlled by direct MMIO like earlier cameras.
The presence of i2c seems to be related to HDMI support, which ixus220 has and a2200 doesn't. None of this obviously relates to the USB problem, but

ixus310_elph500hs is also dryos 47 and has the same i2c functions, and doesn't have the USB crash ixus220 does. Your PTP test of ixus310 did have the motionvector crash in remoteshoot, but that's definitely a different thing. Nothing jumps out as different in the ixus310 CHDK port. I'll do some comparison of the Canon firmware later.
Don't forget what the H stands for.

*

Offline koshy

  • *****
  • 1096
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #896 on: 28 / November / 2019, 08:28:39 »
Here's another test build. Please report the values shown for AD, M1 and M2.
When CHDK is invoked by FW Update all four values are 0 (or 0x00000000)
Upon USB Plug-in

AD: cycles 0x1ff through 0x205
M1: 0x10100
M2: 0
USB: 1

Camera not seen by PC.

When CHDK is loaded on boot with a locked SD card. M2 is 0x1 instead of 0.
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline reyalp

  • ******
  • 14125
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #897 on: 28 / November / 2019, 21:53:31 »
Here's another test build. Please report the values shown for AD, M1 and M2.
When CHDK is invoked by FW Update all four values are 0 (or 0x00000000)
Upon USB Plug-in

AD: cycles 0x1ff through 0x205
M1: 0x10100
M2: 0
USB: 1

Camera not seen by PC.

When CHDK is loaded on boot with a locked SD card. M2 is 0x1 instead of 0.
Thanks.

Additional details, in case anyone has ideas:

AD is the A/D channel that returns USB +5 voltage (0x1ff = 511, 5.1 volts?). This is checked by some code related to the variable at 0x2488 that triggers the HardwareDefect. Specifically ff85d6f4 calls ff860d24(11) which returns the value of MMIO 0xc0900054, which is the A/D value (with some fiddling) and sets *0x2488 = 1 if the value is < 0x15b (437). ff860d24 is also the underlying function of GetAdChValue

M1 is MMIO 0xc0720008. Some other code related to the 0x2488 checks this. On elph140, it's 0 when USB  isn't present, and 0x24100000 when it is. It appears to go through some other values when USB is plugged/unplugged. Plugged into a powered hub with no computer attached, it's 0x20010200. Plugged into USB charger (presumably just +5v), it appears to be 0x00100000.
If CHDK USB remote is enabled, it stays 0.
Code around ff832104 checks for *(0xc0720008) & 0x100 and calls the ff85d6f4 function mentioned above if set. Some code around called from Restart also checks this for 0x100, skipping operations on other 0xc072* MMIOs if it's set.
Other code checks 0xc0720008 & 0x8000
I guess the 0xc072* MMIOs are maybe registers for the USB controller? Tracing back from these could maybe identify initialization code.`

M2 is the 0x2488 value.
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #898 on: 25 / September / 2021, 13:48:50 »
CHDK installed, card unlocked.
Run firm update to start CHDK
Nothing happens.
NO Firrnware-Update visible in Canon-menu  :o, never...
... because I had 2 .Fi2 files on the card ...  :haha :lol
   (101a, && no  https://zadig.akeo.ie/)   ...       yet...
Quote
Overige parameters ->
Gebruikersmenu ->
Edit: There (on PC) is only the DCIM visible &&  *.FI2  files:
« Last Edit: 25 / September / 2021, 16:05:24 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #899 on: 02 / November / 2021, 14:07:04 »
Zebra was sqeezed in screens upper/2. These lines are enough to fix it.  :D
Code: [Select]
// from Ix265
int vid_get_viewport_display_xoffset_proper()   { return vid_get_viewport_display_xoffset()<<1; }
int vid_get_viewport_display_yoffset_proper()   { return vid_get_viewport_display_yoffset() * vid_get_viewport_yscale(); }
int vid_get_viewport_height_proper()            { return vid_get_viewport_height() * vid_get_viewport_yscale(); }

int vid_get_viewport_fullscreen_height()        { return 240 * vid_get_viewport_yscale();}
Default.Lua ==> Dutch; Edited palette ...  :-*
« Last Edit: 02 / November / 2021, 14:21:24 by Caefix »
All lifetime is a loan from eternity.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal