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

ELPH300HS aka IXUS220HS - Porting Thread

  • 899 Replies
  • 396410 Views
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #330 on: 27 / November / 2011, 18:39:22 »
Advertisements
Just dump more than you need and cut it off in text file ?   

All ARM instructions are 32 bit - you can't cut one in half.

It's easy to dump more than I need and cut it off in a text file.  I'm talking about figuring out the size of the function, for addresses.txt.

... and now I've just figured out the Length box counts instructions, not bytes.  Good thing addresses.txt also expects instruction count.  (x86 assembly programmer here, used to variable-sized instructions...)

Okay, in that case, precede each line with the 0-based instruction number, so you can tell at a glance how long the function you're looking at is.

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #331 on: 27 / November / 2011, 18:44:25 »
Alright, I got movie recording working on 1.01a.  :)

I used CHDK-PT to check tommi2water's work, and found only one mistake:

Code: [Select]
BL      sub_FFAE6E5C
should be

Code: [Select]
BL      sub_FFAE6E58
This is in the region that I saw was shifted back 4 bytes in 1.01a.  Nice to see CHDK-PT corroborating my earlier analysis.  8)

Others with 1.01a are invited to test this and see if it fixes the movie recording crash for you too.  Note that the attached binary does not include PS.FI2 (because I have not yet learned the secrets needed to make one), so it must be loaded by auto-boot, not firm update.
« Last Edit: 27 / November / 2011, 18:45:56 by jstanley0 »

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #332 on: 27 / November / 2011, 20:58:19 »
And here's (hopefully) the movie-crash fix for 1.01c.  Those with that firmware version are welcome to test (at your own risk).


Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #333 on: 27 / November / 2011, 21:05:37 »
Meant to ask about another strange thing I saw.

This instruction in the original firmware's movie recording task (present in all three versions; it's a few lines below loc_FF98565C in 1.00c):

Code: [Select]
STRD R2, [R6, #0xF8]
Turned into this in CHDK's version:

Code: [Select]
LDRD    R2, [R6,#0xF8]
Was this intentional?

And tommi, where did you find the key information to make PS.FI2?


Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #334 on: 27 / November / 2011, 21:16:03 »
And here's (hopefully) the movie-crash fix for 1.01c.  Those with that firmware version are welcome to test (at your own risk).

jstanley0- thanks for your efforts.

Movie recording still crashes on 1.01c.  Recording seems to start - image display gets cropped into 16:9 view and record time counter displays 0".  A moment later, screen goes blank and camera freezes. 

Power button turns camera off. No need to remove battery etc.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #335 on: 27 / November / 2011, 21:24:22 »
Meant to ask about another strange thing I saw.

This instruction in the original firmware's movie recording task (present in all three versions; it's a few lines below loc_FF98565C in 1.00c):

Code: [Select]
STRD R2, [R6, #0xF8]
Turned into this in CHDK's version:

Code: [Select]
LDRD    R2, [R6,#0xF8]
Was this intentional?

That looks wrong - was it generated by CHDK-PT? If so it's probably a bug; in which case waterwingz will probably fix it pretty quickly.

Quote
And tommi, where did you find the key information to make PS.FI2?

Send me a personal message with your email address and I'll send you the file.

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)

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #336 on: 27 / November / 2011, 21:32:43 »
Meant to ask about another strange thing I saw.

This instruction in the original firmware's movie recording task (present in all three versions; it's a few lines below loc_FF98565C in 1.00c):

Code: [Select]
STRD R2, [R6, #0xF8]
Turned into this in CHDK's version:

Code: [Select]
LDRD    R2, [R6,#0xF8]
Was this intentional?

That looks wrong - was it generated by CHDK-PT? If so it's probably a bug; in which case waterwingz will probably fix it pretty quickly.

Tell me more - those instructions are exact opposite in meaning. Getting it wrong will certainly break your code.  LDRD & STRD were a major pain to get fixed right in the early versions of CHDK-PT  as they are "new" ARM instructions.   I did a lot of work to make sure I got it right - please post more info and files about what you have found !   Would not be my first mistake.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #337 on: 27 / November / 2011, 21:59:31 »
That looks wrong - was it generated by CHDK-PT? If so it's probably a bug; in which case waterwingz will probably fix it pretty quickly.

Here's the firmware dump (100c) from CHDK-PT with a little context:
Code: [Select]
ROM:FF985674 0xE59630B8 LDR R3, [R6, #0xB8]
ROM:FF985678 0xE58D3000 STR R3, [SP]
ROM:FF98567C 0xE5960090 LDR R0, [R6, #0x90]
ROM:FF985680 0xE1C62FD8 STRD R2, [R6, #0xF8]
ROM:FF985684 0xEB0585F4 BL sub_FFAE6E5C

It's possible that CHDK-PT disassembled 0xE1C62FD8 erroneously into STRD, but the LDRD in CHDK is correct.  I wouldn't know - CHDK-PT is my only ARM disassembler.


« Last Edit: 27 / November / 2011, 22:01:03 by jstanley0 »


Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #338 on: 27 / November / 2011, 22:14:34 »
Movie recording still crashes on 1.01c.  Recording seems to start - image display gets cropped into 16:9 view and record time counter displays 0".  A moment later, screen goes blank and camera freezes. 

Same symptoms I saw before the fix.  I compared 101c\movie_rec.c to CHDK-PT's output again and did not find any other errors.

Just want to make sure you loaded CHDK via a bootable locked SD card, not via firmware update.  If you tried the latter, then you probably booted tommi's latest build instead of mine, because mine did not include PS.FI2 as mentioned a few posts ago.
« Last Edit: 27 / November / 2011, 22:18:02 by jstanley0 »

Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #339 on: 27 / November / 2011, 23:04:19 »
Updated builds for 101a and 101c - these include PS.FI2, so you can launch manually via the firmware update menu.

 

Related Topics