code you HAVE RUN on your dslr - page 6 - DSLR Hack development - CHDK Forum

code you HAVE RUN on your dslr

  • 141 Replies
  • 75359 Views
*

Offline Seklth

  • **
  • 54
  • 400D
Re: code you HAVE RUN on your dslr
« Reply #50 on: 19 / May / 2008, 15:51:50 »
Advertisements
Hehe, DDD - it is DustDeleteData

@owerlord
if comment call "eventproc_Startup();" - menu not show?

*

Offline Seklth

  • **
  • 54
  • 400D
Re: code you HAVE RUN on your dslr
« Reply #51 on: 19 / May / 2008, 16:16:33 »
@owerlord
>char* nm = "A:/TST.BIN";
correct - A:\\TST.BIN =)

Re: code you HAVE RUN on your dslr
« Reply #52 on: 19 / May / 2008, 18:09:52 »
Oh sorry for not writing*. see you figured out the same ideas.

@Seklth :
yes. DDD is dust detection code - what why I didn't want to run it without being surten that I have the system up.
DDD uses / not \ - I would stick to that.
yes Startup task wake the menu - comment it - and nothing will apear.

@DataGhost
Sorry for delay* - I tested other value (flags) after my earlyer post - 0x46 works on the PTP led.

*)"American Gangster" - quite good.

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: code you HAVE RUN on your dslr
« Reply #53 on: 19 / May / 2008, 18:26:30 »
Nice, so you can now light the PTP LED? Please do tell how, so other people can benefit from that. This might also be usable for dumping the 40D (main firmware in the update file is still encrypted). Apart from that, as said before, that LED will be a great help and your only indication whether or not your code ran succesfully for some time.


Re: code you HAVE RUN on your dslr
« Reply #54 on: 19 / May / 2008, 18:33:52 »
it's just like:
*((long *) 0xC0220000) = 0x48; to light.
*((long *) 0xC0220000) = 0x44; to dark.

If the 40D have the same adresses - there is no problem to do a led-firmware dump.

I made a wierd experiment:
I inserted light-dark instructions on the path from romStart to Startup task, like:
romStart - light
usrInit - dark
usrKernelInit - light
usrRoot - dark
AppInit - light
Startup - first dark
Startup - after calling eventproc_Startup - light

Obserwation:
blink after loading... disapears. then dark. even after the menu apears. wierd.

Re: code you HAVE RUN on your dslr
« Reply #55 on: 19 / May / 2008, 18:51:04 »
this time:
romStart - light
Startup - dark
Srastup - light after eventproc_Startup.

blink after loading - then nothing. I think it means:
1. all the code is runned without delay. i just wakes the lcd and cf with delay.
2. the eventproc_Startup don't return.

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: code you HAVE RUN on your dslr
« Reply #56 on: 19 / May / 2008, 18:53:59 »
Why didn't that work before, then?  ???

Anyway, I suggest lighting the LED only and just once. Recompile your program every time so you can see where execution stops. You can then narrow it down. It's not really reliable to do it like this, because you might not see how many times it blinks and some code may be skipped so that some light/dark switches may never be executed. Even then, I suggest adding a delay, since other code may turn the LED off again (this could also be happening in Startup, for example). Just make a simple loop which does about ten million iterations of nothing, maybe more, maybe less (figure that out yourself) and turn the LED off after the loop finishes. If you're working in ASM, you should do something like
    STMFD SP!, {R0,R1}
    LDR R0, =0xC0220000
    LDR R1, =0x48
    STR R1, [R0]
    LDR R1, =10000000
loop:
    NOP
    NOP
    SUBS R1, R1, #1
    BNE loop
    LDR R1, =0x44
    STR R1, [R0]
    LDMFD SP!, {R0,R1}


Response to last post:
1. Code is likely to execute very fast so you might not see the LED turning on or off
2. It's possible that some functions (tasks) don't return until they finish. Maybe it contains some sort of infinite loop to ensure certain things happen
And as I said, the LED is also controlled by the OS so you'll need the delays to be sure.

By the way, I don't know what your code looks like or how experienced you are, so I may be saying things you already know.

Re: code you HAVE RUN on your dslr
« Reply #57 on: 19 / May / 2008, 19:11:20 »
By the way, I don't know what your code looks like or how experienced you are, so I may be saying things you already know.
You are - don't worry about that :-) The code is nearly whole in C (GNU not DIAB :-).

If I'm thinking right: startup don't exit and it turns off the led. I don't know where - and I don't know why it don't exit.

I tested write file -> eventproc_Startup, in place of eventproc_startup -> write file. It didn't work.
The cf driver initialization have to be in the Startup.

I wouldn'd want to rewrite the start-up - becose I didn't identyfied most of the functions there. but it looks like the only method to get going.


Re: code you HAVE RUN on your dslr
« Reply #58 on: 19 / May / 2008, 19:35:20 »
Analysing the startup. found: Install_mbm29dl64df - I think its Fujitsu 3V memory :-)

> Ok, I'm closing for today. If somebody identyfie some of the Startup proc's I'll be thankfull.
« Last Edit: 19 / May / 2008, 19:59:36 by owerlord »

*

Offline Seklth

  • **
  • 54
  • 400D
Re: code you HAVE RUN on your dslr
« Reply #59 on: 20 / May / 2008, 02:37:57 »
@owerlord
maybe you also test this restart?) code you HAVE RUN on your dslr

And rename eventproc_Startup to task_Startup))

Alse function, that only create file - FF95D674 task_CFTestTask

 

Related Topics