Author Topic: SD1100/ixus 80 porting ....  (Read 60430 times)

Offline fudgey

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 1690
  • a570is
Re: SD1100/ixus 80 porting ....
« Reply #345 on: 01 / June / 2009, 00:22:12 »
Is get_mode in video mode broken for ixus80_sd1100 or does its video mode work differently from other cams?

http://chdk.setepontos.com/index.php/topic,3688.msg34628.html#msg34628
http://chdk.setepontos.com/index.php/topic,471.msg34640.html#msg34640

Offline DrMaex

  • Rookie
  • *
  • Posts: 9
Re: SD1100/ixus 80 porting ....
« Reply #346 on: 05 / June / 2009, 03:08:26 »
I had modify the script you posted because the console disappers in Video and Play mode very quickly.

I ran it in all 3 modes and got as the result

No Video Button
Rec Mode in Rec Mode
Play Mode in Video and Play Mode

here is my version
Code: [Select]
@title modetest
print_screen 1
V=get_video_button
if V=0 then print "No video button."
if V=1 then print "Cam has video button."
M=get_mode
if M=0 then
print_screen 2
print "Rec mode."
endif
if M=1 then
print_screen 3
print "Play mode."
endif
if M=2 then
print_screen 4
print "Video mode."
endif
sleep 5000
IXUS 80IS 1.01A
CHDK ixus80_sd1100-101a-0.9.3-688

Offline captormoonlu

  • Newbie
  • *
  • Posts: 3
Re: SD1100/ixus 80 porting ....
« Reply #347 on: 24 / June / 2009, 21:13:09 »
Is this still being worked on? I'm so looking forward to autostart with >4gb cards.

Offline whoever

  • Sr. Member
  • ****
  • Posts: 280
  • IXUS950
Re: SD1100/ixus 80 porting ....
« Reply #348 on: 24 / June / 2009, 22:56:55 »
Nope, you're out of luck. It appears that Chris looked into it, and included the necessary code in largedisk.c for FW 100c (but not for 101a), but this code doesn't seem to be used in the build. He apparently believed that he needed a large card to test it -- "This is not supported unless I receive a large SD card".

Offline kyndal

  • Rookie
  • *
  • Posts: 5
Re: SD1100/ixus 80 porting ....
« Reply #349 on: 02 / January / 2010, 06:42:18 »
any success with the LED control for the sd1100is ?

i need to interface a motion detection script  to a microcontroller

i have tried several things in both LUA and BAS scripts (set_led)
but no success with the latest trunk

i have poked around and compiled some changes in the source
but  but no luck here either.

i can get a "beep"  but with the environment i need to use it in. noise is going to be an issue.

any ideas?

/Rune Kyndal
SD1100IS 101a,  homebuilt 0.9.9-866

Offline ehmu

  • Rookie
  • *
  • Posts: 14
  • Ixus 90-1.00d
Re: SD1100/ixus 80 porting ....
« Reply #350 on: 11 / January / 2010, 01:14:38 »
any success with the LED control for the sd1100is ?

The specification of UBASIC set_led seems to be a little bit weird.
http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad
set_led a b c
a:4..10 = green, yellow, unused, orange, blue, AF beam, timer

Did you try something like this in platform\ixus80_sd1100\lib.c
Code: [Select]
void ubasic_set_led(int led, int state, int bright)
{
int leds[] = {0x134,0x138,0x134,0x130,0xd4,0x3030,0x3030};  //  green=4 | yellow | (not used) | orange | blue | af beam | timer
// if(led < 4 || led > 10 || led == 6)  //  map to valid params;  no extra TIMER LED (is same as AF)
volatile long *p=(void*)0xc0220000 + leds[(led-4)%sizeof(leds)];
if (state)
p[0]=0x46;
else
p[0]=0x44;
}

I don't own sd1100 - you have to try yourself ;-)
When it works, it should be added to the repository.

Offline Andrey

  • Rookie
  • *
  • Posts: 20
Re: SD1100/ixus 80 porting .... property value for macro mode?
« Reply #351 on: 17 / January / 2010, 12:02:02 »
Can I set SD1100 to Macro using property values?
If so what numbers should I use?

