Player of VX File

Discussion in 'NDS - ROM Hacking and Translations' started by Daviex, Dec 26, 2008.

Dec 26, 2008

Player of VX File by Daviex at 4:43 PM (4,025 Views / 0 Likes) 14 replies

  1. Daviex
    OP

    Member Daviex GBAtemp Regular

    Joined:
    May 23, 2008
    Messages:
    101
    Country:
    Italy
    Hello to all, I played a Time Hollow, and wanted to extract the various video game, just as they are extensions. Vx, some of you know a program for them to become fathers or a player to make them leave? thanks

    Scuse me for english [​IMG]
     
  2. Morgawr

    Member Morgawr GBAtemp Fan

    Joined:
    Dec 18, 2008
    Messages:
    330
    Country:
    Italy
    As much as I understood it (since I'm Italian as well I got the grasp of it) he's asking for a .vx file video player... I don't know if it exists or even what a .vx file is so.. :\
     
  3. shineek

    Member shineek GBAtemp Regular

    Joined:
    Jul 14, 2007
    Messages:
    256
    Country:
    Poland
    i tried it with linux mplayer but no effect , so theres probably no player or codec for it (linux's mplayer play's mostly everything )
     
  4. DarthNemesis

    Member DarthNemesis GBAtemp Maniac

    Joined:
    Feb 19, 2008
    Messages:
    1,208
    Country:
    United States
    That's because it's a proprietary format (ActImagine).
     
  5. Videogamer555

    Newcomer Videogamer555 Member

    Joined:
    Aug 17, 2010
    Messages:
    18
    Country:
    United States
    And so was the FLV format (used by flash and Youtube) but the people at VLC (Videolan) managed to reverse engineer it and put it in their player (since then it's become public knowledge). But at one pont FLV file was synonymous with "pirating videos illegally ripped from youtube", and it absolutely was NOT a publicly documented video format. Yet Videolan managed to reverse engineer the FLV format and include it in their player. There's no reason why one should not be able to reverse engineer the VX coded used in NDS games' videos.

    In fact I'm counting on that, as I got a stash of VX files ripped from a NDS rom I have and wanna try playing them.
     
  6. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,712
    Country:
    United Kingdom
    Flash had a bit more going for it/incentive to reverse engineer not to mention based one some more known methods.

    VX being shared across many games means you can probably find a game to inject your video into and grab it there. A similar method is used by the presently best SDAT ripping methods (caitsith2 and snakemeat's stuff) so it does work- desmume has a rather nice video grabber these days.

    My usual example as to why nobody has reversed it yet is to point at http://www.cmlab.csie.ntu.edu.tw/cml/dsp/t...g/coding/mpeg1/

    pixels (2d graphics) are just that, compression is usually based on some known method (LZ, huffman, filtering or RLE) with simple concepts, animation can be a bit tricky but still nothing major.
    3d graphics are not that much harder- you have key frames and you have bones. Textures and light are not that bad once you understand the underlying stuff
    sound is usually some form of wave/PCM + wrapper.
    levels are usually static.
    text might get fun but again it is static and easy to toy with.
    game logic is plain to observe and ultimately control
    and so on for all the areas of rom hacking (not saying it is not complex on occasion but all have large things that help it out) but video as you can see from that link is a nightmare and that is something as old/basic and common (video (software) patents make for some interesting ideas) as MPEG- about 20 years old at this point in time.

    Also as for grabbing it from the SDK (not that you mentioned it but many people head here next) I am told it is locked down above and beyond what the main SDK is.
     
  7. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    deosn't really have to do with the vx as I only studied that for camparison purposes... but here is what I got for .vx mods the later version of .vx. I haven't gotten oll the information out yet but I was going to ask normmatt to use the same method he used to grab the decompression routine out of the one game to grab the video routine in C... just to see what is does....

    see the problem is that mobiclip has produced players and simulators for certain phones but those codecs were already public. these are not. They had no plans on making a public free player as that would probably void there contract with nintendo.

    this codec (for both vx and mods) is supposed to take a 4 by 4 sample of the picture rearrange the values form lowest to highest then use a pretty simple system to output it. This is significant and I need to edit this later as I have more on it and as it isn't compression but sampling. which is what is done by other video codecs and the way it gets done is a very big key...

    anyways here is my unfinished look into .mods note there seems to be slightly more information in .mods then there is in .vx but the same principals apply. AS I have already stated I was looking into.mods. what is going to need to be figured out is listed here. If you see a ? after a section it means we need that to have any chance of building a codec that will work...



    bytes 0-5 file signature: 'MODSN3'

    byte 6 '0A' same for all mods

    bytes 7-8 hex number
    add.mods C605
    000.mods 7206
    004.mods 5B02
    007.mods E613
    opening.mods 270B

    bytes c-d '100' 256 in hex video width

    bytes 10-11 'C0' 192 in hex video height

    bytes 17-18 two two byte hex number reverse
    add.mods '0B00'
    000.mods '1E00'
    004.mods '1E01'
    opening.mods '1E02'
    Byte 1A '00', '02' as of yet unknown value
    00 files have FFFFFF00C0000000001300FF7FFFFF segmentation at the end of file (thinking pallete or sound notatation play this when here)
    01 files have ?
    02 files fave pointers at the end of file (accompanied by size?)
    opening.mods pointers point to stuff that start with 0400
    004.mods does not have the sections on the bottom

    bytes 1C-1D sometimes there is a value here 4byte
    add.mods 0's
    000.mods 0's
    004.mods '44AC'
    opening.mods '3075'

    bytes 20-21
    add.mods '7C2F'
    000.mods 'EC25'
    004.mods '5811'
    opening.mods '4829'

    bytes 28-2b file size
    0004.mods 448364 06D76C 437 KB (448,372 bytes), on disk 440 KB (450,560 bytes)
    000.mods 589c1a 1A9C58 '1743960' 1.66mb 1743968
    opening mods 588138 5800248 5.53 mb
    add.mods 28a89C 2664604 size actual 2.54 MB (2,664,620 bytes)on disk 2.54 MB (2,666,496 bytes)

    byte 2c changes from file '01', '02', 'C6'

    byte 30-31 '4845' HE same for every Mods file

    bytes ? total number of video frames in file

    bytes? possibly video depth (8-bit, palettized video)

    .vx files
    have to
    5byte header VXDS
    have the screen sizes 256 (0010) at 08-09, 192 (C0) at 0B 0C
    size of file seems to be different in rom max size(28-2b) is smaller than actual size on disk
    the packed files size(24-27) is listed before it

    as I am seeing 44AC in these files I am thinking that this important (file investigated list in file name 20fps, 44khz stereo at 6db...not sure if I found the pallette or sound stuff.

    regular .mo files prefer a 208 by 160 size, they list file size at 1C-1F. have the same 5 byte type header. According to mobiclip change log the version of the encoder is included in the file...


    sorry there isn't more...
     
  8. Videogamer555

    Newcomer Videogamer555 Member

    Joined:
    Aug 17, 2010
    Messages:
    18
    Country:
    United States
    That sounds like PLEANTY of "incentive" for about every ROM hacker in all of NDS hackerdom to join together in an effort to reverse engineer this codec. And with that much effort, surely SOMEBODY would have made a video player or converter for VX format video files by now. It's been SEVEN YEARS since since the NDS first hit the market, and in all that time not a single hacker (or organized group of hackers) has managed to reverse engineer the codec? This is just INSANE!
     
  9. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,712
    Country:
    United Kingdom
    If videos want to be ripped then emulators get looked at, if videos within a game (or as part of an undub/cross region thing) want swapping then simple filesystem hacks get done (similarly if it is an end game video or something then filesystem stuff returns), normally only subtitles get added to videos or a minor tweak so that is easy enough to do with more conventional graphics hacks and audio is often elsewhere in the file if that wants to be modded.

    A handful of games with plenty of workarounds pales when compared to something that was rapidly rising in the web world. Certainly more information is nice to have but I would/could not fault anybody for calling it low priority.

    That reminds me though, I still need to find one of the DS games using RAD/bink.

    @ rastsan interesting and thanks for the header stuff. If it is that "simple" (quantisation leading to something that owes more than a passing nod to huffman what might be no inter frame work- I will have to try corruption to check that. It would also explain the slowdowns a bit.
     
  10. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    there is about 4 that I know of. I follow your line of thought... with the free encoder from them it would be just as easy to encode a version of the video in bink/rad and replace the video files in game with those, along with adding the asm needed to run the bink/rad video...

    I would like to add though that I have come across a game that uses .mods video with printed text on the bottom of the screen (not encoded in the video) - Digimon story lost evolution. so far the text is editable but because of the way the text is setup you have the english on the bottom and on top in smaller print is ?... which is probably as simple as fixing the fonts that only consists of 2 letters... space and ?. I'll have to get back onto this later.

    EDIT : my mistake I meant to say inazuma eleven 2... what I get for doing 2 things at once.... see later post...
     
  11. Normmatt

    Member Normmatt Former AKAIO Programmer

    Joined:
    Dec 14, 2004
    Messages:
    2,135
    Country:
    New Zealand
    Digimon Lost Evolution uses a compressed .PAK format which contains each frame as lz compressed images. iirc.
     
  12. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    Sorry Normmatt I meant Inazuma Eleven2


    Which by the way has a mods movie gallery included...

    Also a pretty easy to figure out pointer system for the graphics that hold the mods Choose this video images.

    which combined with the games subtitle system for text for the movies - makes copying this methodology to other games an idea...
     
  13. KiC

    Newcomer KiC Member

    Joined:
    Jul 22, 2007
    Messages:
    43
    Country:
    Germany
    Subtitling on the fly is simple. The decompressor creates a totally new image every single frame, so you just have to draw your text over that before you display it. The hardware is set to display a raw VRAM bank at that time (meaning you can't display anything else with that screen), so it's just a 256x192 16bpp bitmap that you have to change. You just need to find the right place to hook your code.
    The decompression code I've seen is... very lengthy and complex (functions with a size of several kb that shift stuff around with every freaking instruction). Probably not a fun thing to reverse engineer.
     
  14. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    for those people like myself where the text is hardcoded in an angle on the screen where the entire screen itself is in need of and edit (for the character has changed looks due to americanization or other). hooking for every frame... oy you went to a lot of work. Doing that type of thing for that many frames....oh man...
    If possible having that would be very handy. I have said before ActImagaine/Mobiclip have no intention of releasing a public player for these.
    Might be slow and painstaking but getting the rest of the functions on the list filled out will help to recreate the codec (at least for playback on the pc)
    the first reason I mentioned the player in Inazuma eleven2 is that that would be very handy for video length and re-encoding into another video. with a file dupe, if a file dupe would work. the problem is that I almost sure the Inazuma eleven videos have the timing function so as to simplify the text being drawn to the screen at the same time.

    the second reason is that there is a timing function at the bottom of these videos that can relate to sound being played and text being drawn.
    Adding a timing on the bottom of the video will not be hard to do and the text drawing routine might be a lot more handy than having to hook an image for every frame you want to replace.

    Either way having those functions you mentioned would be nice. It may not be fun but it will be needed.
     
  15. maodatou

    Newcomer maodatou Newbie

    Joined:
    Apr 15, 2012
    Messages:
    3
    Country:
    China
    Do you know how to add subtitles on the screen when the video is played just like Inazuma eleven3?
     

Share This Page