While you are on it, could you have a look at the NR-handling? I'm back at work and don't have much time anymore.
If we control NR, we should have a (mostly) complete port of trunk and can start to port the changes to a newer branch with more features.
Yeah... about that....
I'm cheating. For starters, the keyboard stuff seems to be a lot different, I haven't figured it out anyway (some functions don't exist and the layout seems to differ from both the S3 and the A720, though I could be terribly wrong). The only keys I can see now is the shoot key (none, half and full) and the power-'key' (the twist-wheel thingy). Both are still handled by the OS, I can use the shoot key for browsing through my on-screen hexdump if I'm using a locked memory card, because it won't take a picture in that case.
Anyway, what I did was... add a LONG delay to the boot process, so I have time to actually switch my SD card. As you can see in
this short clip, I put in an 8GB SDHC card (not locked) and it re-reads it and that works just fine. I can take pictures now
Anyway, I keep the gui code running from spytask and fetch the shoot-button status. When I press it, it'll reset a counter and it will keep resetting it until I release that button. I coded it so that it would save the contents of the RAW buffer as soon as I release it (counter > 1) :p So what I did was... shoot an image at a couple of seconds shutter time and release the shoot-button as soon as it's done shooting and busy calculating a dark frame. It'll save the buffer before that's done, and the OS will output a jpeg file after that.
I'm really not anywhere near actually hooking the shooting functions yet, so I can't really have a look, sorry. I'm still in the middle of my exams so I don't have a lot of time, either
Anyway, in the meantime I got an idea... I can create several partitions on an SD card. I have 2 8GB SDHC cards and a 32MB card I got from canon (and several 2GB miniSD cards, but they're really for my phone). Now I found out that the OS will read only one partition (
http://dataghost.com/chdk/S5_parse_MBR.txt ) and completely ignore the other, so I'll have to do something about that. Now, as you can see in the code, it should really not be that hard to alter it so that it'll read the second partition instead of the first one (offset everything by 0x10). The thing is, I ran out of time for today and that code seems to be called at least from 5 entries in a jump table just above there, I haven't traced them back yet. If this works out, I can create a small FAT16 partition to boot CHDK and a large FAT32 partition which is then read by the camera after loading the code
That way, it'll be possible to use large SDHC cards with CHDK, as they're becoming increasingly popular, I think.