Finally! Progress! I rewrote my stuff today, actually reading what's happening, adding debug leds and such... I can now boot the OS entirely with my code... I figured out which sub in Startup_my is responsible for the autoboot stuff, so I commented it out :p I'll thoroughly investigate what it does later on, I don't really have time for that now, I should be studying :p
After booting, it complains the card is locked, of course.. and I can use the camera as I usually would, so that looks OK. Only thing is, when I start the camera in picture-mode, it actually starts in display-mode as well. This is probably due to diskboot.bin, though. I guess that can be fixed later on. It seems that it's loaded anyway, regardless of what mode the camera is started in.
Anyway, I'm not that familiar with tasks and how they interact with the OS yet, but could you just tell me what the blinker is supposed to do? Everything it does it blink the led once, when it's started... after that it doesn't really do anything anymore. I'm currently spawning spytask and blinker, I'll investigate more possibilities somewhere this week.
To whoever is interested:
http://stack.dataghost.com/07012008072.mp4 notice the red led at the lower-right (write led) indicating boot() started, the AF led (long) indicating it's in Startup_my() and the AF led (short) indicating task_blinker was spawned, after which it boots normally
BTW. I have bo problem with [code] tag
bo = no? I meant that the font isn't monospace, so the code looks messed up. I just don't really like that
Edit: ah. I found something... I can confirm that spytask is called properly and actually works, I see a short blink for
*led = 0x46;
msleep(2000);
though not when I reverse those two lines. It seems that control is passed over and never returned for some reason.
Edit2: and the reason is... PEBKAC! I should really look for what is happening before saying "it doesn't work!". msleep calls _SleepTask and I haven't made chdk aware of its location yet.
Edit3: Yay, it's blinking, I can use buttons as long as it displays "Card locked", after that the keyboard is dead and it won't turn off. It still behaves strangely, I'll look into properly fixing that later on. I'm calling it a day.