A2500 porting thread - DryOS Development - CHDK Forum

A2500 porting thread

  • 157 Replies
  • 69903 Views
*

Offline nafraf

  • *****
  • 1308
A2500 porting thread
« on: 01 / September / 2013, 21:23:03 »
Advertisements
I started a blind port for A2500. Source code is available here.

I have not created boot files, I started with platform files, I'm using code_gen. Current status: notes.txt.

*

Offline sudipto.sarkar666

  • *
  • 14
  • Hacker/Photographer/Metalhead/Musician/Artist
    • Visioplanet Photography
Re: A2500 porting thread
« Reply #1 on: 01 / September / 2013, 21:47:48 »
I am checking the LED addresses for the green light at the back. It's not 0xC0220120. In fact, it's not even in the range 0xC0220100 to 0xC0220200. It's not in the range 0xC0223000 to 0xC0223100 either. The AF LED is at 0xC0223030 though.

*

Offline sudipto.sarkar666

  • *
  • 14
  • Hacker/Photographer/Metalhead/Musician/Artist
    • Visioplanet Photography
Re: A2500 porting thread
« Reply #2 on: 01 / September / 2013, 21:50:17 »
Also, considering that ver.req and vers.req didn't work on this camera, and ACID doesn't show the DryOS version, how do I find the dryOS version?

Re: A2500 porting thread
« Reply #3 on: 01 / September / 2013, 21:54:23 »
Also, considering that ver.req and vers.req didn't work on this camera, and ACID doesn't show the DryOS version, how do I find the dryOS version?
You don't need to know the dryOS version for anything at this point. 

I am checking the LED addresses for the green light at the back. It's not 0xC0220120. In fact, it's not even in the range 0xC0220100 to 0xC0220200. It's not in the range 0xC0223000 to 0xC0223100 either. The AF LED is at 0xC0223030 though.
Just knowing one LED address is a huge step.   With that,  debugging of the initial code can proceed.  Thanks for doing that.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline sudipto.sarkar666

  • *
  • 14
  • Hacker/Photographer/Metalhead/Musician/Artist
    • Visioplanet Photography
Re: A2500 porting thread
« Reply #4 on: 01 / September / 2013, 22:19:41 »
Also, considering that ver.req and vers.req didn't work on this camera, and ACID doesn't show the DryOS version, how do I find the dryOS version?
You don't need to know the dryOS version for anything at this point. 

I am checking the LED addresses for the green light at the back. It's not 0xC0220120. In fact, it's not even in the range 0xC0220100 to 0xC0220200. It's not in the range 0xC0223000 to 0xC0223100 either. The AF LED is at 0xC0223030 though.
Just knowing one LED address is a huge step.   With that,  debugging of the initial code can proceed.  Thanks for doing that.

Not a problem... :) I could test the code on my camera. But I'm not sure how to build this. I'm on Ubuntu Linux.

*

Offline nafraf

  • *****
  • 1308
Re: A2500 porting thread
« Reply #5 on: 02 / September / 2013, 12:02:06 »
@sudipto.sarkar666
Start here:

Re: A2500 porting thread
« Reply #6 on: 02 / September / 2013, 12:09:41 »
Not a problem... :) I could test the code on my camera. But I'm not sure how to build this. I'm on Ubuntu Linux.
Here's the linux toolchain used for the autobuild :  https://app.box.com/s/2bs0i77srru9d68cy6j5

I use it under Fedora - should work fine under Ubuntu.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline sudipto.sarkar666

  • *
  • 14
  • Hacker/Photographer/Metalhead/Musician/Artist
    • Visioplanet Photography
Re: A2500 porting thread
« Reply #7 on: 03 / September / 2013, 17:42:02 »
Not a problem... :) I could test the code on my camera. But I'm not sure how to build this. I'm on Ubuntu Linux.
Here's the linux toolchain used for the autobuild :  https://app.box.com/s/2bs0i77srru9d68cy6j5

I use it under Fedora - should work fine under Ubuntu.

Cool! I'll try that. Building on Linux was killing me (I tried using the gcc from the disassembler page, but it didn't work). I did make it with the CHDK-Shell though.

So, I checked out nafraf's svn, compiled it (under Windows) and did all that needed to be done.

There's a problem with the boot. When I long press the playback button, the green LED at the back (the LED I couldn't find an address to) blinks. Nothing happens after that.

*

Offline nafraf

  • *****
  • 1308
Re: A2500 porting thread
« Reply #8 on: 03 / September / 2013, 20:13:19 »
@sudipto.sarkar666
Please update your svn working copy. I disabled EXMEM (I have not checked those addresses) and fix power up button detection.
If camera does not boot, a detailed debug (using LED) might be the next step.

*

Offline sudipto.sarkar666

  • *
  • 14
  • Hacker/Photographer/Metalhead/Musician/Artist
    • Visioplanet Photography
Re: A2500 porting thread
« Reply #9 on: 04 / September / 2013, 16:05:47 »
@sudipto.sarkar666
Please update your svn working copy. I disabled EXMEM (I have not checked those addresses) and fix power up button detection.
If camera does not boot, a detailed debug (using LED) might be the next step.

It booted it up twice. And after I turn it off, it does the same thing as before.
The first boot was with the full package (in the bin directory). The second successful boot was with the minimal one. But even after that one, turning it off and then on again did the same thing like yesterday.

Also, when it did turn on, the only keys that were mapped were the ? key, the > key and the movie record key. The shutter button also worked, but I could only check the half pressed state. The half pressed part and the movie part worked when I booted the full build. The text (and the battery icon) was overlapping the firmware text on the screen. The movie record also worked in the full build.

I have never worked with ARM assembly, so I don't really know where to add the LED turning on code as is specified in http://chdk.wikia.com/wiki/Debugging#Assembler. Could you share that so I can do an LED debug?

Also, I figured out and verified the back LED address. Found it in the .dis file generated by dissasemble.pl (Searched for the AF_LED address). I have updated it in the wiki page.

Also, if there is a guide to how you guys do the actual dis-assembly in this case (the GPL Disassemblers' page only has how to disassemble and not how to figure out the key addresses and all that), and if it doesn't involve reading the 83 meg .dis file in its entirety, please lemme know.. :)
« Last Edit: 04 / September / 2013, 16:12:13 by sudipto.sarkar666 »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal