SX430 - This will be my first porting Attempt - page 3 - DryOS Development - CHDK Forum  

SX430 - This will be my first porting Attempt

  • 202 Replies
  • 226541 Views
Re: SX430 - This will be my first porting Attempt
« Reply #20 on: 04 / November / 2018, 16:14:23 »
Advertisements
 

also attaching the output of exiftool

it says

Code: [Select]
Canon Firmware Version          : Firmware Version 1.00
File Number                     : 100-0011
Camera Temperature              : 33 C
Canon Model ID                  : PowerShot SX430 IS
Thumbnail Image Valid Area      : 0 0 0 0
Date Stamp Mode                 : Off
My Color Mode                   : Off
Firmware Revision               : 1.00 rev 2.00

does the Firmware Revision 1.00 rev 2.00 equal to 100b

by the way ....
so now how do we determine the problem

.... almost 2.45 am so will follow up tomorrow

Re: SX430 - This will be my first porting Attempt
« Reply #21 on: 04 / November / 2018, 22:27:41 »
i made a bootable card with card tricks (4 gb card)

You can do a Bootable Card with another camera, the sx530 is good for it.
Miscellaneous stuff >> SD card >> Make bootable card
The SD card must be formatted as FAT32 before that.

ok will try that out in an hour or so ... but probably that is not the problem ... i have been making cards bootable using cardtricks since a long time it usually works ok

*

Offline reyalp

  • ******
  • 14082
Re: SX430 - This will be my first porting Attempt
« Reply #22 on: 04 / November / 2018, 22:44:11 »
does the Firmware Revision 1.00 rev 2.00 equal to 100b
Yes. If you made a firmware dump, you can also find it by searching for the string "GM1".

ok will try that out in an hour or so ... but probably that is not the problem ... i have been making cards bootable using cardtricks since a long time it usually works ok
I may be missing something, but if the camera crashes and needs the battery removed as you described earlier (https://chdk.setepontos.com/index.php?topic=13569.msg138383#msg138383) then it's not a card configuration problem, it's something in the build. If the CHDK files are ignored (canon firmware boots normally and says card locked) then you have a card configuration issue.

One common cause of freezing / needing the battery taken out is diskboot is not encoded correctly.

You can check for this by putting a long or infinite loop that blinks and LED at the start of loader main.c. If it blinks, then your code is being loaded, and the problem is later in the port. If it doesn't, then it's probably and encoding problem.

Of course, to do that, you need to know how to set an LED on your camera. You can either just guess that it's like some other similar camera, or verify using Canon Basic. If you guess and the LED doesn't blink, then the test is inconclusive.
Don't forget what the H stands for.

Re: SX430 - This will be my first porting Attempt
« Reply #23 on: 05 / November / 2018, 01:49:47 »
does the Firmware Revision 1.00 rev 2.00 equal to 100b
Yes. If you made a firmware dump, you can also find it by searching for the string "GM1".

ok will try that out in an hour or so ... but probably that is not the problem ... i have been making cards bootable using cardtricks since a long time it usually works ok
I may be missing something, but if the camera crashes and needs the battery removed as you described earlier (https://chdk.setepontos.com/index.php?topic=13569.msg138383#msg138383) then it's not a card configuration problem, it's something in the build. If the CHDK files are ignored (canon firmware boots normally and says card locked) then you have a card configuration issue.

One common cause of freezing / needing the battery taken out is diskboot is not encoded correctly.

yes i was having the same feeling .... if the system froze that means that the code was loaded which caused a crash.....
ok .... what should be the next step.....is there a method of finding the LED address so that it can be blinked..... i am going thru the "for developer .... " articles .... but as i have no previous experience with hacking this way ... the information needs to re arrange itself in the mind  :)

although i started the first microcontroller as Z80 (that was an eon ago) and 8051 (in the college almost an eon :) ) - still do some atmel stuff but an arm it seems is an altogether another "beast"

Quote
You can check for this by putting a long or infinite loop that blinks and LED at the start of loader main.c. If it blinks, then your code is being loaded, and the problem is later in the port. If it doesn't, then it's probably and encoding problem.

