A2200 IS porting thread - page 18 - DryOS Development - CHDK Forum

A2200 IS porting thread

  • 515 Replies
  • 200039 Views
Re: A2200 IS porting thread
« Reply #170 on: 08 / January / 2012, 15:57:50 »
Advertisements
The 1.00D Build that you posted doesn't run. I am not even able to boot the camera with it.

Please attach the address.txt file that you created for 1.00D with CHDK-PT if possible.

Sorry to hear that it didn't work.

I only tried CHDK-PT for stubs_entry_2.S, the boot.c and others I did by disassembling both firmwares, finding the location for the functions, and diff-ing them. But you can make the address.tyt by going trough my code (there is a comment before each assembler block where in the firmware it was found.)

Also, if it doesn't boot, would be useful to know where the camera crashes (did I miss something in the *.c files or is there any specific setting for the 1.00D in entry.S or makefile.inc or ...).

You can debug that by tracing the boot procedure described in "For Developers" wiki and inserting this code to see where it stops (blinking camera LED's, if it blinks before it crashes that part is ok, if not, then the bug is somewhere before you pasted the code):

Code: [Select]
// Debug - green (activity) LED
int j;       
*((volatile int *) 0xC0220130) = 0x46; // Turn on LED
for (j=0; j<0x1000000; j++) // Wait a while
{
     asm volatile ( "nop\n" );
}
*((volatile int *) 0xC0220130) = 0x44; // Turn off LED
for (j=0; j<0x1000000; j++) // Wait a while
{
    asm volatile ( "nop\n" );
}

while (1);
or
Code: [Select]
// Debug - orange (AF) LED
int j;       
*((volatile int *) 0xC02200AC) = 0x46; // Turn on LED
for (j=0; j<0x1000000; j++) // Wait a while
{
     asm volatile ( "nop\n" );
}
*((volatile int *) 0xC02200AC) = 0x44; // Turn off LED
for (j=0; j<0x1000000; j++) // Wait a while
{
    asm volatile ( "nop\n" );
}

while (1);


Good luck!

Re: A2200 IS porting thread
« Reply #171 on: 08 / January / 2012, 16:15:19 »
You can debug that by tracing the boot procedure described in "For Developers" wiki and inserting this code to see where it stops (blinking camera LED's, if it blinks before it crashes that part is ok, if not, then the bug is somewhere before you pasted the code):
Inserting C code like that randomly into assembly language might work sometimes but mostly it will crash the camera when it exits the loop. You can't just clobber registers like that.   

Also,  the delay created by the blink loops can change camera behaviour on startup.   

Something like this is safer even if all it does is turn on the AF LED.

Code: [Select]
" STMFD SP!, {R0,R1} \n"   
" LDR     R0, =0xC02200AC \n"
" MOV     R1, #0x46 \n"
" STR     R1, [R0] \n"
" LDMFD SP!, {R0,R1} \n"
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline dejco

  • *
  • 20
Re: A2200 IS porting thread
« Reply #172 on: 09 / January / 2012, 08:47:55 »
I had some spare time and decided to try out CHDK-PT (works fine under Linux with wine set to XP or newer).

Here is the resulting build of 1.00D firmware to test (I don't have a 1.00D camera): CHDK-a2200-100d-1.0.0_BETA.zip

Also updated source and 1.00B & 1.00C builds:

* beta build (2011.12.29 2012.01.08): CHDK-a2200-100b-1.0.0_BETA.zip firmware version 1.00b, use the Card Lock method
* beta build (2011.12.29 2012.01.08): CHDK-a2200-100c-1.0.0_BETA.zip firmware version 1.00c, use the Card Lock method
* alpha beta source (2011.12.29 2012.01.08): chdk.a2200.zip based on CHDK version 1.0 (stable branch, rev. 1534)

100b: sokoban does not work, and if i record video and try to load script from file camera will freeze

Re: A2200 IS porting thread
« Reply #173 on: 09 / January / 2012, 13:42:54 »
100b: sokoban does not work, and if i record video and try to load script from file camera will freeze

You need to put sokoban's level files on the sd card or it has nothing to load.

If I shoot a video, then go back to shooting mode, I can load new scripts with no problem. Were you trying to load a script while shooting video? Or did you have any other settings enabled?

*

Offline dejco

  • *
  • 20
Re: A2200 IS porting thread
« Reply #174 on: 09 / January / 2012, 13:58:40 »
100b: sokoban does not work, and if i record video and try to load script from file camera will freeze

You need to put sokoban's level files on the sd card or it has nothing to load.

If I shoot a video, then go back to shooting mode, I can load new scripts with no problem. Were you trying to load a script while shooting video? Or did you have any other settings enabled?

while shooting

Re: A2200 IS porting thread
« Reply #175 on: 09 / January / 2012, 14:13:00 »
while shooting

I must admit that I'm new to CHDK and I don't know if this is even supposed to work  ???

Re: A2200 IS porting thread
« Reply #176 on: 14 / January / 2012, 18:02:03 »
Here is the initial working build of 1.00D firmware to test (I'm still testing it on my 1.00D camera):

All the credit goes to mk11174 who has been patiently developing this build with the help of CHDK-PT and compiling it with CHDK-Shell.

The owners of 1.00D firmware, Please test it out and then we can confirm whether this works alright.

Thank you mk11174 once again for this port.

Re: A2200 IS porting thread
« Reply #177 on: 14 / January / 2012, 18:05:25 »
Thank you mk11174 once again for this port.
Interesting - here I thought mk11174 was working on the A3300is.   
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A2200 IS porting thread
« Reply #178 on: 14 / January / 2012, 20:07:13 »
Thank you mk11174 once again for this port.
Interesting - here I thought mk11174 was working on the A3300is.   
no prob, i was but when i was using the a2200 as my ref i noticed he was having issues with the conversion tool and since i finally just figured it myself for my cam i figured i would try converting his for him to see what happened.

this port would not even exist without Nilinhim, so thank you for all your hard work as well, I learned alot reading in this forum while building my port.
« Last Edit: 14 / January / 2012, 20:10:22 by mk11174 »

Re: A2200 IS porting thread
« Reply #179 on: 14 / January / 2012, 22:04:06 »
Here are the converted files for the 100d.

Alls I did was convert the boot.c, cap_seq, and movie_rec then had to tweak the lib.c to comment out the screen refresh, seemed it froze in shoot mode with it, so I added an old code waterwingz came up with awhile back to get it to work for now.

I got confirmation from a 100d version user that it now boots and seems to work for the most part.

So maybe it can be added to this port, but of coarse checked over 1st cause I am just a newbie.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal