A1100 IS Porting thread - page 41 - DryOS Development - CHDK Forum
supplierdeeply

A1100 IS Porting thread

  • 647 Replies
  • 240324 Views
Re: A1100 IS Porting thread
« Reply #400 on: 03 / November / 2010, 11:33:21 »
Advertisements
I tried the LUA libtest and it seemed to work just fine on the A1100 IS 100c from bvv-cp back in Jun, now all i have to do is learn to program in luA, hahaha. This is similar to what you might see if you run the test :

test log opened
platform: a1100 100c
version: CHDK 0.9.9 built on Jun 23 2010 14:25:21
os: dryos platformid: 12739
***test io***
file info for io.input: closed file!
file info for io.output: valid file
 ptr: 2434832 fd: 3 len: 215 pos: 215
 raw vals: 0:3 4:215 8:1 12:215 16:1 20:1 24:1076243008 28:0 32:1819029313
io.open("A/iotest0.txt","w+b"): OK PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:seek("set",4): OK 4 PASS
A/iotest0.txt:read(5): string [slick]
A/iotest0.txt:seek("nil",nil): OK 9 PASS
A/iotest0.txt:seek("cur",-5): OK 4 PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:seek("end",nil): OK 44 PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:flush(): OK PASS
A/iotest0.txt:seek("set",nil): OK 0 PASS
test file:lines()
0: [the quick brown fox jumps over the lazy dog]
1: [1]
2: [2a   3 1234567890       b]
A/iotest0.txt:seek("set",nil): OK 0 PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:seek("set",nil): OK 0 PASS
test file:read("*a")
A/iotest0.txt:read(*a): string [                                           
1
2a   3 1234567890       b]
A/iotest0.txt:seek("set",nil): OK 0 PASS
testing file:read("*n")
A/iotest0.txt:read(*n): number [1]
A/iotest0.txt:seek("nil",nil): OK 45 NA
A/iotest0.txt:read(*n): number [2]
A/iotest0.txt:seek("nil",nil): OK 47 NA
A/iotest0.txt:read(*n): <no results>
A/iotest0.txt:seek("nil",nil): OK 47 NA
A/iotest0.txt:read(1): string [a]
A/iotest0.txt:seek("nil",nil): OK 48 NA
A/iotest0.txt:read(*n): number [3]
A/iotest0.txt:seek("nil",nil): OK 52 NA
A/iotest0.txt:read(*n): number [1234567890]
A/iotest0.txt:seek("nil",nil): OK 63 NA
A/iotest0.txt:read(*n): <no results>
A/iotest0.txt:seek("nil",nil): OK 70 NA
A/iotest0.txt:read(1): string
A/iotest0.txt:seek("nil",nil): OK 71 NA
A/iotest0.txt:read(*n): <no results>
A/iotest0.txt:seek("nil",nil): OK 71 NA
A/iotest0.txt:read(1): <no results>
A/iotest0.txt:seek("nil",nil): OK 71 NA
A/iotest0.txt:close(): OK PASS
test open missing file
io.open("A/bogus","r"): ERR msg=A/bogus: error PASS
test open dir
io.open("A/CHDK","r"): ERR msg=A/CHDK: error PASS
io.open("A/iotest0.txt","r"): OK PASS
test invalid seeks
A/iotest0.txt:seek("set",-1): ERR nil PASS
A/iotest0.txt:seek("end",100): ERR nil PASS
A/iotest0.txt:close(): OK PASS
***end io OK***

***test os***
current date Sun Oct 31 11:10:32 2010
os.time(): OK 1288523432 PASS
os.time({day=1,year=1980,month=1,}): OK 315576000 PASS
os.time({day=1,year=1066,month=1,}): ERR PASS
%a [Sun]
%A [Sunday]
%b [Oct]
%B [October]
%c [Sun Oct 31 11:10:32 2010]
%d [31]
%H [11]
%I [11]
%j [304]
%m [10]
%M [10]
%p [AM]
%S [32]
%U [44]
%w
?
%W [43]
%x [10/31/10]
%X [11:10:32]
%y [10]
%Y [2010]
%Z [%Z]
%% [%]
os.mkdir("A/MDTST0"): OK PASS
io.open("A/MDTST0/TEST0.DAT","wb"): OK PASS
A/MDTST0/TEST0.DAT:write(...): OK PASS
A/MDTST0/TEST0.DAT:close(): OK PASS
os.stat("A/MDTST0/TEST0.DAT"): OK PASS
{
 dev=2
 mode=33279
 size=4
 atime=1288483200
 mtime=1288523432
 ctime=1288523432
 blksize=512
 blocks=1
 attrib=32
 is_dir=false
 is_file=true
}
os.utime("A/MDTST0/TEST0.DAT",nil,nil): OK PASS
os.stat("A/MDTST0/TEST0.DAT"): OK PASS
{
 dev=2
 mode=33279
 size=4
 atime=1288483200
 mtime=1288523432
 ctime=1288523432
 blksize=512
 blocks=1
 attrib=32
 is_dir=false
 is_file=true
}
os.utime("A/MDTST0/TEST0.DAT",441806400,472824000): OK PASS
os.stat("A/MDTST0/TEST0.DAT"): OK PASS
{
 dev=2
 mode=33279
 size=4
 atime=441763200
 mtime=472824000
 ctime=1288523432
 blksize=512
 blocks=1
 attrib=32
 is_dir=false
 is_file=true
}
os.stat("A/MDTST0"): OK PASS
{
 dev=2
 mode=16895
 size=32768
 atime=1288483200
 mtime=1288523432
 ctime=1288523432
 blksize=512
 blocks=64
 attrib=16
 is_dir=true
 is_file=false
}
os.rename("A/MDTST0/TEST0.DAT","A/MDTST0/TEST1.DAT): OK PASS
os.listdir("A/MDTST0",nil): OK PASS
{
 1="TEST1.DAT"
}
os.listdir("A/MDTST0",true): OK PASS
{
 1="."
 2=".."
 3="TEST1.DAT"
}
os.remove("A/MDTST0): ERR A/MDTST0: error PASS
os.remove("A/bogus): ERR A/bogus: error PASS
os.listdir("A/bogus",nil): ERR A/bogus: error PASS
os.listdir("A/llibtst.log",nil): OK NA
{
}
os.stat("A/bogus"): ERR A/bogus: error PASS
os.utime("A/bogus",nil,nil): ERR A/bogus: error PASS
os.rename("A/bogus","A/blah): ERR A/bogus: error PASS
os.mkdir("A/CHDK"): ERR A/CHDK: error PASS
os.remove("A/MDTST0/TEST1.DAT): OK PASS
os.remove("A/MDTST0): OK PASS
os.remove("A/iotest0.txt): OK NA
***end os OK***

***test string***
string.byte("test",2): OK 101 PASS
string.char(116,101,115,116): OK test PASS
dump/load: OK test123 PASS
string.find("test 1 2 3F!?","t%s(%d) 2 (%x%x%p%p)$"): OK 4 13 1 3F!? PASS
string.format("%c %d %x %s",100,100,100,"test"): OK d 100 64 test PASS
string.len("\000test"): OK 5 PASS
string.lower("TESTtest"): OK testtest PASS
string.upper("TESTtest"): OK TESTTEST PASS
string.rep("test",2): OK testtest PASS
string.reverse("123"): OK 321 PASS
string.sub("test",-3): OK est PASS
***end string OK***

close test log


Just little things missing in that build like the calander time does not show at the top line, some of the color pallet selection is working incorectly.  I have downloaded lots of the code from the Rersion_3 ?, could not file a ziped file with that code.   But have been unable to compile the code, my ignorance im sure, guess i have not read the instructions close enough.  Lots of fun though.
Canon a1100is 100c, sd1200is 100c



Wikipedia - Hack (computer science), an inelegant but effective solution to a computing problem.

Re: A1100 IS Porting thread
« Reply #401 on: 04 / November / 2010, 15:22:20 »
I would really like to see a new CHDK shell with the A1100 IS 100c on it, if anyone would find the time to do that.  It seems that the JUNE version is working mostly, it just needs tweeking.  Does anyone know what build criteria that JUNE bvv-cp Diskboot is using, his own?, allbest?, finglos?, Microfunguy?, juciphox? or something else?
Canon a1100is 100c, sd1200is 100c



Wikipedia - Hack (computer science), an inelegant but effective solution to a computing problem.

Re: A1100 IS Porting thread
« Reply #402 on: 26 / November / 2010, 23:02:11 »
Hmm. It seems that the site has reduced in activity lately...

Here are my findings for a "quick and dirty" fix for shooting.h
Some values are placed in and some were missing...(Different shooting.h used in build?)
Code: [Select]
const ShutterSpeed shutter_speeds_table[] = {
    {            "512"          }  // 15" (Limit)
    {            "406"          }  // 13"
    {            "322"          }  // 10"
    {            "256"          }  // 8"
    {            "203"          }  // 6"
    {            "161"          }  // 5"
    {            "128"          }  // 4"
    {            "101"          }  // 3"2
    {            "80"           }  // 2"5
    {            "64"           }  // 2"
    {            "50.8"         }  // 1"6
    {            "64"           }  // 2"
    {            "50.8"         }  // 1"6
    {            "40.3"         }  // 1"3
    {            "32"           }  // 1"
    {            "25.4"         }  // 0"8
    {            "20"           }  // 0"6  
    { -12, -384, "15", 15000000 }, // 0"5 Camera gives 16 for the String value. (Different compile?)
    { -11, -352, "13", 13000000 }, // 0"4 Camera gives 12.7 for the String value.
    { -10, -320, "10", 10000000 }, // 0"3
    {  -9, -288, "8",   8000000 }, // 1/4
    {  -8, -256, "6",   6000000 }, // 1/5 Camera gives "6.3" for the String value.
    {  -7, -224, "5",   5000000 }, // 1/6
    {  -6, -192, "4",   4000000 }, // 1/8
    {  -5, -160, "3.2", 3200000 }, // 1/10
    {  -4, -128, "2.5", 2500000 }, // 1/13
    {  -3,  -96, "2",   2000000 }, // 1/15
    {  -2,  -64, "1.6", 1600000 }, // 1/20
    {  -1,  -32, "1.3", 1300000 }, // 1/25
    {   0,    0, "1",   1000000 }, // 1/30
    {   1,   32, "0.8",  800000 }, // 1/40
    {   2,   64, "0.6",  600000 }, // 1/50
    {   3,   96, "0.5",  500000 }, // 1/60
    {   4,  128, "0.4",  400000 }, // 1/80
    {   5,  160, "0.3",  300000 }, // 1/100
    {   6,  192, "1/4",  250000 }, // 1/125
    {   7,  224, "1/5",  200000 }, // 1/160
    {   8,  256, "1/6",  166667 }, // 1/200
    {   9,  288, "1/8",  125000 }, // 1/250
    {  10,  320, "1/10", 100000 }, // 1/320
    {  11,  352, "1/13",  76923 }, // 1/400
    {  12,  384, "1/15",  66667 }, // 1/500
    {  13,  416, "1/20",  50000 }, // 1/640
    {  14,  448, "1/25",  40000 }, // 1/800
    {  15,  480, "1/30",  33333 }, // 1/1000
    {  16,  512, "1/40",  25000 }, // 1/1250
    {  17,  544, "1/50",  20000 }, // 1/1600 (Limit)
    {  18,  576, "1/60",  16667 }, // Gives 1/1600 (Correct by offsetting values)
    {  19,  608, "1/80",  12500 },
    {  20,  640, "1/100", 10000 },
    {  21,  672, "1/125",  8000 },
    {  22,  704, "1/160",  6250 },
    {  23,  736, "1/200",  5000 },
    {  24,  768, "1/250",  4000 },
    {  25,  800, "1/320",  3125 },
    {  26,  832, "1/400",  2500 },
    {  27,  864, "1/500",  2000 },
    {  28,  896, "1/640",  1563 },
    {  29,  928, "1/800",  1250 },
    {  30,  960, "1/1000", 1000 },
    {  31,  992, "1/1250",  800 },
    {  32, 1024, "1/1600",  625 },
};
« Last Edit: 26 / November / 2010, 23:08:19 by awesome71717 »

Re: A1100 IS Porting thread
« Reply #403 on: 27 / November / 2010, 13:54:29 »
Hmm. It seems that the site has reduced in activity lately...

   I think you are right about no activity

Here are my findings for a "quick and dirty" fix for shooting.h
    {            "512"          }  // 15" (Limit)

I'm not sure what you are saying here, I have already taken photos with longer exposure like 30 second and 60 sec. at night..... thats with the JUNE 23 build. 100c

Good to see you posting...

Canon a1100is 100c, sd1200is 100c



Wikipedia - Hack (computer science), an inelegant but effective solution to a computing problem.


Re: A1100 IS Porting thread
« Reply #404 on: 27 / November / 2010, 14:05:59 »
It's glad to see someone is still checking here. I'm having trouble with the CHDK GCC Compiler. I've renamed the directory to use the a2000-100c to compile but it gives a few errors related to the code.

I've been using the diskboot.bin from May. I haven't been able to find a newer one so I can continue testing and fixing. Can you upload yours? The old attachments don't work anymore.

Here is the compiler problem:
Code: [Select]
========== C:\USERS\CHRIS\DESKTOP\CHDK\TRUNK\TRUNK985\BIN\LOGS\ERR-A2000-100C.TXT ==========

luascript.o: In function `luaCB_set_led':
luascript.c:(.text+0x1b48): undefined reference to `camera_set_led'
../lib/ubasic/libubasic.a(ubasic.o): In function `set_led_statement':
ubasic.c:(.text+0x11fa): undefined reference to `camera_set_led'
collect2: ld returned 1 exit status
C:\Users\Chris\Desktop\CHDK\gcc4\bin\gmake.exe[1]: *** [main.elf] Error 1
gmake: *** [all-recursive] Error 1

« Last Edit: 27 / November / 2010, 14:17:36 by awesome71717 »

*

Offline reyalp

  • ******
  • 14121
Re: A1100 IS Porting thread
« Reply #405 on: 27 / November / 2010, 16:33:11 »
Quote
It's glad to see someone is still checking here. I'm having trouble with the CHDK GCC Compiler. I've renamed the directory to use the a2000-100c to compile but it gives a few errors related to the code.
Why would you do that ?

Quote
luascript.c:(.text+0x1b48): undefined reference to `camera_set_led'
This function got renamed recently, and the code you are trying to use probably hasn't been updated. Rename ubasic_set_led to camera_set_led
Don't forget what the H stands for.

Re: A1100 IS Porting thread
« Reply #406 on: 27 / November / 2010, 21:05:56 »
The application doesn't recognize the build "a1100" in platform when I change the trunk. Niether does it add it when I change the .ini file.

Whim said that it should work as long as I use the build of CHDK that the code was built upon. Here: http://a1100ischdk.googlecode.com/svn/trunk/%20a1100ischdk/

Which only has the May 11th, 2010 diskboot.bin, which I already have. I'm not sure if the June one was built off of the svn or done locally, which contains the RAW fix.

EDIT: here is the diskboot.bin I made (attached) and the new place where I will keep my test files, here http://cid-97bd674888a69a1a.office.live.com/browse.aspx/Public/CHDK/a1100is
« Last Edit: 27 / November / 2010, 21:14:03 by awesome71717 »

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: A1100 IS Porting thread
« Reply #407 on: 28 / November / 2010, 05:58:04 »
The application doesn't recognize the build "a1100" in platform when I change the trunk. Niether does it add it when I change the .ini file.
To add a new build to the CHDK-Shell camera list you have to add your build (with the correct name) to buildconf.inc in the build's main directory...also make sure your build uses the same naming convention as the other builds.

To see all changes made in the official trunk since may-2010 have a look to the SVN revision log; there were lots of changes, some may need to be adapted to the old A1100 sources...


Re: A1100 IS Porting thread
« Reply #408 on: 28 / November / 2010, 11:54:27 »
I'm not sure where to add the platform. I only see options for lua, signatures, and stubs.

Code: [Select]
#!build time optional components - comment out the features you dont want to have in your build
OPT_LUA_IOLIB=1
OPT_LUA_OSLIB=1
OPT_GAME_REVERSI=1
OPT_GAME_SOKOBAN=1
OPT_GAME_CONNECT4=1
OPT_GAME_MASTERMIND=1
OPT_CURVES=1
OPT_TEXTREADER=1
OPT_CALENDAR=1
OPT_DEBUGGING=1
OPT_EDGEOVERLAY=1
OPT_LUA_STRLIB=1
#allow Lua to call arbitrary ROM functions and eventprocs
# WARNING: This is DANGEROUS. e.g. call_event_proc("EraseSectorOfRom",...)
# NOTE: the interface for this may change in the future, to support better support buffers etc
#OPT_LUA_CALL_NATIVE=1
#OPT_MD_DEBUG=1
# needs proper fi2.inc in platform/ !!! see http://chdk.setepontos.com/index.php/topic,2995.0.html
#OPT_FI2=1
# if enabled, compiler will produce a lot of warnings, maybe not always correct ones, see http://chdk.setepontos.com/index.php/topic,2509.msg32191.html#msg32191
#OPT_WARNINGS=1
# If enabled (and reference binaries are present in /tools), compiler will generate function signatures
OPT_GEN_SIGS=1
# If enabled (and firmware binaries are present) compiler will update "stubs_entry.S"
OPT_GEN_STUBS=1
# Shall ubasic be compiled into build? not done yet
#!OPT_UBASIC=1
# Shall lua support be compiled into build? not done yet
#!OPT_LUA=1
# the symbols / not done yet
#!OPT_SYMBOLS=1
# for people who won't use lang files at all / not done yet
#!OPT_LANGUAGEINTERFACE=1

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: A1100 IS Porting thread
« Reply #409 on: 28 / November / 2010, 15:34:33 »
I'm not sure where to add the platform.
You need at least the new camera's loader and platform folder, e.g.
\loader\a1100    and
\platform\a1100     (with the correct sub folders)
The makefiles in those folders are recursive and do not need to be modified.

The "new" camera/build must also be included in the main makefile to be visible in the CHDK-Shell cameras list.

There are some more files & folders where adjustments for a new camera (or firmware version) are needed, e.g.
the main makefile, \include\camera.h, makefile.inc, maybe some common files like /core/gui_osd.c...

You may look to the CHDK SVN log to see a sample of integrating a new camera/build into the source tree, e.g. http://tools.assembla.com/chdk/changeset/910

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal