A2500 porting thread - page 2 - DryOS Development - CHDK Forum

A2500 porting thread

  • 157 Replies
  • 71868 Views
*

Offline nafraf

  • *****
  • 1308
Re: A2500 porting thread
« Reply #10 on: 04 / September / 2013, 20:13:50 »
Advertisements
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.
According to your description, it seems that CHDK booted correctly. Did you see CHDK logo during startup?
It seems that you are in ALT mode, KEY_HELP [?] and KEY_VIDEO [ O ] are two buttons which have not been mapped, so they works normally as in Canon firmware.
Is there a "<ALT>" text on bottom of screen?  Press KEY_PLAYBACK [>] to enable/disable ALT mode.
If you press Menu, when ALT mode enabled, is CHDK menu activated?
http://chdk.wikia.com/wiki/CHDK_1.2.0_User_Manual


*

Offline sudipto.sarkar666

  • *
  • 14
  • Hacker/Photographer/Metalhead/Musician/Artist
    • Visioplanet Photography
Re: A2500 porting thread
« Reply #11 on: 05 / September / 2013, 02:35:31 »
Is there a "<ALT>" text on bottom of screen?  Press KEY_PLAYBACK [>] to enable/disable ALT mode.
If you press Menu, when ALT mode enabled, is CHDK menu activated?
http://chdk.wikia.com/wiki/CHDK_1.2.0_User_Manual
I didn't notice if there was an "<ALT>". Will check and update when I get back home.
The
Code: [Select]
MENU button displayed the Canon firmware menu, and since the keys didn't work, I couldn't navigate. And when the camera booted, the CHDK splash screen did show up.

*

Offline nafraf

  • *****
  • 1308
Re: A2500 porting thread
« Reply #12 on: 05 / September / 2013, 10:24:05 »
The MENU button displayed the Canon firmware menu, and since the keys didn't work, I couldn't navigate. And when the camera booted, the CHDK splash screen did show up.
OK, then CHDK is booting correctly. The next step is to solve keyboard issue. Update your working copy, recompile and test again.

*

Offline sudipto.sarkar666

  • *
  • 14
  • Hacker/Photographer/Metalhead/Musician/Artist
    • Visioplanet Photography
Re: A2500 porting thread
« Reply #13 on: 06 / September / 2013, 03:01:22 »
There are a couple of other problems I noticed while testing yesterday.
1. There most definitely isn't an "ALT" at the bottom of the screen, though there is a rectangle with a height of half a millimeter at the bottom left.
2. When I click a photo, the camera crashes.
3. CHDK only boots up when I format the card in my computer and set it up and put in the camera. After a shutdown, CHDK doesn't load and the green LED flashes when clicking the playback button (same problem that existed before the last svn update).

I'll compile the new code and update on it. However, I was checking out the code and have a few questions:

1. How do we get the masks in kbd.c? Because I didn't see any masks in entry_Stub.S.
2. kbd.c says that the order IS important. But comparing to other cameras didn't give me any apparent order other than that 2 comes after 1 and 1 comes after 0.
3. Is the canon key address (third field in the keymap structure) stored in some register and is found at the @ address detected in entry stub?

*

Offline reyalp

  • ******
  • 14128
Re: A2500 porting thread
« Reply #14 on: 06 / September / 2013, 13:15:44 »
The MENU button displayed the Canon firmware menu, and since the keys didn't work, I couldn't navigate. And when the camera booted, the CHDK splash screen did show up.
OK, then CHDK is booting correctly. The next step is to solve keyboard issue. Update your working copy, recompile and test again.
On elph130, the keymap detected by finsig was quite wrong.

1. How do we get the masks in kbd.c? Because I didn't see any masks in entry_Stub.S.
that would be stubs_entry.S, but it could be wrong.

To check it manually, you want to examine all the words of physw_status and see how they change as your press and release keys.

Assuming the display is working, you can do this using the stuff under DEBUG_PRINT_TO_LCD in core/main.c, but making it display the 3 words of physw_status instead of the default value. If PTP is working (should be if you have both kbd and spytask running) you can use that instead with rmem or peek()

Quote
Is the canon key address (third field in the keymap structure) stored in some register and is found at the @ address detected in entry stub?
The key map is
index of word in physw_status, CHDK key id, bit within the word.

The key masks (KEYS_MASK0 etc) specify which of the real values from hardware CHDK may conceal, so generally would be made by ORing together all the recognized keys.

Quote
2. kbd.c says that the order IS important. But comparing to other cameras didn't give me any apparent order other than that 2 comes after 1 and 1 comes after 0.
The order issue comes from shoot_full, which is the combination shoot_half and shoot_full_only.
Don't forget what the H stands for.

*

Offline sudipto.sarkar666

  • *
  • 14
  • Hacker/Photographer/Metalhead/Musician/Artist
    • Visioplanet Photography
Re: A2500 porting thread
« Reply #15 on: 08 / September / 2013, 06:25:38 »
Thanks @reyalp. :)
I was doing brute-force on the keys before I read about the OSD thing. Unfortunately, I pulled an all nighter before reading this post... :D
It looks like the levent and key combinations came up all wrong in stubs_entry.S. I'm attaching the complete (and tested) kbd.c here. @nafraf Please have it updated in the svn.
What do we do next?

Also, I hope a UART isn't required in the lua script doing the EXMEM.VIEW call. If it works, I'll post it's output.
What do I do next?

*

Offline nafraf

  • *****
  • 1308
Re: A2500 porting thread
« Reply #16 on: 08 / September / 2013, 07:39:30 »
Next step: Try to fix capt_seq.c, to avoid camera crash when you take photo.
A2500 is a DryOS R52 camera, you can use ixus140 (unfinished) port as reference.

*

Offline reyalp

  • ******
  • 14128
Re: A2500 porting thread
« Reply #17 on: 08 / September / 2013, 13:47:54 »
Phil fixed the keyboard detection so it now works correctly on elph130, so you can regenerate stubs_entry.S to check what you got.

It also detects some other useful values that were missed before.
« Last Edit: 08 / September / 2013, 16:00:48 by reyalp »
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: A2500 porting thread
« Reply #18 on: 08 / September / 2013, 15:41:30 »
Phil fixed the keyboard detection so it now works correctly on elph130, so you can regenerate stubs_entry.S to check what you got.

It also detects some other useful values that were missed before.

I fixed the modemap, the keymap is probably still wrong.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline reyalp

  • ******
  • 14128
Re: A2500 porting thread
« Reply #19 on: 08 / September / 2013, 16:01:51 »
I fixed the modemap, the keymap is probably still wrong.
Oops, sorry for the confusion.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal