Coldboot.raf

From PS3 Developer wiki
Jump to: navigation, search

Description[edit]

dev_flash\vsh\resource\coldboot.raf is the animation when PS3 boots, introduced in firmware 2.70 with raf.sprx and raf.qrc as support.

Rich Appearance Format (RAF) belongs to a group of CXML Containers that uses zlib compression and a XML file enbedded in the container structure with the "scene" information and also works as an index to lists the contained files

Coldboot animation uses settings from the RCOXML of custom render plugin (in RCOXML setion note the animation settings for: anim_coldboot and anim_coldboot2)

Coldboot.raf is the same file in all firmware versions, doesnt contains sound, but is played with sound by using either coldboot_stereo.ac3 (2 audio channels) or coldboot_multi.ac3 (6 audio channels), this audio files has been present from firmware 1.00 but have changed (and also changed the coldboot animations settings inside the RCOXML of custom_render_plugin). See: Multimedia Formats and Tools

http://rghost.net/58821375 the coldboot.raf compiled into a theme (Apply again to get the animation again)

Coldboot Animation (.RAF)[edit]

coldboot.raf versions
File Name Size
(bytes)
Hash
(MD5)
Firmware Notes
1.00~2.60 2.70~2.80 3.00~3.01 3.10~4.78
coldboot.raf 51.446 FBFD819D6CD834AC2BDDA02EE3D5375F No Yes Not present before 2.70, same for all other firmwares

To extract the files from coldboot.raf is needed to make a zlib decompression and then a CXML extraction (use "CXML decompiler" tool made by flatz, download link and source code is at bottom of CXML Containers page). The extracted files are:

coldboot.raf contents
Usage File Index Converted File Original File Notes
Name MD5 Name MD5
Scene metadata coldboot.sxml vary with compiler/extractor version coldboot.xml vary with coding style The original scene coldboot.xml is converted to coldboot.sxml and then embedded inside RAF structure as metadata
Model 0 plane.edge AC3AA7B2AE225DD1C2BB207ADDD4C2CB plane.dae vary with collada settings The 3D object, composed by a simple perimetral line that will be "filled" with the textures
1 plane.skel 67409457645F98B0066B52317BF4CB78 The skeleton of the 3D object, composed by a single joint point, needed by all the animations
Textures 2 new_logo.gtf 6BEEA65407EE1513F08F66E17BBADF61 new_logo.dds A4AF73E19F8E07542C5FA3DA39C21967 700x350 pixels, the main logo (without the "copyright", "trademark" and "playstation3" text)
3 new_logo_footer.gtf 5E27DFBB474A2AB5A07A91143C8C8054 new_logo_footer.dds ABFE60993D102E39926035D9DEA4CFEC 700x350 pixels, the "copyright", "trademark" and "playstation3" text
4 new_logo_blur.gtf 49E30C3B46BE3B822324EB373EEF5A9C new_logo_blur.dds DE871FB0A8ACBD92CEC267816C072C14 700x350 pixels, a blurry copy of logo+footer together
5 new_logo_sd.gtf ED30E47123D3D68B846DDAC1EBDBDA65 new_logo_sd.dds 2B4B56CFFA2A3E3BA868DC56A7F2917C 240x120 pixels, the main logo (without the "copyright", "trademark" and "playstation3" text)
6 new_logo_sd_footer.gtf 4037567A9F5ED59D6E96402FA2859ABC new_logo_sd_footer.dds B2718D07AB4B6714240F591D00237639 240x120 pixels, the "copyright", "trademark" and "playstation3" text
7 new_logo_sd_blur.gtf 5821260B17B0A5BDD85D0F2BEE9596D0 new_logo_sd_blur.dds FF32C90F34FB350C34F58800F69318DB 240x120 pixels, a blurry copy of logo+footer together
Script 8 coldboot.jsx 5461466B242D81B57D872BBA95EED753 coldboot.js vary with coding style Animation script, written in PlayStation JavaScript format (and extracted as a VSMX file). See Pastebin (without the header)
  • Note the extracted files are not the original files used to create the .raf. All them suffered a format conversion when the .raf was created

Scene[edit]

As explained on the CXML Containers page, RAF containers include embedded data inside their structure (like metadata, not a real file). This data is generated by the RAF compiler and works as a descriptor of the internal structure of the RAF container (this data about the RAF structure is not present in the original scene.xml), and also contains all the important info from the original scene.xml used to create the RAF

The XML files generated by "CXML decompiler" contain more info than the original scene.xml. This makes possible to reverse by hand the original scene.xml using a generic layout for the scene XML standards explained on the Rich Appearance Format (RAF) page

After the reversing this is the original scene file sony used to build gameboot.raf (could vary with coding style but the generated file after compilation is exactly like the original because the coding style is lost when compiled)

Coldboot.xml (original scene)

Codecode
<?xml version='1.0' encoding="UTF-8"?>
 
<raf>
	<model id="plane" file="plane.dae" />
 
	<material id="mtrl_logo"                       effect="sce01" >
		<texture file="new_logo.dds"           type="color_map" />
	</material>
	<material id="mtrl_footer"                     effect="sce01" >
		<texture file="new_logo_footer.dds"    type="color_map" />
	</material>
	<material id="mtrl_blur"                       effect="sce01" >
		<texture file="new_logo_blur.dds"      type="color_map" />
	</material>
	<material id="mtrl_logo_sd"                    effect="sce01" >
		<texture file="new_logo_sd.dds"        type="color_map" />
	</material>
	<material id="mtrl_footer_sd"                  effect="sce01" >
		<texture file="new_logo_sd_footer.dds" type="color_map" />
	</material>
	<material id="mtrl_blur_sd"                    effect="sce01" >
		<texture file="new_logo_sd_blur.dds"   type="color_map" />
	</material>
 
	<actor id="logo"      model="plane" material="mtrl_logo"      position="1.85,0.0,0.0"    rotation="1.570796,0.0,0.0" scale="1.28,0.64,0.64" color="1.0,1.0,1.0,1.0" uv_scale="1.0,-1.0" uv_offset="0.0,0.0" anim_weight="1.0,0.0,0.0,0.0" anim_speed="1.0,1.0,1.0,1.0" anim_time="0.0,0.0,0.0,0.0" />
	<actor id="footer"    model="plane" material="mtrl_footer"    position="1.85,0.0,0.0001" rotation="1.570796,0.0,0.0" scale="1.28,0.64,0.64" color="1.0,1.0,1.0,1.0" uv_scale="1.0,-1.0" uv_offset="0.0,0.0" anim_weight="1.0,0.0,0.0,0.0" anim_speed="1.0,1.0,1.0,1.0" anim_time="0.0,0.0,0.0,0.0" />
	<actor id="blur"      model="plane" material="mtrl_blur"      position="1.85,0.0,0.001"  rotation="1.570796,0.0,0.0" scale="1.28,0.64,0.64" color="1.0,1.0,1.0,1.0" uv_scale="1.0,-1.0" uv_offset="0.0,0.0" anim_weight="1.0,0.0,0.0,0.0" anim_speed="1.0,1.0,1.0,1.0" anim_time="0.0,0.0,0.0,0.0" />
	<actor id="logo_sd"   model="plane" material="mtrl_logo_sd"   position="1.85,0.0,0.0"    rotation="1.570796,0.0,0.0" scale="1.28,0.64,0.64" color="1.0,1.0,1.0,1.0" uv_scale="1.0,-1.0" uv_offset="0.0,0.0" anim_weight="1.0,0.0,0.0,0.0" anim_speed="1.0,1.0,1.0,1.0" anim_time="0.0,0.0,0.0,0.0" />
	<actor id="footer_sd" model="plane" material="mtrl_footer_sd" position="1.85,0.0,0.0001" rotation="1.570796,0.0,0.0" scale="1.28,0.64,0.64" color="1.0,1.0,1.0,1.0" uv_scale="1.0,-1.0" uv_offset="0.0,0.0" anim_weight="1.0,0.0,0.0,0.0" anim_speed="1.0,1.0,1.0,1.0" anim_time="0.0,0.0,0.0,0.0" />
	<actor id="blur_sd"   model="plane" material="mtrl_blur_sd"   position="1.85,0.0,0.001"  rotation="1.570796,0.0,0.0" scale="1.28,0.64,0.64" color="1.0,1.0,1.0,1.0" uv_scale="1.0,-1.0" uv_offset="0.0,0.0" anim_weight="1.0,0.0,0.0,0.0" anim_speed="1.0,1.0,1.0,1.0" anim_time="0.0,0.0,0.0,0.0" />
 
	<camera id="camera" type="perspective" yfov="0.927292" ymag="0.0" znear="0.01" zfar="1000.0" position="0.0,0.0,4.0" direction="0.0,0.0,-2.0" up="0.0,1.0,0.0" />
 
	<light id="pointlight"   type="point"   color="1.0,1.0,1.0" position="0.0,1.0,0.0" attenuation="0.0,1.0,4.0" />
	<light id="ambientlight" type="ambient" color="0.0,0.0,0.0" />
 
	<script file="coldboot.js" />
</raf>
  • Note: By looking at the XML file generated by "CXML decompiler" (not the one above), the original coldboot.raf has been built using raf compiler v1.0 (version="1.0"), this specific version of the compiler doesn't sorts the actors (zsort="" is not supported or is ignored by raf compiler v1.0). See Discussion page for a sample of the file extracted with "CXML decompiler"

Model[edit]

The model files extracted by "CXML decompiler" from coldboot.raf (plane.edge and plane.skel) are the coverted files that was generated by the raf compiler from the original model plane.dae

There is no known way to rebuild the original plane.dae via the generated plane.edge and plane.skel file(s). If there is a way it is probably very complex because there is a lot of information omitted from the original .dae when processed by the raf compiler)

For coldboot.raf the plane model seems to be a rectangle that covers the entire screen. A possible way to get the original plane.dae used to create coldboot.raf is by taking a background.dae from one of the unofficial dynamic themes published... then process it with raf compiler and extract with "CXML decompiler", if the extracted files plane.edge and plane.skel from the unofficial theme and coldboot.raf match then you have found the original plane.dae used to create coldboot.raf (if found please post it here, the .dae files are xml based)

Textures[edit]

The GTF textures extracted by "CXML decompiler" was originally .DDS images (see: Multimedia Formats and Tools page)

The DDS original format is L8 (8 bits luminance) and can be created with nvidia command line tool (nvdxt.exe) by using this command:

Individual files:

Type This
nvdxt.exe -file input.png -L8 -output output.dds

Batch conversion:

Type This
nvdxt.exe -file c:\textures_in_png\*.png -L8 -outdir c:\textures_out_dds
  • Notes:
    • nvidia tool allows a lot of other image formats as input (instead of .png you can use other image formats).
    • All original colboot images are composed of black/red colors only. Red colors are treated as luminance levels (works like a "light mask") and black colors are transparent.

Script[edit]

The extracted coldboot.jsx (from coldboot.raf) by "CXML decompiler" is the file generated by the raf compiler with the original coldboot.js

It is now possible to manually decompile the coldboot.jsx. The process to decompile coldboot.jsx is explained at the bottom of the VSMX page.

The code below is the original coldboot.js (in PlayStation JavaScript format)... after compiling to coldboot.jsx (in VSMX format) the file should have MD5: 5461466B242D81B57D872BBA95EED753

