S1 IS - CHDK Releases - CHDK Forum supplierdeeply

S1 IS

  • 28 Replies
  • 20453 Views
*

Offline srsa_4c

  • ******
  • 4451
S1 IS
« on: 26 / May / 2012, 23:04:14 »
Advertisements
Prealpha release for the PowerShot S1 IS.

Don't expect full CHDK functionality.

Works:
- user interface
   issues:
     some UI elements are not aware of a resolution below 360x240 (it's 320x220 in LCD mode here)
     folders with many files can't be easily entered in the file selection box
     the default gray color (and many colors on the palette) look awful on the LCD
    CHDK's screen redraw erases every Canon overlay (graphic, text), enter and exit the Canon menu to make it reappear
- keyboard
   issues:
     zoom lever always operates the zoom in record mode (that means ALT mode too)
     file selection box senses false keypress on entering large folders
- RAW and DNG
   issues:
     The bad pixel creation process can't find any bad pixels
- Av and Tv override
   issues:
     Av is really limited to the 2.8 ... 8 range

Bugs:
- free space display can easily go wrong if you delete files with the file manager OR create a RAM dump
- SD override causes reset
- framebuffer addresses are not completely correct (zebra is wrong, histogram can be incorrect)
... many more

Install:
Copy the contents of the archive to the card.

How to start:
Start in play mode, choose Firm update... from the menu and execute it
The ALT button is the shortcut button.

Only the latest firmware revision is supported (it's displayed as 1.002A when you start the camera in play mode with the ver.req file placed to the root of the CF card and press SET + DISPLAY at the same time)

If you happen to have earlier firmware on the cam, please make a copy of it:
place the extend.m file (attached) into the root of the CF, start the cam in play mode, press the SET button, wait for a few seconds. You can also do this on a camera with a bad CCD. The file will be named ROM.BIN .

The latest official firmware update can be found here: http://chdk.wikia.com/wiki/Official_Canon_firmware_updates

update: prealpha2, stricken out issues above are more or less fixed
update2: newer version towards the end

Source of the project is available at https://www.assembla.com/code/chdk-s1/subversion/nodes/branches/s1-merge
Due to the many changes to CHDK code update to newer CHDK versions is not planned.
« Last Edit: 10 / November / 2012, 22:34:18 by srsa_4c »

*

Offline reyalp

  • ******
  • 14079
Re: S1 IS
« Reply #1 on: 27 / May / 2012, 00:44:32 »
Nice work :D

Interesting that some digic I were x86 (e.g. a70 http://web.archive.org/web/20110718172904/http://rayer.ic.cz/hardware/a70.htm ) but S1 is arm!
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: S1 IS
« Reply #2 on: 27 / May / 2012, 16:33:36 »
Thanks.
I haven't been able to find any other camera with this kind of Digic. Every other Digic (I) camera has the CPU-less version of it. That package is much smaller, and is always used together with a separate x86 MCU. All of those use DOS as OS (which makes them all unsuitable for CHDK).
             
The DIGIC of the S1 ISThe DIGIC in the A85The MCU of the A85

Hmmm, I just realized that Rayer's site is gone  :(. It worked a few months ago, when I downloaded the sources (again) which helped decrypting/dissecting the firmware...
update: Site not gone, only moved.

This is a very interesting camera, together with its firmware. I think, its specifications required a multitasking environment (no other DIGIC (I) camera featured continuous metering, focus, zoom in movie mode). The camera framework has huge differences compared to the one they used for DIGIC II. The property cases and flash params are all identified by strings, and the values they store are also often strings. The event procedures are referenced by their names, and used with ExecuteEventProcedure in the firmware routines. So, the code is full of strcmp and the like. The ARM CPU also seems much less powerful than the one they used in DIGIC II (our benchmark shows about 17MB/s memory read speed), and it's a previous ARM core generation (as I mentioned it elsewhere).
There are interesting DSP-related blobs in the ROM with strings like
predecode_mpeg2() rev-0.10 2001/4/23
decode_mpeg1() rev-0.18 2001/07/09
decode_mpeg2() rev-0.18 2001/07/09
encode_mpeg1() rev-0.20 2001/5/13
encode_mpeg2() rev-0.19 2002/5/13

which IMHO means they could have decided to use MPEG1 or 2 for video. They used MJPEG instead, probably to not compete with their own camcorders... The DSP core is JP51, the one in DIGIC II is JP52.

I'll probably write more about the camera here later.

Needless to say, that this is not a usual port. Almost everything has to be emulated to match the behaviour expected by CHDK. When it gets a few more features, I'll release the source too :)

Of course I also know that 2004 was a long time ago, and this camera was usually manufactured with those flaky Sony plastic case CCDs. (The camera I'm using got a new CCD recently)

   
« Last Edit: 26 / December / 2012, 16:43:14 by srsa_4c »

*

Offline reyalp

  • ******
  • 14079
Re: S1 IS
« Reply #3 on: 02 / June / 2012, 16:54:43 »
Would be interested to see the results of this: http://chdk.setepontos.com/index.php?topic=2139.0 for S1.
Don't forget what the H stands for.


*

Offline srsa_4c

  • ******
  • 4451
Re: S1 IS
« Reply #4 on: 02 / June / 2012, 20:27:52 »
Would be interested to see the results of this: http://chdk.setepontos.com/index.php?topic=2139.0 for S1.
:)
Code: [Select]
Undefined instruction
Exception address: 0x00059a20
Current Processor Status Register: 0x00000013
Task: 0x3b97e4 "tSpyTask2"

### DeveloperAidSystem: Detect Exception in Task ###

Link Register List
Lr017 = 0xff393b64
Lr016 = 0xff381c84
Lr015 = 0xff381a40
Lr014 = 0x3b958c
Lr013 = 0xff371e1c
Lr012 = 0xff3722e8
Lr011 = 0xff372eb8
Lr010 = 0xff378964
Lr009 = 0xff379fdc
Lr008 = 0xff393088
Lr007 = 0xff393a18
Lr006 = 0xff3817c0
Lr005 = 0xff02408c
Lr004 = 0xff023ab4
Lr003 = 0xff018b54
Lr002 = 0xff01ab54
Lr001 = 0x5bbe4

    NAME      ENTRY     TID   PRI  STATUS     PC      SP      FP      LR0      LR1      LR2
------------ -------- ------- --- -------- -------- ------- ------- -------- -------- --------
tSpyTask2       5b1ec  3b97e4  25    Ready ff371650  3b9270  3b9288    5bbe4 ff01ab54 ff018b54
Code: [Select]
00059a20 <debug_read_cpuinfo>:
   59a20: ee101f10 mrc 15, 0, r1, cr0, cr0, {0}
   59a24: e5801000 str r1, [r0]
   59a28: ee101f30 mrc 15, 0, r1, cr0, cr0, {1}
Which is not really a surprise (I planned to try this before I got a working CHDK). http://chdk.wikia.com/wiki/User:Srsa_4c/S1IS_notes#CPU
The above is from the debug output on UART.

Re: S1 IS
« Reply #5 on: 06 / June / 2012, 21:07:54 »
Looks like I picked a good time to get into the CHDK scene, my old camera has got a release!
My camera already had the latest firmware, afraid I can't help with a firmware dump. Canon is always sure to update firmware when you send a camera in for service...at least now I can see what the new CCD is truly capable of in RAW mode. It's surprising to see how much noise reduction Canon applies to the jpeg files, even at ISO 100.

If I run into any serious hiccups I'll let you know. Running well so far... :)


Re: S1 IS
« Reply #6 on: 07 / June / 2012, 13:51:41 »
-The regular interval script works very well, ran it for 10 hours last night on AC power, I'm running another 12 hour sequence right now. I'm only limited by my 256MB card at the moment.

- Setting ND filter to IN leads to the camera locking up entirely, requiring a battery pull to reset. Sometimes it happens right away, sometimes after a minute or two. Probably because the camera doesn't have an ND filter I guess.

-Running Fudgey's Lightning Script killed my alkaline AA's in less than 15 minutes, went from 80% to dead in no time. I thought it might be something wrong with CHDK, but they won't even power the camera in regular Canon OS.
There's probably a number of explanations for this:
Alkaline batteries are garbage.
The CPU strain caused by that script is very power intensive with the emulation required on the S1 IS.
The script was never written for this camera obviously, it was written for DIGIC II & III. Perhaps the script could be optimized (not your problem).

I've also noticed this script on the S1 IS detects the motion very quickly for the first 4-6 shots (100-120ms), then struggles to catch a hit at all as time goes on. Would this be a limitation of the camera's memory?
I've run the same script on a G10 and it didn't have this limitation, but once again, this may be an incompatibility with the script. I will try some other MD scripts to see if they have the same issues.

Forgive my explanations for being very crude, I'm much more photographer than programmer. :)

*

Offline srsa_4c

  • ******
  • 4451
Re: S1 IS
« Reply #7 on: 07 / June / 2012, 14:41:03 »
Thanks for testing!
- Setting ND filter to IN leads to the camera locking up entirely, requiring a battery pull to reset. Sometimes it happens right away, sometimes after a minute or two. Probably because the camera doesn't have an ND filter I guess.
Sorry about that, I should have removed that option.  I did some experimenting with it (the camera appeared to have fully functioning ND-filter control routines - you proved that it's not that stable). Of course, there's no such hardware in the camera.
Quote
-Running Fudgey's Lightning Script killed my alkaline AA's in less than 15 minutes, went from 80% to dead in no time. I thought it might be something wrong with CHDK, but they won't even power the camera in regular Canon OS.
First, the camera's ARM CPU (the one CHDK runs on) seems to be much slower than the one in DIGIC II. Second, as the chip's package is quite large, I think it was made with an older technology and probably draws more power. And, of course alkalines are not really adequate for powering digital cameras.
Quote
I've also noticed this script on the S1 IS detects the motion very quickly for the first 4-6 shots (100-120ms), then struggles to catch a hit at all as time goes on. Would this be a limitation of the camera's memory?
I think it's more likely that the camera's CPU is overwhelmed by the motion detection or there's some memory corruption going on. Is it gradually slowing down or just stops detecting?
I think this camera is not really made for computation-intensive stuff like MD :).

My primary goals with this port are:
- battery / temperature / clock display - done (note that it's normal for the temp display to show nonsense in play mode - the camera doesn't measure temperature there)
- raw - also done
- Tv override - done
- fixing some limitations of the movie mode (like the hard bitrate limit which lowers the video quality when the scene is too detailed)
That said, I'll try to implement what I can.


Re: S1 IS
« Reply #8 on: 07 / June / 2012, 15:44:33 »
The MD script just stops detecting as far as I know, it didn't really concern me at the time because I could simply reset the script. I'll test it some more later on, I was more focused on testing speed rather than endurance.

I'm very impressed with the port, I would say the designation of pre-alpha is too conservative. The G10 full release I'm playing with at work cannot maintain the interval shooting as long. :)

Keep up the excellent work!

Re: S1 IS
« Reply #9 on: 13 / June / 2012, 21:14:33 »
Things are going great now, the skies have been very dark and dangerous for a few days, and the MD script is running without hiccups for dozens of hours at a time, always responding quickly when I walk over to test it.

Now if only these dark skies would put on a proper show... :)

I believe the script only has a problem when trying to detect things consecutively. This can be remedied by having the script restart itself at a more frequent interval.