Author Topic: A430 porting started - histogram working  (Read 12814 times)

Offline shentey

  • Rookie
  • *
  • Posts: 14
A430 porting started - histogram working
« on: 21 / June / 2009, 20:49:29 »
Hey folks,

I've been quiet successful in porting the A430 to the CHDK. As you can read in the heading, displaying the histogram of a picture or in shoot mode works.

Until now, I couldn't activate the zebra mode. I figure that certaing services, which are currently deactivated, must be started before this feature can be used. But I don't know yet.

Still, there need some constants/addresses to be found. Everything in lib.c, stubs_min.S, and stubs_entry_2.S that is not commented I didn't touch. This is why I commented out the last 3 task hooks in generic/main.c::createHook(), since the camera won't boot otherwise.

If you are interested in the modifications I have done, or you want to help out, you can find the repo under [1]. The port is based on the A450.

Any help is also very welcome and any comments are very welcome.

Cheers

[1] http://github.com/shentok/chdk-a430/tree/master
« Last Edit: 22 / June / 2009, 20:15:17 by shentey »

Offline pinchies

  • Newbie
  • *
  • Posts: 3
Re: A430 porting started - histogram working
« Reply #1 on: 22 / June / 2009, 18:56:47 »
Wow, this is great news, I was waiting for this for quite some time!
Please, do you think you could upload a built zip file?
Thanks so much!
~pinchies

Offline shentey

  • Rookie
  • *
  • Posts: 14
Re: A430 porting started - histogram working
« Reply #2 on: 22 / June / 2009, 20:11:19 »
Update: Linked to new version of DISKBOOT.BIN including addresses found by zfeet.

Disclaimer
Use at your own risk and understand that this is work in progress. It is possible that you encounter data loss or any other damage to your camera. It might also eat your children!

If you're not intimidated by the above disclaimer, you can download the DISKBOOT.BIN v.3 image for the A430. Note that some things are still deactivated as the camera is not yet fully ported. So don't hesitate to look out for the remaining constants (see my previous post).

The image can be started as usual: Put it in the root directory of your accordingly formatted SD card, lock the card, put the card into your camera, and press the power button. Alternatively, you can rename the image to PS.fir and start it from the firmware update menu (works only when camera is started in view mode).

Have fun!
« Last Edit: 23 / June / 2009, 20:36:21 by shentey »

Offline zfeet

  • Jr. Member
  • **
  • Posts: 67
Re: A430 porting started - histogram working
« Reply #3 on: 23 / June / 2009, 01:34:47 »
Thanks a lot! I still have my a430 so I can test this and see if I can make any improvements.

Offline zfeet

  • Jr. Member
  • **
  • Posts: 67
Re: A430 porting started - histogram working
« Reply #4 on: 23 / June / 2009, 03:21:29 »
Boots and I have been able to take photos and video. Videos are AVI and a lot better quality than before so that's working. RAW doesn't seem to function at the moment.

Offline zfeet

  • Jr. Member
  • **
  • Posts: 67
Re: A430 porting started - histogram working
« Reply #5 on: 23 / June / 2009, 18:50:37 »
The a430 firmware is very similar to a540's so by comparing those I get these addresses:

EnterToCompensationEVF, 0xFFD28268
ExitFromCompensationEVF, 0xFFD282C4

Offline shentey

  • Rookie
  • *
  • Posts: 14
Re: A430 porting started - histogram working
« Reply #6 on: 23 / June / 2009, 19:41:05 »
Hey zfeet,

nice to see you back in the game!

I've uploaded a new version of the firmware including the new addresses and updated the link to DISKBOOT.BIN.

I uncommented the "tMovieReco" and "tExpDrvTas" tasks, though neither of them seem to be started by the A430. I still had to comment out the "tCaptSeqTa" as it would crash the camera. Any hints on what those tasks do and what addresses they require are very welcome.

Cheers

Offline zfeet

  • Jr. Member
  • **
  • Posts: 67
Re: A430 porting started - histogram working
« Reply #7 on: 23 / June / 2009, 20:20:28 »
in capt_seq.c  0xFFD2C9B8 would be the correct place to start modifying the file, so the first sub is: sub_FFD2C9B8_my. This would explain the crashes you were experiencing with "tCaptSeqTa".

I noticed that my toolchain doesn't produce working files even if the compilation works perfectly. Which one are you using?

Offline shentey

  • Rookie
  • *
  • Posts: 14
Re: A430 porting started - histogram working
« Reply #8 on: 23 / June / 2009, 20:38:21 »
I use gcc-4.3.3 + binutils-2.18, following the guide on the wiki, on (K)ubuntu 9.04. I can upload the debs if you have *buntu.

I can have a look at capt_seq.c later.
« Last Edit: 23 / June / 2009, 20:39:54 by shentey »

CHDK Forum

Re: A430 porting started - histogram working
« Reply #8 on: 23 / June / 2009, 20:38:21 »

Offline zfeet

  • Jr. Member
  • **
  • Posts: 67
Re: A430 porting started - histogram working
« Reply #9 on: 23 / June / 2009, 20:54:33 »
I use gcc-4.3.3 + binutils-2.18, following the guide on the wiki, on (K)ubuntu 9.04. I can upload the debs if you have *buntu.

I can have a look at capt_seq.c later.

Ok, I'll change to Linux. I'll roll my own, thanks :)

Offline zfeet

  • Jr. Member
  • **
  • Posts: 67
Re: A430 porting started - histogram working
« Reply #10 on: 24 / June / 2009, 00:53:36 »

Offline zfeet

  • Jr. Member
  • **
  • Posts: 67
Re: A430 porting started - histogram working
« Reply #11 on: 24 / June / 2009, 01:43:36 »
Still cannot compile a firmware that boots. Could you please upload your debs so I can test with those.

Offline shentey

  • Rookie
  • *
  • Posts: 14
Re: A430 porting started - histogram working
« Reply #12 on: 24 / June / 2009, 02:49:21 »
Still cannot compile a firmware that boots. Could you please upload your debs so I can test with those.

Sure, here they are: http://www.zshare.net/download/6177271975b721aa/ . Both debs that are contained are not regular debian packages: For instance, they don't list their dependencies.

You should first install binutils and the compiler afterwards. When you install the compiler, issue a --force-all to dpkg, as it will complain about a duplicate file otherwise. Both packages will install to /opt/chdk, so you must adapt our $PATH variable before doing any compilation.

Have fun!  :D
« Last Edit: 24 / June / 2009, 02:52:16 by shentey »

Offline zfeet

  • Jr. Member
  • **
  • Posts: 67
Re: A430 porting started - histogram working
« Reply #13 on: 24 / June / 2009, 14:13:17 »
Nope, still doesn't work. I think the we are using different SVN versions of the CHDK source so could you please upload your whole CHDK tree. I can't think of anything else that could be wrong.

Offline shentey

  • Rookie
  • *
  • Posts: 14
Re: A430 porting started - histogram working
« Reply #14 on: 25 / June / 2009, 03:23:29 »
Sorry that I only did add the changes for the camera itself. I've now checked in the relevant rest of the CHDK into the repository. For me, everything compiles cleanly. Don't forget to place the PRIMARY.BIN into the platform/a430/sub/100b directory.

Cheers
« Last Edit: 25 / June / 2009, 03:29:00 by shentey »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal