PowerShot SX230 HS - Porting Thread - page 63 - General Discussion and Assistance - CHDK Forum

PowerShot SX230 HS - Porting Thread

  • 686 Replies
  • 190890 Views
Re: PowerShot SX230 HS - Porting Thread
« Reply #620 on: 19 / March / 2013, 21:27:14 »
Advertisements
STICK ignores 'cards' bigger than 64Gb so perhaps the 64Gb SDXC card was actually a bit bigger and STICK thought was over the limit.
I tried with 32GB SDHC and also not detecting the card...
Must be something else?

@helsan :  are you available to help out with a little testing on your PC?


Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4079
Re: PowerShot SX230 HS - Porting Thread
« Reply #621 on: 20 / March / 2013, 12:37:59 »
There's something in this CHDK port that corrupts memory.
Unfortunately, I haven't been able to spot anything obviously wrong in the 1.01b port (boot.c, capt_seq.c, movie_rec.c)... I have only compared the copied fw routines to the originals.

The following code is not right, but it doesn't lead to errors:

Code: [Select]
"loc_FF18DAC8:\n"
//              "BL sub_FF18D008_my\n"
                "BL     movie_time\n"
"label_A:\n"
                "B  loc_FF18DB28\n"
"loc_FF18DAD0:\n"

...

void __attribute__((naked,noinline)) movie_time(){
if( (int)conf.ext_video_time == 1 )
{
asm volatile (
                "BL     sub_FF18D008_my\n"
                "B      label_A\n"
             );
}
else
{
asm volatile (
                "BL     sub_FF18D008\n"
                "B      label_A\n"
             );
}

}
Should be B movie_time instead of BL movie_time.

A further possibility would be that Exmem is getting overwritten (exmem allocation is forced for this port).

*

Offline nafraf

  • *****
  • 1308
Re: PowerShot SX230 HS - Porting Thread
« Reply #622 on: 20 / March / 2013, 14:27:46 »
Should be B movie_time instead of BL movie_time.
The same bug exists in all models using movie_time....

egrep movie_time platform/*/sub/*/movie_rec.c | egrep -v void
Code: [Select]
platform/a1200/sub/100b/movie_rec.c:      "    BL      movie_time\n"                // added
platform/a1200/sub/100c/movie_rec.c:      "    BL      movie_time\n"                // added
platform/ixus230_elph310hs/sub/100a/movie_rec.c:        "    BL     movie_time\n"     //patched
platform/ixus230_elph310hs/sub/100b/movie_rec.c:        "    BL     movie_time\n"     //patched
platform/ixus230_elph310hs/sub/100e/movie_rec.c:        "    BL     movie_time\n" //patched
platform/sx160is/sub/100a/movie_rec.c:// "BL      movie_time\n"  //To do
platform/sx220hs/sub/100a/movie_rec.c:                "BL     movie_time\n"
platform/sx220hs/sub/101a/movie_rec.c:                 "BL      movie_time\n"
platform/sx220hs/sub/101b/movie_rec.c:                "BL     movie_time\n"
platform/sx230hs/sub/100c/movie_rec.c:                "BL     movie_time\n"
platform/sx230hs/sub/101a/movie_rec.c:        "BL     movie_time\n"
platform/sx230hs/sub/101b/movie_rec.c:                "BL     movie_time\n"
platform/sx240hs/sub/100a/movie_rec.c:      "BL     movie_time\n"     //patch
platform/sx240hs/sub/100c/movie_rec.c:      "BL     movie_time\n"     //patch
platform/sx240hs/sub/101a/movie_rec.c:      "BL     movie_time\n"     //patch
platform/sx260hs/sub/100b/movie_rec.c:        "BL     movie_time\n"
platform/sx260hs/sub/100c/movie_rec.c:      "BL     movie_time\n"     //patch
platform/sx260hs/sub/101a/movie_rec.c:      "BL     movie_time\n"     //patch
platform/sx500is/sub/100c/movie_rec.c:// "BL      movie_time\n"  //To do
platform/sx50hs/sub/100b/movie_rec.c: "BL      movie_time\n"
platform/sx50hs/sub/100c/movie_rec.c: "BL      movie_time\n"      //patch
@srsa_4c Could you fix it?

*

Offline srsa_4c

  • ******
  • 4079
Re: PowerShot SX230 HS - Porting Thread
« Reply #623 on: 21 / March / 2013, 11:24:59 »
@srsa_4c Could you fix it?
I could, but as I said, it executes normally, so there's no point. This thing called movie_time could look a bit nicer anyway. Mixing C and ASM in a naked "function" may not always be a good idea.


Re: PowerShot SX230 HS - Porting Thread
« Reply #624 on: 21 / March / 2013, 11:32:29 »
@srsa_4c Could you fix it?
I could, but as I said, it executes normally, so there's no point.
I agree that it will not make any difference.  The BL just stores a "return address" in the L register before branching.  That address  is never used and the link register had nothing of value in it anyway at that point. So its effectively the same as the B instruction with the code as written.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 12302
Re: PowerShot SX230 HS - Porting Thread
« Reply #625 on: 21 / March / 2013, 23:55:42 »
Mixing C and ASM in a naked "function" may not always be a good idea.
In fact, it's illegal according to the GCC doc  http://chdk.wikia.com/wiki/CHDK_Coding_Guidelines#Naked_functions  but we seem to get away with it most of the time...
Don't forget what the H stands for.

Re: PowerShot SX230 HS - Porting Thread
« Reply #626 on: 04 / April / 2013, 09:33:13 »
I recently bought this camera, and was testing the custom ISO options, and when my camera needs more ISO than i define in options (default 800) the camera just stops (simple shut down with the lens out), and i have to restart the camera...

Is this a bug or a problem of this camera??

Re: PowerShot SX230 HS - Porting Thread
« Reply #627 on: 02 / July / 2013, 01:21:40 »
It may be a bug, on my a560 this issue does not happen, though issues like that happen on my 230HS.

Also make sure you are using the proper build for your firmware (eg my camera uses the 101b firmware)


Re: PowerShot SX230 HS - Porting Thread
« Reply #628 on: 18 / September / 2013, 16:37:26 »
Wanted to bump this thread for anyone who has the SX230HS

As of build 3118, the video recording bug where the camera crashed if the OSD is enabled, was fixed by  nafraf.

http://mighty-hoernsche.de/

*

Offline srsa_4c

  • ******
  • 4079
Re: PowerShot SX230 HS - Porting Thread
« Reply #629 on: 11 / November / 2013, 14:34:36 »
New unstable builds for testing the recently found additional memory. Exmem is disabled, superfine JPEG should now work.
The builds are diskboot only.

Testers are encouraged to post their experiences - either positive or negative.

Warning: the download site that hosts the builds may show strong advertising activity, ad-blocking recommended...

sx230 100c: http://www.sendspace.com/file/8ennm2
sx230 101a: http://www.sendspace.com/file/vz0ph3
sx230 101b: http://www.sendspace.com/file/nat1ej

 

Related Topics