Page 1 of 2 12 LastLast
Results 1 to 16 of 17

Thread: A Challenge

  1. #1
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts

    A Challenge

    Hi all

    I'm bored at work so I thought I'd make a quick and simple tool to store all my replay info from GTR.

    However, I cant find a way to open up the replay files (*.vcr) and get the data out - all i want to know is the laptime.

    I know its possible to do this as i know a few hotlap sites where you upload the vcr file and they extract the lap time from it.

    Here is a demo VCR file - Ronald McLinkage
    Anyone know any pointers on how to crack this nut?

    I dont mind what language you use as I should be able to translate it into VB/ASP afterwards.

    Cheers
    Last edited by Spunkey; 13-01-2005 at 04:02 PM.

  2. #2
    Senior Member GAteKeeper's Avatar
    Join Date
    Feb 2004
    Location
    Derbyshire, UK
    Posts
    582
    Thanks
    14
    Thanked
    28 times in 22 posts
    • GAteKeeper's system
      • Motherboard:
      • MSI P67-GD5
      • CPU:
      • Intel i7 2600k
      • Memory:
      • 8Gb Corsair DDR3 1600
      • Storage:
      • ~44TB
      • Graphics card(s):
      • 980Ti
      • PSU:
      • Seasonic S12 600W
      • Case:
      • Lian Li PC-65
      • Operating System:
      • Win10 64bit
      • Monitor(s):
      • Dell U3415W & 2405fpw
      • Internet:
      • 45Mb vDSL
    The page cannot be found
    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
    --------------------------------------------------------------------------------

    Please try the following:

    Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
    If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
    Click the Back button to try another link.
    HTTP Error 404 - File or directory not found.
    Internet Information Services (IIS)

    GK
    Keeper of the Gates of Hell

  3. #3
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    grrrrrr i cant tell if its working or not because SurfControl is blocking the brinkster site

    try this one
    Last edited by Spunkey; 13-01-2005 at 04:03 PM.

  4. #4
    IRN-BRU(tm)
    Join Date
    Aug 2004
    Location
    Milton Keynes
    Posts
    484
    Thanks
    8
    Thanked
    9 times in 7 posts
    what he said, although it wont be easy unless you know the format of the file

    for example you know that it begins with a discriptor chunk, followed by a player vertex chunk, followed by AI vertex chunk, folllowed by the weather flag, followed by the car setup chunk, followed by the lap time. dont know how much you know about file formats here is an idea of i what you are in for:
    PNG image specification - CHUNKS

    edit: new link works

  5. #5
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    i know sweet FA about file formats, being a web monkey by trade
    oh well, i got all afternoon

    Cheers!

  6. #6
    IRN-BRU(tm)
    Join Date
    Aug 2004
    Location
    Milton Keynes
    Posts
    484
    Thanks
    8
    Thanked
    9 times in 7 posts
    you will need to find out where the header and offset for the lap time begins, count through the file that many bytes then read out the time.

    you could also get a hex editor and look through the file manually, the laptime is probably stored as a Long (64 bit number) which you would need to convert to hex on your handy windows calculator.

    you will need to work out the amount of milliseconds the lap took in total and convert it to hex. for example 1.12.43 = (60 * 1000) + (12 * 1000) + 43 = 72043 in hex is 1196b so in a hex editor you'd be looking for 00 00 00 00 00 01 19 6b

  7. #7
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    Cheers for the help so far - turned up a few helpful nuggets.

    Found this one which has a little bit of info - http://filext.com/detaillist.php?extdetail=VCR
    Its the Motocross madness file at the bottom which sounds interesting - it should be the same file format as GTR as it uses the same basic engine. Although the link to the site with the viewer turned up nothing.
    From this I'm assuming the correct MIM type is video/x-vcr

    Searching for this turned up a site which listed all formats. It was shown as
    video/x-vcr|0|0|1
    any ideas what the 001 is?
    for reference PNG was shown as
    image/png|7687|594|149

    I worked out the Hex for the lap time (2.09.804) which comes out to be 01 F8 38. Searching the file using a Hex viewer turned up nothing for this tho

    Could it be the file is encrypted?
    Last edited by Spunkey; 13-01-2005 at 04:49 PM.

  8. #8
    IRN-BRU(tm)
    Join Date
    Aug 2004
    Location
    Milton Keynes
    Posts
    484
    Thanks
    8
    Thanked
    9 times in 7 posts
    it may be encrypted or it may not store it in millis - perhaps it stores them as seperate elements i.e 2 and 9 and 804 - or maybe it stores it as the number of millis seconds from the epoch at the start and end of the lap. Are you sure the time is even recorded as a number in the file - the web sites you mention may simply load the game look at the time and copy it! a replay file would not necessarily need to store the lap time as it could just store the vertex data and play through it - the time would happen to be the same (because computers repeat things well ). i am not certain you are going down the right road looking at MIME types as these are generally used in HTTProtocol to tel a web browser / web server how to decode the following data. To clarify and confuse.

    the HTTP protocol has 3 basic 'chunks' decribed as:
    ----------------------------
    method query (POST, GET, HEAD etc)
    file: name of file
    protocol version: http / 1.1
    ----------------------------
    file headers (MIME type goes here as does content length, tranfer encoding etc)
    ----------------------------
    file data
    ----------------------------end

    a web browser would look at the content type and know that what is being sent is image/png and would know to initialise the PNG reading engine. The png reading engine would expect to find in the file data chunk a set of data that fits the PNG specification. It is the GTR replay specifiaction you are looking for not the identifying information telling you it IS a GTR replay. clear?. no. damn.
    Last edited by Purple; 13-01-2005 at 07:04 PM.

  9. #9
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    hmmm dont think this is going to happen.

    The extraction of the lap time is definately automated. There is a tool you can download from here (click Get Software under competition control centre) which is a client app to upload the vcr file to their server instantly, and there is also this site which does the same, but using a file upload through the browser rather than a client app.

    well I'm stumped, cant find jack on the file specification and i dont think I'm likely to as its a proprietry format.

  10. #10
    IRN-BRU(tm)
    Join Date
    Aug 2004
    Location
    Milton Keynes
    Posts
    484
    Thanks
    8
    Thanked
    9 times in 7 posts
    email the site and ask them if they ahve the file format or are willing to tell you where in the file the time is.

  11. #11
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    geeeeeeeenious *points at forehead*

    I'll let you know what he says

    Cheers for all your help matey *thumbs up*

  12. #12
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    Yes... I'm at it again

    I contacted that site and they said they check each replay manually.... poo.
    However - i know it is possible to automate the process as there is a program called VCR Check that does exactly what i want! It gets the split and lap times, driver name etc.

    I've found that the VCR file itself is a renamed zip file
    The actual replay data is contained within that. The driver name, track and car are all in plain text, however the lap times arent

    I've discovered a few patterns in the hex values, there seems to be a block of 32 bytes repeated 3 times, then a wodge of data, then the 3x32s again and another wodge and so on.
    Still can't figure anything out.

    *edit*
    I've just noticed the 32 byte block is repeated 35 times. In the file there is supposed to be 33 laps... conincidence.. hmmmm

    Heres a link to the file which I'm trying to figure out.... Linky

    And heres a link to the output from the program which does the equivalent of what i want. These are the values I'm trying to find in there somewhere... Linky

    TIA for any help!
    Last edited by Spunkey; 07-04-2005 at 12:38 PM.

  13. #13
    IRN-BRU(tm)
    Join Date
    Aug 2004
    Location
    Milton Keynes
    Posts
    484
    Thanks
    8
    Thanked
    9 times in 7 posts
    i will 'av a gander at the W/E.

    Happy Birthday to me!!

  14. #14
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    Cheers matey!

    Happy birthday!! I knew it was the 7th, but i could never remeber if it was March or April

  15. #15
    IRN-BRU(tm)
    Join Date
    Aug 2004
    Location
    Milton Keynes
    Posts
    484
    Thanks
    8
    Thanked
    9 times in 7 posts
    Quote Originally Posted by rubbishrubbishrubbishrubbishrubbishey
    Cheers matey!

    Happy birthday!! I knew it was the 7th, but i could never remeber if it was March or April
    Cheers mate!

    Windows decided to deactivate the BIOS Management system device driver just to torment me so i have spent a week fixing the bloody thing. Ended up having to do key hole surgery to carefully extract Windows from my gigs and gigs of 'back up data' using the worlds slowest server PC. Then reinstalling. The short version: i havnt looked at the replays yet

    The most annoying thing is i had just found a wicked site for live fo ot ball st reams and dont remeber what it was.

    Edit: Augus..ember twenty.. cough..th??
    Last edited by Purple; 13-04-2005 at 06:36 PM.

  16. #16
    Senior Member
    Join Date
    Jan 2005
    Location
    Manchester
    Posts
    2,899
    Thanks
    67
    Thanked
    180 times in 135 posts
    • Butcher's system
      • Motherboard:
      • MSI Z97 Gaming 3
      • CPU:
      • i7-4790K
      • Memory:
      • 8 GB Corsair 1866 MHz
      • Storage:
      • 120GB SSD, 240GB SSD, 2TB HDD
      • Graphics card(s):
      • MSI GTX 970
      • PSU:
      • Antec 650W
      • Case:
      • Big Black Cube!
      • Operating System:
      • Windows 7
    Quote Originally Posted by Purple
    you will need to find out where the header and offset for the lap time begins, count through the file that many bytes then read out the time.

    you could also get a hex editor and look through the file manually, the laptime is probably stored as a Long (64 bit number) which you would need to convert to hex on your handy windows calculator.

    you will need to work out the amount of milliseconds the lap took in total and convert it to hex. for example 1.12.43 = (60 * 1000) + (12 * 1000) + 43 = 72043 in hex is 1196b so in a hex editor you'd be looking for 00 00 00 00 00 01 19 6b
    Intel chips are little-endian so it would be stored 6b 19 01 00 00 00 00 00. Confused now?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. World Challenge
    By midzt in forum General Discussion
    Replies: 8
    Last Post: 26-10-2004, 11:31 AM
  2. A challenge for you lot
    By MAS in forum PC Hardware and Components
    Replies: 12
    Last Post: 19-10-2004, 01:28 PM
  3. And the challenge today is... (1st Oct)
    By Nick in forum General Discussion
    Replies: 9
    Last Post: 01-10-2004, 11:16 PM
  4. Minesweeper flag challenge.
    By dkmech in forum Gaming
    Replies: 0
    Last Post: 06-08-2004, 12:16 PM
  5. Are you up to an artistic challenge ?
    By Drunken Poncho in forum General Discussion
    Replies: 22
    Last Post: 18-10-2003, 01:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •