Endless Paradigm

Full Version: VSMX File Format
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I never really thought I'd actually bother, but I have been doing some investigation into the VSMX file format, found in RCOs from video/music UMDs and two of the lftv RCOs in the PSP's flash0.
The VSMX file is basically a compiled script file which controls stuff like the UMD menus.  I don't know whether VSMX scripts can be used in the XMB or not.
From a string constant I've seen in one of them, I'm guessing that the official Sony script compiler takes a Javascript file as input and outputs the compiled VSMX file, so I will consider a number of things here from a Javascript perspective.

So anyway, this post is just for anyone who happens to be interested in the file format, and doesn't really serve much other purpose.  It's also rather "preliminary" in that it's _really_ incomplete (I've spent some time on this, but not that much).

Okay...


General File Layout
...basically looks like this:
VSMX header
Compiled instructions
String constants
Object property/method names?
Variable/function names

VSMX header

Code:
 Offset  Description
  0x00    ASCII text "VSMX"
  0x04    always 0x10000 (probably version)
  0x08    always 0x34 - probably length of this header or offset of compiled instructions section
  0x0C    length of compiled instructions section
  
  0x10    offset of string constants section
  0x14    length of above section
  0x18    number of string constants? (haven't double checked this)
  
  0x1C    offset of property/method names section
  0x20    length of above section
  0x24    number of property/method names in above section
  
  0x28    offset of variable/function names section
  0x2C    length of above section
  0x30    number of variable/function names in above section



Compiled Instructions
The compiled instructions start at offset 0x34.  An important concept here, I'll refer to as a "group".  A group is a 64-bit sequence, consisting of 2 32-bit values.  The compiled instructions section is entirely made of these groups.
The first value of the group is the identifier and the second specifies any additional information, or is 0 if not used (I will refer to this second value as the argument).
Here's a list of the identifiers that I know:

Code:
 Identifier  Description
      0x01    assign operator (=)
      0x02    string concatenation operator, or perhaps just addition
      
      0x08    negate operator (unary)
      
      0x0E    equivalence operator (==)
      0x0F    less than or equal operator (<=) [am not totally sure about this one]
      
      0x22    end of statement operator? (basically what ";" does)
      0x23    "null" constant?
      0x24    
      0x25    boolean constant?
      0x26    integer constant
      0x27    float constant
      0x28    string constant; the argument is an index to a constant in the string constants section of this file (that is, 0 = first string constant, 1 = second string constant etc)
      
      0x2C    
      0x2D    unnamed variable? argument is some sort of index/identifier
      0x2E    variable; argument is an index in the variable/function names section
      0x2F    object property; argument is an index in the property/method names section
      0x30    object method (argument, same as above)
      0x31    ? seems to reference property/method names section
      
      0x34    array index operator (basically what [ ... ] does)
      
      0x36    assign as array item???
      
      0x39    begin function?  argument is the group index where the function ends, eg if the argument is 0x50, the function would end at 0x50 * 8 + 0x34 = 0x2B4 (absolute file offset)
      0x3A    pointer to "0x3B group" - this acts like an OR operator
      0x3B    start conditional (if) block?  like above two, argument is the group index of where the block ends
      0x3C    call function; the argument here specifies the number of arguments to be passed to the function
      0x3D    like above, except it calls an object method
      0x3E    invoke inbuilt function???
      0x3F    return statement???



For structure, the variables/constants are just listed and operators apply to previous things.
For example, take the following hex sequence of 32-bit values:

Code:
0x2E 0x00 0x26 0x0C 0x01 0x00 0x22 0x00

(for reference purposes, wee'll assume the first variable name is "myVariable")
The above translates to the following Javascript:

Javascript Code
myVariable = 12;

Back to the hex, basically it means:

Code:
{variable-index}0 ("myVariable"), {integer}12, {assign}, {end-statement}


The assign operator gets applied to the previous two values, which happen to be "myVariable" and "12" and does its job on the two.


String constants
This is just a list of unicode (UTF-16) string constants, separated by a single null character (remember, null characters are 16 bits wide in unicode).  There is no alignment.

Object property/method names
Pretty much the same as the string constants section.

Variable/function names
Like above section, except ASCII instead of unicode.

Why am i so stupid ...,i wish im wrong but the vsmx is usualy used for ingame menus or highlighted game icons ...
so if the xmb is not in the mentioned mode it won't be able to use the vsmx.

so what zinga said...
Maybe wee could eventually use this to make custom dvd menu for custom UMD video ISO wee make?
... im completly lost, i wish i had your guyses brains....
Nice research ZiNgA  :)

Mr. Shizzy Wrote:Maybe wee could eventually use this to make custom dvd menu for custom UMD video ISO wee make?

seems to me to be logical. :D
Thanks.

gsmoke Wrote:Why am i so stupid ...,i wish im wrong but the vsmx is usualy used for ingame menus or highlighted game icons ...
Games don't necessarily follow Sony standards.  They could use it maybe, but I highly doubt it.

Mr. Shizzy Wrote:Maybe wee could eventually use this to make custom dvd menu for custom UMD video ISO wee make?
Possible, but the main issue I think is someone coding up a compiler... >_>
ZiNgA BuRgA Wrote:
Mr. Shizzy Wrote:Maybe wee could eventually use this to make custom dvd menu for custom UMD video ISO wee make?
Possible, but the main issue I think is someone coding up a compiler... >_>

Cool !    Yay
I have 3 pilot episodes of an unreleased VH1 cartoon called "Spongebong Hemp Pants"
That would be awesome to make a custom UMD ISO of all three episodes with animated menus ect.      Madwin

Thanks for looking into/sharing this ZiNgA.
Hopefully someday it will lead to more ways for us customization nuts to toy with things   :D
I think that kind of encoding for the javascript (which it's according to SONY is ECMA-262 Javascript) is analog to WAP encoding!....i made a google search about WMLScript encode and i got a pdf file which talk about that encoding ... of course with some sony modification!...(could be already used in some sony product like phones) ...

i watched a video talking about UMD Composer 2 releasing!
and for that point (the RCO creation) ... i see the following...

1- xml input
2- there's embedded java class called movieplayer with some parameters exported like (event_info)
3- all variables and functions under main() .... which means no way to create a custom classes



1- it's
Interesting - thanks for the info.
It's a bit lower level than Javascript, in that it uses jumps rather than higher level logic structures (like if/while etc) and a concept of applying operators on a stack, rather than having them stored in statement form.
i have a Christmas gift i got it somewhere! which describe the whole invention of the UMD technology
how can i send it to you?!...
Pages: 1 2 3 4
Reference URL's