• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Anyone up for a programming challenge?"

Collapse

  • VectraMan
    replied
    Originally posted by crack_ho View Post
    The answer is 12 (I hope!).
    ++C would be 13.
    Yaay! It was a little bit of a trick question.

    The language really should have been called ++C.

    Leave a comment:


  • crack_ho
    replied
    Originally posted by VectraMan View Post
    Oh, no, no. Back of the class for Nick.

    And it's not 13 either.
    The answer is 12 (I hope!).
    ++C would be 13.

    Leave a comment:


  • gadgetman
    replied
    Can you not do bit twiddling in Java then? Serious question.

    Leave a comment:


  • VectraMan
    replied
    Originally posted by NickFitz View Post
    D, obviously
    Oh, no, no. Back of the class for Nick.

    And it's not 13 either.

    Leave a comment:


  • NickFitz
    replied
    Originally posted by VectraMan View Post
    All this talk of bytes and hex is a bit advanced for a Java programmer isn't it?

    If C is 12, what is C++?
    I'm not a Java programmer in particular; I used to be a games programmer working in assembly language, but that seems like overkill for a project such as this. The only reason I mentioned Java is that I develop on a Mac these days, and I assumed that an OS X app wouldn't really help

    Originally posted by VectraMan View Post
    If C is 12, what is C++?
    D, obviously

    Leave a comment:


  • Moscow Mule
    replied
    Originally posted by gadgetman View Post
    Thanks for that
    You're welcome - I'm just in awe of your extreme nerdyness, well done.

    Leave a comment:


  • gadgetman
    replied
    Thanks for that

    Leave a comment:


  • Moscow Mule
    replied
    Originally posted by gadgetman View Post
    I eventually decided to have a go myself, so armed with a dusty copy of K&R, a download of Tiny C and some web searches on bitmap formats I managed to knock up a command line app over the weekend.

    Its not pretty but it does the job.

    If anyone wants to make a nice Java GUI version I'm open to offers




    Leave a comment:


  • gadgetman
    replied
    I eventually decided to have a go myself, so armed with a dusty copy of K&R, a download of Tiny C and some web searches on bitmap formats I managed to knock up a command line app over the weekend.

    Its not pretty but it does the job.

    If anyone wants to make a nice Java GUI version I'm open to offers

    Leave a comment:


  • luke warm
    replied
    Originally posted by VectraMan View Post
    All this talk of bytes and hex is a bit advanced for a Java programmer isn't it?

    If C is 12, what is C++?
    --BCPL

    Leave a comment:


  • VectraMan
    replied
    Originally posted by NickFitz View Post
    Oh BTW, I assume this is just as it was in the original thread, but you should let that poster know that the row of labels at the top of a hex dump should be "0 1 2 3 4 5 6 7 8 9 A B C D E F", not "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" - one can safely assume that if the reader can make any sense of a hex dump, they must know that "C" means "12"
    All this talk of bytes and hex is a bit advanced for a Java programmer isn't it?

    If C is 12, what is C++?

    Leave a comment:


  • gadgetman
    replied
    Thanks for the reply Nick, I have sent you a PM.

    Yeah, I don't know what he's used to dump the file, seems a little odd. However the info appears to be correct as I've tried manually decoding the height and width values on a couple of different sizes of wallpaper file myself today.

    Originally posted by NickFitz View Post
    Oh BTW, I assume this is just as it was in the original thread, but you should let that poster know that the row of labels at the top of a hex dump should be "0 1 2 3 4 5 6 7 8 9 A B C D E F", not "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" - one can safely assume that if the reader can make any sense of a hex dump, they must know that "C" means "12"

    Leave a comment:


  • NickFitz
    replied
    Oh BTW, I assume this is just as it was in the original thread, but you should let that poster know that the row of labels at the top of a hex dump should be "0 1 2 3 4 5 6 7 8 9 A B C D E F", not "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" - one can safely assume that if the reader can make any sense of a hex dump, they must know that "C" means "12"

    Leave a comment:


  • NickFitz
    replied
    Originally posted by gadgetman View Post
    I have an Archos 605 media player which apparently uses a proprietary format for the graphics files used as wallpaper.

    <snip>

    One file I have starts like this:

    Code:
    [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0123456789012345]
    000000: 12 46 54 41 00 EE 02 00 00 00 01 EE 04 00 00 00 |.FTA............|
    000016: 00 00 02 EE 04 00 00 00 00 00 03 EE 02 00 20 03 |.............. .|
    000032: 04 EE 02 00 E0 01 08 EE 80 00 02 00 00 00 00 00 |................|
    000048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    000064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|


    FTA = ATF backwards and lots of 00 and EE, but also 0x0320 and 0x01E which is 800 and 480.
    now 800 x 480 x 2 = 768000 and the file size is 769028 = 768000 + 1028

    So, look like uncompressed 16bit per sample, most likely YUV and a small header at the start. [/CODE]

    Anyone here willing to take a crack at this?
    Got a link to the forum & thread with that post in, and maybe two or three sample files? Digging through hex dumps reverse engineering file formats is something I quite enjoy doing on a quiet afternoon (it reminds me of the Eighties, when I actually got paid for doing stuff like that) so I'd be willing to have a go at deciphering the file format, at least

    As for creating an app to do the conversion: it would have to be Java (cross-platform), or I could look into creating a web app and do the heavy lifting on the server with something like Python or Java or even PHP (yes, really, it's possible) - but I'm not learning Win32 API programming just for fun

    PM me if you don't want to post the links here, although I'm not promising anything, and I'm at conferences until Monday, when I settle back on to the bench

    Leave a comment:


  • Jaws
    replied
    Originally posted by VectraMan View Post
    I wonder what all the EEs are for.
    238

    HTH
    Last edited by Jaws; 29 May 2008, 23:05.

    Leave a comment:

Working...
X