Of course, to do that, you need to know how to set an LED on your camera. You can either just guess that it's like some other similar camera, or verify using Canon Basic. If you guess and the LED doesn't blink, then the test is inconclusive.


Re: SX430 - This will be my first porting Attempt
« Reply #24 on: 05 / November / 2018, 07:35:24 »
.is there a method of finding the LED address so that it can be blinked..... i am going thru the "for developer .... " articles .... but as i have no previous experience with hacking this way ... the information needs to re arrange itself in the mind  :)
Typically, you can fool around with Canon BASIC - I'm travelling right now so can't point to a better example of how to find LED addresses that way than this :

You can try poking the LED addresses from Canon Basic (I'm not sure whether it will work, it doesn't on DIGIC6) with the Poke32 command (registered by System.Create).

Here's a little on using Canon BASIC for this :

link>   Canon Basic : LED test

and this really old example :

link>  Re: CHDK for A570IS - GOOD NEWS

Sorry.

Or you can try the blinking code (commented out) that I used with the G16 loader :

link> CHDK G16 Loader main.c source file

I think @srsa_4c gave me the LED addresses to try - I assume he dug those out of the dissassembly of the G16 using his knowledge of the normal rountines Canon uses that reference the LEDS?

edit :  something like this : Re: chdk in the DIGIC6 world reply#2
« Last Edit: 05 / November / 2018, 08:01:13 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SX430 - This will be my first porting Attempt
« Reply #25 on: 05 / November / 2018, 08:12:04 »
thank you for all the links .... will go thru them presently and your code refrences

Re: SX430 - This will be my first porting Attempt
« Reply #26 on: 05 / November / 2018, 08:29:17 »
thank you for all the links .... will go thru them presently and your code refrences
I just noticed that the SX430 is a Digic4+.  The LED blinking code might work better using code from a Digic4 camera (the G16 example is Digic6).  Here's another link :

link> CHDK G10 Loader main.c source file

BTW - @reyalp or @srsa_4c will be able to give much more specific advice but they tend to check-in later in the day so I've given you a jump on things. 
« Last Edit: 05 / November / 2018, 08:33:33 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14082
Re: SX430 - This will be my first porting Attempt
« Reply #27 on: 05 / November / 2018, 13:14:03 »
thank you for all the links .... will go thru them presently and your code refrences
One thing to watch out for: How an LED is controlled varies by model. It's all some form of "set some magic value in some MMIO address" but they've changed over the years. Cameras using the same digic version and released closer together in time often use the same values and address.

Of ported cameras, SX430 looks closest ELPH180. On this camera, the MMIO for the green activity LED is 0xc022d1fc. Setting 0x93d800 turns it on, 0x83dc00 turns it off. These can be found in platform/ixus175_elph180/lib.c debug_led()

Most other recent, non-digic 6 cameras do the same, so this seems like a good guess.

Note the Canon Basic LED test waterwingz linked uses the LEDDrive function, which won't be available from loader and won't tell you what the hardware values are. If you want to test in Canon Basic, You'll want to use something like
Code: [Select]
led_pr=0xc022d1fc
*led_pr=0x93d800
Don't forget what the H stands for.


*

Offline srsa_4c

  • ******
  • 4451
Re: SX430 - This will be my first porting Attempt
« Reply #28 on: 05 / November / 2018, 18:58:20 »
FWIW, the sigfinder should identify the 2 LEDs correctly - their addresses can be found in stubs_entry.S (and they happen to match several other recent DIGIC 4+ cams). So, I'd expect debug_led() in platform/sx430is/lib.c to work as is.
Because of this, I see no need for a Canon Basic based research at this point.

I'd like to note that the cam has a new propset which will need to be dealt with later.

Re: SX430 - This will be my first porting Attempt
« Reply #29 on: 06 / November / 2018, 00:49:32 »
i thank the gurus  :)

so we will assume that the addresses in the stubs_entry.S are ok .... i will check it later when i reach home

 

Related Topics