Offline reyalp

  • Guru Member
  • ******
  • Posts: 4492
Re: SD1100/ixus 80 porting ....
« Reply #352 on: 17 / January / 2010, 12:49:18 »
Can I set SD1100 to Macro using property values?
If so what numbers should I use?

According to http://chdk.wikia.com/wiki/Propertycase propcase 6 contains that value for digic III/IV, but is read only. You might want to try it anyway, I think I got the SD990 to use focus at infinity by setting this.
Don't forget what the H stands for.

Offline Andrey

  • Rookie
  • *
  • Posts: 20
Re: SD1100/ixus 80 porting ....
« Reply #353 on: 17 / January / 2010, 23:09:04 »
>> According to http://chdk.wikia.com/wiki/Propertycase propcase 6 contains that value for digic III/IV, but is read only. You might want to try it anyway, I think I got the SD990 to use focus at infinity by setting this.

I tried it - it worked!
set_prop 6 1
turns SD1100 to Macro mode

CHDK Forum

Re: SD1100/ixus 80 porting ....
« Reply #353 on: 17 / January / 2010, 23:09:04 »

Offline reyalp

  • Guru Member
  • ******
  • Posts: 4492
Re: SD1100/ixus 80 porting ....
« Reply #354 on: 18 / January / 2010, 01:08:49 »
Have you checked to make sure it's actually in macro mode, not just displaying the icon in the UI ? If it is, then please add a note on the wiki. (I'm 99% sure I tested this and it worked fine on the SD990, but I don't have the camera any more, so I'm hesitant to do this without confirmation)
Don't forget what the H stands for.

Offline kyndal

  • Rookie
  • *
  • Posts: 5
Re: SD1100/ixus 80 porting ....
« Reply #355 on: 05 / April / 2010, 20:34:02 »
im still trying to gain control of "any" of the LED's on the SD1100is  from ubasic
no success so far.

how do i call the CHDK functions "LED_GREEN_ON /  OFF"  in leds.h leds.c
from ubasic ??

/Kyndal
SD1100IS 101a,  homebuilt 0.9.9-866

Offline Microfunguy

  • Developers
  • Guru Member
  • ****
  • Posts: 3027
    • StereoData Maker
Re: SD1100/ixus 80 porting ....
« Reply #356 on: 05 / April / 2010, 21:10:04 »
I have not followed this thread and do not have time to read it now, but if there is an led at 0xC0220134 the  following should turn it on/off :-

ubasic_set_led(4,0,100)
ubasic_set_led(4,1,100)



David
« Last Edit: 05 / April / 2010, 21:48:05 by Microfunguy »

Offline kyndal

  • Rookie
  • *
  • Posts: 5
Re: SD1100/ixus 80 porting ....
« Reply #357 on: 22 / April / 2010, 19:13:11 »
have been playing around with it for a while now.

and have not been able to get any of the ubasic or LUA Commands to work for
control of any of the LED's with the any of the stock firmwares

I have been doing alot of changes around in the code. 
and at last i have success
turns out that all that is needed is some changes to the code in
(trunk885) /platform/ixus80_sd1100/lib.c

i Forget where i found the code bit. and don't remember if i modified any of the LED addresses myself.
but i replaced the whole  "ubasic_set_led" function (which is all commented out) 
with this

Code: [Select]
void ubasic_set_led(int led, int state, int bright)

{
int leds[] = {0x134,0x138,0x134,0x130,0xd4,0x3030,0x3030};  //  green=4 | yellow | (not used) | orange | blue | af beam | timer
// if(led < 4 || led > 10 || led == 6)  //  map to valid params;  no extra TIMER LED (is same as AF)
volatile long *p=(void*)0xc0220000 + leds[(led-4)%sizeof(leds)];
if (state)
p[0]=0x46;
else
p[0]=0x44;
}

and i got the ubasic "set_led'"  command to work.  the following blinks the blue led

Code: [Select]
@title Test LED Script

sleep 500
print "blue on"
set_led 8 1 60
sleep 500
print "blue off"
set_led 8 0
end

finally i can use the motion detection scripts to trigger
"external hardware"

/Kyndal

SD1100IS 101a,  homebuilt 0.9.9-866

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal