Developer-friendly / experimental branch (dataghost)

  • 141 Replies
  • 40013 Views
*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
  • Publish
    Re: Developer-friendly / experimental branch (dataghost)
    « Reply #30 on: 19 / May / 2008, 18:06:11 »
    Advertisements
    edit: Can this be used to find out adress of where "summertime"-flag is stored? attached also a much bigger logfile where i first pressed the keys to achieve "traveltime", then "Hometime", then "home-time+dst", each seperated by completely leaving the (canon) menu. of course i might be a total idiot trying that :D
    Maybe, but also possibly not. A lot of stuff is not logged, the functions have to actually call PutsCameraLog with a string and such before anything ends up in there. I'm also not really familiar with the code corresponding to those log entries (yet), especially the LogicalEvent ones.
    I don't know exactly what you did, which makes reading this log quite hard if I am to find out anything about DST flags. That's why I came up with another idea I'll implement soon: a timer which displays the GetTickCount time (the timestamp that prefixes every log entry) in the screen, so you can easily record a movie which will show the actions executed, to easily correspond the actions to the log file entries :)


    Oh, by the way... quick warning. Make sure to turn off logging before shutting down the camera. Currently, I don't have any code hooked to close the files on shutdown and I'm not sure if the camera does that. I AM pretty sure that it does caching, though (shown by some benchmark irregularities, something I still have to investigate), so if the camera doesn't close the files, parts of the log may be lost. Your mileage may vary.
    « Last Edit: 19 / May / 2008, 18:10:33 by DataGhost »

  • Publish
    Re: Developer-friendly / experimental branch (dataghost)
    « Reply #31 on: 19 / May / 2008, 18:11:43 »
    A minor compiler warning : Implicit declaration of _GetWBStruct in dgmod.c

    *

    Offline DataGhost

    • ****
    • 314
    • EOS 40D, S5IS
      • DataGhost.com
  • Publish
    Re: Developer-friendly / experimental branch (dataghost)
    « Reply #32 on: 19 / May / 2008, 18:28:29 »
    Yeah, I could add a comment in that function. I only used it in the 'code of the day', a.k.a. my place to dump crappy code for quick tests without the hassle of creating new menu entries, etc. I didn't even bother declaring a proper struct, also because I don't know what the values it returns mean. Else I'd have to declare it as _GetWBStruct(Led_control), since I'm abusing the Led_control struct for that (same format) :P I found it cleaner to leave it as is, it works fine.

    *

    Offline PhyrePhoX

    • *****
    • 2253
    • make RAW not WAR
      • PhyreWorX
  • Publish
    Re: Developer-friendly / experimental branch (dataghost)
    « Reply #33 on: 19 / May / 2008, 19:39:51 »
    phew, when i read "oh by the way... quick warning..." i immediately thought you were going to write things like "your camera MIGHT blow up in a giant explosion" or something similar :D
    in my first log, i did disable logging (exited "cleanly"). the second log was exited "dirty" as otherwise it would have meant entering alt-mode again and entering chdk menu etc. doesnt seem to be deprecated though. forget about the DST stuff for now (i guess one of you geniuses will find that one anyway by accident soon :D), don't let that bother you. i hope you can "finish" your branch before you get your dslr, as that would mean you sure would neglect chdk for cheap p&s cams all too soon ;)
    oh, almost forgot: what does a/the profiler do?
    edit: found the answer myself. that does lead to another question though, even if it might sound stupid: can you show me an example you need the profiler for, or you WILL need it for (or have needed it successfully for) regarding chdk? i'm always willing to learn :)
    « Last Edit: 19 / May / 2008, 19:49:58 by PhyrePhoX »


    *

    Offline DataGhost

    • ****
    • 314
    • EOS 40D, S5IS
      • DataGhost.com
  • Publish
    Re: Developer-friendly / experimental branch (dataghost)
    « Reply #34 on: 20 / May / 2008, 07:41:42 »
    I just added (full) A720 support. I trust jeff666' word that the brightness functions are exactly the same, I haven't looked into them (actually, I just remembered "oh yeah I didn't look into that yet"). IS functions should be available, meaning it's probably possible to adjust the IS lens position and use the orientation demo/game.

  • Publish
    Re: Developer-friendly / experimental branch (dataghost)
    « Reply #35 on: 20 / May / 2008, 08:14:46 »
    The author of 'StereoPhoto Maker' has an A570.

    What do you need to know to support that ?

    Maybe you could tell us how to do this .

    *

    Offline DataGhost

    • ****
    • 314
    • EOS 40D, S5IS
      • DataGhost.com
  • Publish
    Re: Developer-friendly / experimental branch (dataghost)
    « Reply #36 on: 20 / May / 2008, 08:23:33 »
    Well, for now it's basically adding the proper NHSTUBs and the address to the cameralog. That still leaves display brightness and LED disco as potential problems, since I didn't make that code 'safe' and platform-independent yet. I'll see if I can find enough stubs in the A570 firmware, I wrote an UltraEdit script to convert a jumptable into a bunch of NHSTUBs so I'll just have to copypaste :)
    I don't know if there are any features you need specifically, but it's probable that some aren't (readily) available on that camera. I'm pretty sure about the log, though.

    Anyway, how to do it... Finding the stubs is just something you should tell a monkey (or a script) to do, else it's a lot of brainless copy-pasting, occasionally swearing at IDA for replacing the (in this case very useful) sub_ADDRESS with a name like unknown_libname_28 or even the name of the function so you have to doubleclick it, copy the address and go back. It's slightly harder if some functions aren't there, you'll really have to analyze the code to figure out how to accomplish the task the function should perform and if it's even possible. That's something even I didn't really start on yet.
    To find the cameralog address, search for PutsCameraLog and refer to the 'documentation' in stubs_min.S.
    LCD brightness addresses are found by reading some LCD brightness controlling functions, though I'm planning on using those actual functions instead, making things much simpler. Currently I do need the addresses to see which display is active, though, but I may have another way of determining that (which is lost in some of my other in-code documentation from a couple of weeks ago).
    « Last Edit: 20 / May / 2008, 08:29:07 by DataGhost »

    *

    Offline DataGhost

    • ****
    • 314
    • EOS 40D, S5IS
      • DataGhost.com
  • Publish
    Re: Developer-friendly / experimental branch (dataghost)
    « Reply #37 on: 20 / May / 2008, 11:34:49 »
    Slight problem with the A570 (not if he has 1.01a): It seems that the jumptable to the 'first part' of the IS functions is not present in the A570 1.00e firmware. I did find the second part, but the main features I'm using are from the first part. The functions do seem to be there, though, but I can't be sure that they're in the same order, so I'll have to manually cross-check them between 1.00e and 1.01a. This might take a while. I'm hoping I can just find a certain value I can add to/subtract from the 1.01e addresses.

    If anyone has 1.00e, please do another firmware dump (just from CHDK... open file, write 0xFFC00000 - 0xFFFFFFFF, close file... or with universal dumper or whatever floats your boat), it could be that some error occurred in dumping the 1.00e firmware. Probably something went wrong with a block write, since 0xFFF34800 - 0xFFF34BFF (0x400 or 1 kB) is all 0xFF, while the rest of the jumptable-interleaving stuff is 0x00. Also, that jumptable works like long pointer_to_function_name; long function_address. At 0xFFF34C00, I see a function address followed by another piece of jump table, so it really looks like it got screwed up somewhere.
    Don't bother sending dumps that have 0xFFFFFFFF at 0xFFF34BFC :P
    « Last Edit: 20 / May / 2008, 11:41:19 by DataGhost »


  • Publish
    Re: Developer-friendly / experimental branch (dataghost)
    « Reply #38 on: 20 / May / 2008, 11:40:01 »
    I would not spend too much time on it.

    He is only interested in the camera logging function.

    The other features are not required.

    If he could also log on the TX1 (he should be getting two of them tomorrow for stereo), he can investigate how to get zoom working.

    *

    Offline DataGhost

    • ****
    • 314
    • EOS 40D, S5IS
      • DataGhost.com
  • Publish
    Re: Developer-friendly / experimental branch (dataghost)
    « Reply #39 on: 20 / May / 2008, 14:51:03 »
    The dump was indeed broken, fudgey supplied me with a proper dump... thanks fudgey :) A570 1.00e is now supported as well. I'll quickly see what I can implement for the TX1 but I think I'll manage adding at least the log address before tomorrow.

    Edit: OK, I'm going to need some help here... I don't have the TX1 1.00g firmware dump (I do have 1.01b) and the links pointing to it seem to be dead. I can only assume the cameralog addresses are the same (as with A570) and that the first nullsub is at the same location, but that's pure speculation. Can someone supply me with that firmware dump?

    Edit2: Bad news: seems that the TX1 has all the IS functions except for the ones I'm using to read out the orientation sensor. I'll see if I can hack up something but I don't know if it'll work.

    Edit3: Good news: I can specify actual function names for an NHSTUB and I added some ASM to handle the missing functions... it should work (1.01b) but again, I'm not sure. There might be a very good reason why those funtions aren't present by default. I'll commit it when I get the TX1 1.00g port done as well.
    « Last Edit: 20 / May / 2008, 16:12:09 by DataGhost »

     

    Related Topics