Codecode
var logo_hd = new Actor("logo");                        // HD logo texture (animated attributes initial values from the xml...   color="1.0,1.0,1.0,1.0" position="1.85,0.0,0.0"    scale="1.28,0.64,0.64")
var blur_hd = new Actor("blur");                        // HD blur texture (animated attributes initial values from the xml...   color="1.0,1.0,1.0,1.0" position="1.85,0.0,0.001"  scale="1.28,0.64,0.64")
var footer_hd = new Actor("footer");                    // HD footer texture (animated attributes initial values from the xml... color="1.0,1.0,1.0,1.0" position="1.85,0.0,0.0001" scale="1.28,0.64,0.64")
var logo_sd = new Actor("logo_sd");                     // SD logo texture (animated attributes initial values from the xml...   color="1.0,1.0,1.0,1.0" position="1.85,0.0,0.0"    scale="1.28,0.64,0.64")
var blur_sd = new Actor("blur_sd");                     // SD blur texture (animated attributes initial values from the xml...   color="1.0,1.0,1.0,1.0" position="1.85,0.0,0.001"  scale="1.28,0.64,0.64")
var footer_sd = new Actor("footer_sd");                 // SD footer texture (animated attributes initial values from the xml... color="1.0,1.0,1.0,1.0" position="1.85,0.0,0.0001" scale="1.28,0.64,0.64")
var camera = new Camera("camera");                      // Camera
var light = new Light("pointlight");                    // Light (animated attributes initial values from the xml...             color="1.0,1.0,1.0"     position="0.0,1.0,0.0" attenuation="0.0,1.0,4.0")
 
var first_wait = 1.5;                                                                                                   // timer[0] wait gap (used to calculate timer[0] delay)
var appear_duration = 1.3;                                                                                              // timer[0] function duration
var appear_wait = -0.25;                                                                                                // timer[1] wait gap (used to calculate timer[1] delay)
var blur_duration = 0.5;                                                                                                // timer[1] function duration
var blur_wait = 0.25;                                                                                                   // timer[2] wait gap (used to calculate timer[2] delay)
var whole_duration = 0.5;                                                                                               // timer[2] function duration
var whole_wait = 0.5;                                                                                                   // timer[3] wait gap (used to calculate timer[3] delay)
var fade_duration = 1.2;                                                                                                // timer[3] function duration
 
var appear_start_time = first_wait;                                                                                     // timer[0] delay = 1.5
var blur_start_time = appear_start_time + appear_duration + appear_wait;                                                // timer[1] delay = 1.5  + 1.3 - 0.25 = 2.55
var whole_start_time = blur_start_time + blur_duration + blur_wait;                                                     // timer[2] delay = 2.55 + 0.5 + 0.25 = 3.3
var fade_start_time = whole_start_time + whole_duration + whole_wait;                                                   // timer[3] delay = 3.3  + 0.5 +  0.5 = 4.3
 
var logo = logo_hd;                                                                                                     // HD logo is the default logo
var blur = blur_hd;                                                                                                     // HD blur is the default blur
var footer = footer_hd;                                                                                                 // HD footer is the default footer
var logo_hide = logo_sd;                                                                                                // SD logo will be hidden
var blur_hide = blur_sd;                                                                                                // SD blur will be hidden
var footer_hide = footer_sd;                                                                                            // SD footer will be hidden
 
var br = 1.0;                                                                                                           // Brightness (used for textures color adjustments in r,g,b channels)
 
if (System.resolution->0 == 720)                                        // If system resolution width=720 (NTSC 720x480 or PAL 720x576 ???) reduce brightness, use SD textures, HD textures will be hidden
{
	br = 0.8;                                                       // Textures brightness reduction for SD video modes
	logo = logo_sd;                                                 // SD logo is the default logo
	blur = blur_sd;                                                 // SD blur is the default blur
	footer = footer_sd;                                             // SD footer is the default footer
	logo_hide = logo_hd;                                            // HD logo will be hidden
	blur_hide = blur_hd;                                            // HD blur will be hidden
	footer_hide = footer_hd;                                        // HD footer will be hidden
	if (camera.aspect == 4.0 / 3.0)                                 // If camera aspect ratio is 4/3 displace and scale SD textures
	{
		var sd_offset_x = 1.25;                                 // local variable used for texture displacements in x axis for SD 4/3 video mode
		logo.position->0 = sd_offset_x;                         // logo position x=1.25
		blur.position->0 = sd_offset_x;                         // blur position x=1.25
		footer.position->0 = sd_offset_x;                       // footer position x=1.25
		var sd_scale = <1.0, 0.5, 0.5>;                         // local variable used for textures scale in x,y,z axis
		logo.scale = sd_scale;                                  // logo scale x=1.0 y=0.5 z=0.5
		blur.scale = sd_scale;                                  // blur scale x=1.0 y=0.5 z=0.5
		footer.scale = sd_scale;                                // footer scale x=1.0 y=0.5 z=0.5
	} else {                                                        // Else camera aspect ratio is 16/9 displace and scale SD textures
		var sd_offset_x = 2.0;                                  // local variable used for texture displacements in x axis for SD 16/9 video mode
		logo.position->0 = sd_offset_x;                         // logo position x=2.0
		blur.position->0 = sd_offset_x;                         // blur position x=2.0
		footer.position->0 = sd_offset_x;                       // footer position x=2.0
		var sd_scale = <1.0, 0.5, 0.5>;                         // local variable used for textures scale in x,y,z axis
		logo.scale = sd_scale;                                  // logo scale x=1.0 y=0.5 z=0.5
		blur.scale = sd_scale;                                  // blur scale x=1.0 y=0.5 z=0.5
		footer.scale = sd_scale;                                // footer scale x=1.0 y=0.5 z=0.5
	}
}
 
logo_hide.color = <0,0,0,0>;                                                                                                // hide unselected logo (not used anymore)
blur_hide.color = <0,0,0,0>;                                                                                                // hide unselected blur (not used anymore)
footer_hide.color = <0,0,0,0>;                                                                                              // hide unselected footer (not used anymore)
 
logo.color = <br, br, br, 0>;                                                                                               // logo color alpha=0 (transparent, initial state)
logo.setColor (<br, br, br, 1>, appear_start_time);                                                                         // change logo color alpha=1 over 1.5 seconds (logo fade-in animation)
blur.color = <br, br, br, 0>;                                                                                               // blur color alpha=0 (transparent, initial state)
footer.color = <br, br, br, 0>;                                                                                             // footer color alpha=0 (transparent, initial state)
light.position = logo.position + <-3, 0.5, 0>;                                                                              // light position at the left-top of logo position (initial state)
light.color = <0, 0, 0>;                                                                                                    // light color to black (darkness, initial state)
 
System.timer[0] = new OneShotTimer(appear_start_time, function()                                                            // delay 1.5 seconds
{
	light.setPosition ((logo.position + <0.0, 0.5, 0>), appear_duration);                                               // change light position to top of logo position over 1.3 seconds
	light.setAttenuation (<0.1, 0.1, 0.1>, appear_duration);                                                            // change light attenuation to minimal over 1.3 seconds
	light.setColor (<1, 1, 1>, appear_duration);                                                                        // change light color to white over 1.3 seconds (light-in animation)
});
 
System.timer[1] = new OneShotTimer(blur_start_time, function()                                                              // delay 2.55 seconds
{
	blur.setColor (<br, br, br, 1>, blur_duration, INTERPOLATION_BEZIER, <0.1, 0.0, 0.1, 1.0>);                         // change blur color alpha=1 over 0.5 seconds (blur fade-in animation)
});
 
System.timer[2] = new OneShotTimer(whole_start_time, function()                                                             // delay 3.3 seconds
{
	blur.setColor (<br, br, br, 0>, whole_duration, INTERPOLATION_BEZIER, <0.1, 0.0, 0.1, 1.0>);                        // change blur color alpha=0 over 0.5 seconds (blur fade-out animation)
	footer.setColor (<br, br, br, 1>, whole_duration);                                                                  // change footer color alpha=1 over 0.5 seconds (footer fade-in animation)
});
 
System.timer[3] = new OneShotTimer(fade_start_time, function()                                                              // delay 4.3 seconds
{
	var Unamed_Variable = <0.8, 0.0, 0.8, 1.0>;                                                                         // local variable (used for interpolation curve settings)
	footer.setColor (<br, br, br, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable);                            // change footer color alpha=0 over 1.2 seconds (footer fade-out animation)
	logo.setColor (<br, br, br, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable);                              // change logo color alpha=0 over 1.2 seconds (logo fade-out animation)
	light.setPosition (light.position + <1.5 * 1.5, 1 * 1.5, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable); // change light position to (weird position???) over 1.2 seconds 
	light.setColor (<0, 0, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable);                                   // change light color to black over 1.2 seconds (light-out animation)
	light.setAttenuation (<0, 1, 4>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable);                             // change light attenuation to initial values over 1.2 seconds 
});

Coldboot animation timeline[edit]

PS3 Coldboot.raf animation timeline

Total time 1.50" D-Pad right button 2.55" D-Pad right button 2.80" D-Pad right button 3.05" D-Pad right button 3.30" D-Pad right button 3.80" D-Pad right button 4.30" D-Pad right button 5.50" D-Pad right button
Parallel
execution
threads
appear_start_time = 1.5
logo.setColor
appear_start_time = 1.5
System.timer[0]


appear_duration = 1.3
light.setPosition
light.setAttenuation
light.setColor
blur_start_time = 2.55
System.timer[1]
blur_duration = 0.5
blur.setColor
whole_start_time = 3.3
System.timer[2]

whole_duration = 0.5
blur.setColor
footer.setColor
fade_start_time = 4.3
System.timer[3]




fade_duration = 1.2
footer.setColor
logo.setColor
light.setPosition
light.setColor
light.setAttenuation
Time frames D-Pad left button 1.50" D-Pad right button D-Pad left button 1.05" D-Pad right button D-Pad left button 0.25" D-Pad right button D-Pad left button 0.25" D-Pad right button D-Pad left button 0.25" D-Pad right button D-Pad left button 0.50" D-Pad right button D-Pad left button 0.50" D-Pad right button D-Pad left button 1.20" D-Pad right button


Coldboot Sounds (.AC3)[edit]

Coldboot Sounds versions
File Name Size
(bytes)
Hash
(MD5)
Firmware Notes
1.00~2.60 2.70~2.80 3.00~3.01 3.10~4.78
coldboot_stereo.ac3 721.920 5EB0E4ECE6F221ED07D3128D416ADB44 Yes No Old coldboot sound files
coldboot_multi.ac3 721.920 931D05254C198ED5D202ECAE9A0BC6E2
coldboot2_stereo.ac3 801.280 83D2B05CC85F65A1392614989F71ECFA No Yes No New coldboot2 sound files (Using new names)
coldboot2_multi.ac3 801.280 D837AA7B7AEC6C1A090CBA51CCA9434E
coldboot_stereo.ac3 801.280 83D2B05CC85F65A1392614989F71ECFA No Yes New coldboot sound files (Using old names)
coldboot_multi.ac3 801.280 D837AA7B7AEC6C1A090CBA51CCA9434E
  • coldboot2 sounds overlap notes:
    • In 2.70~2.80, coldboot2_multi.ac3 differs from coldboot_multi.ac3 and coldboot2_stereo.ac3 differs from coldboot_stereo.ac3
    • In 3.00~3.01, coldboot2_multi.ac3 is same as coldboot_multi.ac3 and coldboot2_stereo.ac3 is same as coldboot_stereo.ac3
Audio files Channels Mode Extension File Size Duration Format Bit Rate Sampling Rate Bit depth
old stereo 2 Front: L R CM (complete main) 721.920 bytes 9s 24ms AC-3 (Audio Coding 3) 640 Kbps Constant 48.0 KHz 16 bits
old multi 6 Front: L C R, Side: L R, LFE CM (complete main)
new stereo 2 Front: L R ME (music and effects) 801.280 bytes 10s 16ms
new multi 6 Front: L C R, Side: L R, LFE CM (complete main)