Rich Appearance Format (RAF): Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
Line 82: Line 82:


=== .JSX ===
=== .JSX ===
The script.js is later on compiled into an intermediate code (.jsx) (with a magic "VSMX" Virtual Script Machine Instructions?)
The script.js is later on compiled into an intermediate code (.jsx) with a magic header "VSMX".
(found also in RCOs from video/music UMDs and two of the lftv RCOs in the PSP's flash0.).


*http://endlessparadigm.com/forum/showthread.php?tid=21485: VSMX file format
*http://endlessparadigm.com/forum/showthread.php?tid=21485: VSMX file format
Virtual Script Machine Instructions (VSMX) file layout:
<pre>
VSMX header
Compiled instructions
String constants
Object property/method names?
Variable/function names
</pre>
==== Header ====
{| class="wikitable" style="text-align: center;"
|-
| style="background-color:#56534D58; color:#000FFF;" |'''Offset'''
| style="background-color:#56534D58; color:#000FFF;" |'''Size'''
| style="background-color:#56534D58; color:#000FFF;" |'''Example (h)'''
| style="background-color:#56534D58; color:#000FFF;" |'''Value (conversion)'''
| style="background-color:#56534D58; color:#000FFF;" |'''Notes'''
|-
| 0x00 || 0x04 || 0x56534D58 ||  || Magic
|-
| 0x04 || 0x04 || 0x00000200 || 0002.0000 || Version?
*v1.0 on PSP RCO RCOs (from video/music UMDs and two lftv RCOs in the PSP's flash0/vsh/ressource/.)?
*V2.0 on PS3 PSJS script.jsx
|-
| 0x08 || 0x04 || 0x34000000 || 34 (52) || header length
|-
| 0x0C || 0x04 || - ||  || length of compiled instructions section
|-
| 0x10 || 0x04 || - ||  || offset of string constants section
|-
| 0x14 || 0x04 || - ||  || length of string constants section
|-
| 0x18 || 0x04 || - ||  || number of string constants (seen: 1 or 2)
|-
| 0x1C || 0x04 || - ||  || offset of property/method section
|-
| 0x20 || 0x04 || - ||  || length of property/method section
|-
| 0x24 || 0x04 || - ||  || number of property/method names
|-
| 0x28 || 0x04 || - ||  || offset of variable/function names section
|-
| 0x2C || 0x04 || - ||  || length of variable/function names section
|-
| 0x30 || 0x04 || - ||  || number of variable/function names section
|-
|}


=Links=
=Links=

Revision as of 03:38, 20 October 2014

Description

RAF (Rich Appearance Format) is a container, used by the animation when PS3 boots (coldboot.raf), and inside dynamic Themes (as the animated scene displayed at the background of the theme)

  • RAF related firmware modules in dev_flashvsh/modules/:
    • raf.sprx <--- generic animations

RAF structure

See: CXML Containers page

RAF tools

Rich Apparence Maker

http://r.a.m.games-hack.fr/index.php

guide http://r.a.m.games-hack.fr/doc/Rich%20Appearance%20Maker%20-%20Quick%20Start%20Guide.pdf

R.A.M on PS3 News: http://www.ps3news.com/ps3-hacks-jailbreak/video-ps3-rich-appearance-maker-r-a-m-beta-is-now-open/

R.A.M on PSX Scene: http://psx-scene.com/forums/content/rich-appearance-maker-r-m-free-beta-now-open-dynamic-theme-maker-2161/

PS3 Color Logo Creator V2.511

PCLC Source: http://tizzyt-archive.blogspot.co.uk/2012/04/playstation-color-logo-creator-v2511.html

PCLC on PS3 News: http://www.ps3news.com/ps3-hacks-jailbreak/ps3-color-logo-creator-v2-50-v2-51-updates-now-available/

PCLC V2.511 Download: http://www.mediafire.com/download/zbb3e07wdx22jub

RAF contents

It must comply with these restrictions :

-Textures size max: 15 mb ( 15728640 Bytes ) ( on RSX local memory at run time )
-Geometry & script size max: 1 mb ( 1048576 Bytes ) ( on main memory at run time ) 
-Actor size max: 1.25mb ( 1310720 Bytes ) ( in the intermediate buffer ) 
-Actor number max: 128
-Cameras: 1
-Lights: 2 (ambient + point)
-Scripts: 1
-Models: 64 (with 8 animations each model)

RAF Scene (.XML)

Models and Lights (.DAE)

Models can be geometric 3D objects, or 3D light points

  • Typical objects and names used:
    • bg.dae
    • ambient_light.dae
    • point_light.dae

Models files contains references to the libraries that were used by the 3D app that build the object

  • Typical entries found in models (3d objects)
    • <asset>
    • <library_physics_scenes>
    • <library_images>
    • <library_materials>
    • <library_effects>
    • <library_geometries>
    • <library_visual_scenes>
    • <scene>
  • Typical entries found in models (3d lights)
    • <asset>
    • <library_physics_scenes>
    • <library_lights>
    • <library_visual_scenes>
    • <scene>

Textures

See Multimedia Formats and Tools page

Before compiling, only .dds and jpeg are supported.

After compiling, Graphics Texture Format (GTF) (is a container for storing one or multiple textures, "pack GTF", data in a layout that can be used as is by RSX).

Script

.JS

script.js (an PlayStation JavaScript, known as PSJS, based on ECMA-262)

ECMA-262: several well-known implementations such as JavaScript, JScript and ActionScript.

Some examples of PS3 theme using PSJS:

.JSX

The script.js is later on compiled into an intermediate code (.jsx) with a magic header "VSMX".

Virtual Script Machine Instructions (VSMX) file layout:

VSMX header
Compiled instructions
String constants
Object property/method names?
Variable/function names

Header

Offset Size Example (h) Value (conversion) Notes
0x00 0x04 0x56534D58 Magic
0x04 0x04 0x00000200 0002.0000 Version?
  • v1.0 on PSP RCO RCOs (from video/music UMDs and two lftv RCOs in the PSP's flash0/vsh/ressource/.)?
  • V2.0 on PS3 PSJS script.jsx
0x08 0x04 0x34000000 34 (52) header length
0x0C 0x04 - length of compiled instructions section
0x10 0x04 - offset of string constants section
0x14 0x04 - length of string constants section
0x18 0x04 - number of string constants (seen: 1 or 2)
0x1C 0x04 - offset of property/method section
0x20 0x04 - length of property/method section
0x24 0x04 - number of property/method names
0x28 0x04 - offset of variable/function names section
0x2C 0x04 - length of variable/function names section
0x30 0x04 - number of variable/function names section

Links