VSMX: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
(coldboot.raf VSMX Decompilation sample :)
Line 243: Line 243:


=== Arithmetic Operators ===
=== Arithmetic Operators ===
May be move later to [[PlayStation_JavaScript]] or make it as template
May be move later to [[PlayStation JavaScript]] or make it as template


Arithmetic operators are used to perform arithmetic between variables and/or values.
Arithmetic operators are used to perform arithmetic between variables and/or values.
Line 253: Line 253:
! OpCode ([[VSMX|VSMX]])  
! OpCode ([[VSMX|VSMX]])  
! Mnemonics  ([[VSMX|VSMX]])
! Mnemonics  ([[VSMX|VSMX]])
! Syntax ([[PlayStation_JavaScript|PSJS]])
! Syntax ([[PlayStation JavaScript|PSJS]])
! Description:  
! Description:  
|-
|-
Line 288: Line 288:
! OpCode ([[VSMX|VSMX]])  
! OpCode ([[VSMX|VSMX]])  
! Mnemonics  ([[VSMX|VSMX]])
! Mnemonics  ([[VSMX|VSMX]])
! Syntax ([[PlayStation_JavaScript|PSJS]])
! Syntax ([[PlayStation JavaScript|PSJS]])
! Description:  
! Description:  
|-
|-
Line 316: Line 316:
! OpCode ([[VSMX|VSMX]])  
! OpCode ([[VSMX|VSMX]])  
! Mnemonics ([[VSMX|VSMX]])
! Mnemonics ([[VSMX|VSMX]])
! Syntax ([[PlayStation_JavaScript|PSJS]])
! Syntax ([[PlayStation JavaScript|PSJS]])
! Description:  
! Description:  
|-
|-
Line 351: Line 351:
! OpCode ([[VSMX|VSMX]])  
! OpCode ([[VSMX|VSMX]])  
! Mnemonics ([[VSMX|VSMX]])
! Mnemonics ([[VSMX|VSMX]])
! Syntax ([[PlayStation_JavaScript|PSJS]])
! Syntax ([[PlayStation JavaScript|PSJS]])
! Description:  
! Description:  
|-
|-
Line 365: Line 365:


== GLOBAL Table ==
== GLOBAL Table ==
= VSMX Decompilation sample =
This is an example of the decodification and decompilation made with the VSMX script contained inside [[coldboot.raf]]. The decompilation has been made by hand because the vsmx decompiler by ZiNgA BuRgA doesnt supports vectors and crashes, the purpose is to serve as an explain of how the opcodes works, the features that was added to VSMX v2 format for PS3, and as an overall explain of how to decompile other VSMX files
The file can be saved as .js and compiled directlly (there is no need to remove the comments), for a better view of the decompiled code without the comments in [[PlayStation JavaScript]] format see [[coldboot.raf]] page
*Form left to right:
**'''NUM''' - Is the opcode number (important because the JUMPS are pointers to other opcodes identifyed by his number)
**'''OPCODE''' - The hex value that identifyes the opcode (first byte)... second byte reserved?... third byte unknown... fourth byte argument
**'''VALUE''' - Any value, or pointer to internal VSMX tables (4 bytes)
**'''OPCODE NAME''' - Self explanatory, is a direct conversion from the hex value to the name
**'''VALUES CONVERSION''' - For pointers are text strings extracted from internal VSMX tables, Data types are the conversion from hex, JUMPS and FUNCTS contains also identifyers for other opcodes and arguments
**'''DECOMPILED PSJS CODE''' - The source code in [[PlayStation JavaScript]] format ready to compile, it will generate a coldboot.jsx exactly like the one extracted from coldboot.raf by the [[CXML Containers|CXML decompiler tool]]
{{Boxcode|content=<syntaxhighlight lang="javascript">
//---------------------------------------------------------------------------------------------------------------------
// VSMX v2 Decompilation Sample (coldboot.raf PS3). Decompiled step by step from VSMX opcodes to PSJS code by sandungas
// Comments can be deleted in notepad++ by replacing (with nothing) the regular expressions /\*.*\*/ and then //.*\r\n
// The file generated after compilation in VSMX format should have MD5: 5461466B242D81B57D872BBA95EED753
//
// Thanks to ;)
// Flatz for the experimental CXML decompiler, ZiNgA BuRgA for the experimental VSMX v1 decoder/decompiler,
// AdaLoveLace for the OPCODE names, and TizzyT for the help with PSJS
//---------------------------------------------------------------------------------------------------------------------
// NUM -  OPCODE  VALUES  - OPCODE NAME            VALUES CONVERSION    */DECOMPILED PSJS CODE
//---------------------------------------------------------------------------------------------------------------------
/* 000 - 2E000000 00000000 - PUSH_GLOBAL            logo_hd              *///logo_hd
/* 001 - 2E000000 1E000000 - PUSH_GLOBAL            Actor                *///Actor
/* 002 - 28000000 00000000 - PUSH_STRING            "logo"              *///"logo"
/* 003 - 3E000000 01000000 - CALL_CONSTRUCTOR      1                    *///new Actor("logo")
/* 004 - 01000000 00000000 - ASSGN                                      *///logo_hd = new Actor("logo")
/* 005 - 22000000 00000000 - REMOVE                                      */var logo_hd = new Actor("logo");
/* 006 - 2E000000 01000000 - PUSH_GLOBAL            blur_hd              *///blur_hd
/* 007 - 2E000000 1E000000 - PUSH_GLOBAL            Actor                *///Actor
/* 008 - 28000000 01000000 - PUSH_STRING            "blur"              *///"blur"
/* 009 - 3E000000 01000000 - CALL_CONSTRUCTOR      1                    *///new Actor("blur")
/* 010 - 01000000 00000000 - ASSGN                                      *///blur_hd = new Actor("blur")
/* 011 - 22000000 00000000 - REMOVE                                      */var blur_hd = new Actor("blur");
/* 012 - 2E000000 02000000 - PUSH_GLOBAL            footer_hd            *///footer_hd
/* 013 - 2E000000 1E000000 - PUSH_GLOBAL            Actor                *///Actor
/* 014 - 28000000 02000000 - PUSH_STRING            "footer"            *///"footer"
/* 015 - 3E000000 01000000 - CALL_CONSTRUCTOR      1                    *///new Actor("footer")
/* 016 - 01000000 00000000 - ASSGN                                      *///footer_hd = new Actor("footer")
/* 017 - 22000000 00000000 - REMOVE                                      */var footer_hd = new Actor("footer");
/* 018 - 2E000000 03000000 - PUSH_GLOBAL            logo_sd              *///logo_sd
/* 019 - 2E000000 1E000000 - PUSH_GLOBAL            Actor                *///Actor
/* 020 - 28000000 03000000 - PUSH_STRING            "logo_sd"            *///"logo_sd"
/* 021 - 3E000000 01000000 - CALL_CONSTRUCTOR      1                    *///new Actor("logo_sd")
/* 022 - 01000000 00000000 - ASSGN                                      *///logo_sd = new Actor("logo_sd")
/* 023 - 22000000 00000000 - REMOVE                                      */var logo_sd = new Actor("logo_sd");
/* 024 - 2E000000 04000000 - PUSH_GLOBAL            blur_sd              *///blur_sd
/* 025 - 2E000000 1E000000 - PUSH_GLOBAL            Actor                *///Actor
/* 026 - 28000000 04000000 - PUSH_STRING            "blur_sd"            *///"blur_sd"
/* 027 - 3E000000 01000000 - CALL_CONSTRUCTOR      1                    *///new Actor("blur_sd")
/* 028 - 01000000 00000000 - ASSGN                                      *///blur_sd = new Actor("blur_sd")
/* 029 - 22000000 00000000 - REMOVE                                      */var blur_sd = new Actor("blur_sd");
/* 030 - 2E000000 05000000 - PUSH_GLOBAL            footer_sd            *///footer_sd
/* 031 - 2E000000 1E000000 - PUSH_GLOBAL            Actor                *///Actor
/* 032 - 28000000 05000000 - PUSH_STRING            "footer_sd"          *///"footer_sd"
/* 033 - 3E000000 01000000 - CALL_CONSTRUCTOR      1                    *///new Actor("footer_sd")
/* 034 - 01000000 00000000 - ASSGN                                      *///footer_sd = new Actor("footer_sd")
/* 035 - 22000000 00000000 - REMOVE                                      */var footer_sd = new Actor("footer_sd");
/* 036 - 2E000000 06000000 - PUSH_GLOBAL            camera              *///camera
/* 037 - 2E000000 1F000000 - PUSH_GLOBAL            Camera              *///Camera
/* 038 - 28000000 06000000 - PUSH_STRING            "camera"            *///"camera"
/* 039 - 3E000000 01000000 - CALL_CONSTRUCTOR      1                    *///new Camera("camera")
/* 040 - 01000000 00000000 - ASSGN                                      *///camera = new Camera("camera")
/* 041 - 22000000 00000000 - REMOVE                                      */var camera = new Camera("camera");
/* 042 - 2E000000 07000000 - PUSH_GLOBAL            light                *///light
/* 043 - 2E000000 20000000 - PUSH_GLOBAL            Light                *///Light
/* 044 - 28000000 07000000 - PUSH_STRING            "pointlight"        *///"pointlight"
/* 045 - 3E000000 01000000 - CALL_CONSTRUCTOR      1                    *///new Light("pointlight")
/* 046 - 01000000 00000000 - ASSGN                                      *///light = new Light("pointlight")
/* 047 - 22000000 00000000 - REMOVE                                      */var light = new Light("pointlight");
/* 048 - 2E000000 08000000 - PUSH_GLOBAL            first_wait          *///first_wait
/* 049 - 27000000 0000C03F - PUSH_FLOAT            1.5                  *///1.5
/* 050 - 01000000 00000000 - ASSGN                                      *///first_wait = 1.5
/* 051 - 22000000 00000000 - REMOVE                                      */var first_wait = 1.5;
/* 052 - 2E000000 09000000 - PUSH_GLOBAL            appear_duration      *///appear_duration
/* 053 - 27000000 6666A63F - PUSH_FLOAT            1.3                  *///1.3
/* 054 - 01000000 00000000 - ASSGN                                      *///appear_duration = 1.3
/* 055 - 22000000 00000000 - REMOVE                                      */var appear_duration = 1.3;
/* 056 - 2E000000 0A000000 - PUSH_GLOBAL            appear_wait          *///appear_wait
/* 057 - 27000000 0000803E - PUSH_FLOAT            0.25                *///0.25
/* 058 - 08000000 00000000 - CSIGN                                      *///-0.25
/* 059 - 01000000 00000000 - ASSGN                                      *///appear_wait = -0.25
/* 060 - 22000000 00000000 - REMOVE                                      */var appear_wait = -0.25;
/* 061 - 2E000000 0B000000 - PUSH_GLOBAL            blur_duration        *///blur_duration
/* 062 - 27000000 0000003F - PUSH_FLOAT            0.5                  *///0.5
/* 063 - 01000000 00000000 - ASSGN                                      *///blur_duration = 0.5
/* 064 - 22000000 00000000 - REMOVE                                      */var blur_duration = 0.5;
/* 065 - 2E000000 0C000000 - PUSH_GLOBAL            blur_wait            *///blur_wait
/* 066 - 27000000 0000803E - PUSH_FLOAT            0.25                *///0.25
/* 067 - 01000000 00000000 - ASSGN                                      *///blur_wait = 0.25
/* 068 - 22000000 00000000 - REMOVE                                      */var blur_wait = 0.25;
/* 069 - 2E000000 0D000000 - PUSH_GLOBAL            whole_duration      *///whole_duration
/* 070 - 27000000 0000003F - PUSH_FLOAT            0.5                  *///0.5
/* 071 - 01000000 00000000 - ASSGN                                      *///whole_duration = 0.5
/* 072 - 22000000 00000000 - REMOVE                                      */var whole_duration = 0.5;
/* 073 - 2E000000 0E000000 - PUSH_GLOBAL            whole_wait          *///whole_wait
/* 074 - 27000000 0000003F - PUSH_FLOAT            0.5                  *///0.5
/* 075 - 01000000 00000000 - ASSGN                                      *///whole_wait = 0.5
/* 076 - 22000000 00000000 - REMOVE                                      */var whole_wait = 0.5;
/* 077 - 2E000000 0F000000 - PUSH_GLOBAL            fade_duration        *///fade_duration
/* 078 - 27000000 9A99993F - PUSH_FLOAT            1.2                  *///1.2
/* 079 - 01000000 00000000 - ASSGN                                      *///fade_duration = 1.2
/* 080 - 22000000 00000000 - REMOVE                                      */var fade_duration = 1.2;
/* 081 - 2E000000 10000000 - PUSH_GLOBAL            appear_start_time    *///appear_start_time
/* 082 - 2E000000 08000000 - PUSH_GLOBAL            first_wait          *///first_wait
/* 083 - 01000000 00000000 - ASSGN                                      *///appear_start_time = first_wait
/* 084 - 22000000 00000000 - REMOVE                                      */var appear_start_time = first_wait;
/* 085 - 2E000000 11000000 - PUSH_GLOBAL            blur_start_time      *///blur_start_time
/* 086 - 2E000000 10000000 - PUSH_GLOBAL            appear_start_time    *///appear_start_time
/* 087 - 2E000000 09000000 - PUSH_GLOBAL            appear_duration      *///appear_duration
/* 088 - 02000000 00000000 - ADD                                        *///appear_start_time + appear_duration
/* 089 - 2E000000 0A000000 - PUSH_GLOBAL            appear_wait          *///appear_wait
/* 090 - 02000000 00000000 - ADD                                        *///appear_start_time + appear_duration + appear_wait
/* 091 - 01000000 00000000 - ASSGN                                      *///blur_start_time = appear_start_time + appear_duration + appear_wait
/* 092 - 22000000 00000000 - REMOVE                                      */var blur_start_time = appear_start_time + appear_duration + appear_wait;
/* 093 - 2E000000 12000000 - PUSH_GLOBAL            whole_start_time    *///whole_start_time
/* 094 - 2E000000 11000000 - PUSH_GLOBAL            blur_start_time      *///blur_start_time
/* 095 - 2E000000 0B000000 - PUSH_GLOBAL            blur_duration        *///blur_duration
/* 096 - 02000000 00000000 - ADD                                        *///blur_start_time + blur_duration
/* 097 - 2E000000 0C000000 - PUSH_GLOBAL            blur_wait            *///blur_wait
/* 098 - 02000000 00000000 - ADD                                        *///blur_start_time + blur_duration + blur_wait
/* 099 - 01000000 00000000 - ASSGN                                      *///whole_start_time = blur_start_time + blur_duration + blur_wait
/* 100 - 22000000 00000000 - REMOVE                                      */var whole_start_time = blur_start_time + blur_duration + blur_wait;
/* 101 - 2E000000 13000000 - PUSH_GLOBAL            fade_start_time      *///fade_start_time
/* 102 - 2E000000 12000000 - PUSH_GLOBAL            whole_start_time    *///whole_start_time
/* 103 - 2E000000 0D000000 - PUSH_GLOBAL            whole_duration      *///whole_duration
/* 104 - 02000000 00000000 - ADD                                        *///whole_start_time + whole_duration
/* 105 - 2E000000 0E000000 - PUSH_GLOBAL            whole_wait          *///whole_wait
/* 106 - 02000000 00000000 - ADD                                        *///whole_start_time + whole_duration + whole_wait
/* 107 - 01000000 00000000 - ASSGN                                      *///fade_start_time = whole_start_time + whole_duration + whole_wait
/* 108 - 22000000 00000000 - REMOVE                                      */var fade_start_time = whole_start_time + whole_duration + whole_wait;
/* 109 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 110 - 2E000000 00000000 - PUSH_GLOBAL            logo_hd              *///logo_hd
/* 111 - 01000000 00000000 - ASSGN                                      *///logo = logo_hd
/* 112 - 22000000 00000000 - REMOVE                                      */var logo = logo_hd;
/* 113 - 2E000000 15000000 - PUSH_GLOBAL            blur                *///blur
/* 114 - 2E000000 01000000 - PUSH_GLOBAL            blur_hd              *///blur_hd
/* 115 - 01000000 00000000 - ASSGN                                      *///blur = blur_hd
/* 116 - 22000000 00000000 - REMOVE                                      */var blur = blur_hd;
/* 117 - 2E000000 16000000 - PUSH_GLOBAL            footer              *///footer
/* 118 - 2E000000 02000000 - PUSH_GLOBAL            footer_hd            *///footer_hd
/* 119 - 01000000 00000000 - ASSGN                                      *///footer = footer_hd
/* 120 - 22000000 00000000 - REMOVE                                      */var footer = footer_hd;
/* 121 - 2E000000 17000000 - PUSH_GLOBAL            logo_hide            *///logo_hide
/* 122 - 2E000000 03000000 - PUSH_GLOBAL            logo_sd              *///logo_sd
/* 123 - 01000000 00000000 - ASSGN                                      *///logo_hide = logo_sd
/* 124 - 22000000 00000000 - REMOVE                                      */var logo_hide = logo_sd;
/* 125 - 2E000000 18000000 - PUSH_GLOBAL            blur_hide            *///blur_hide
/* 126 - 2E000000 04000000 - PUSH_GLOBAL            blur_sd              *///blur_sd
/* 127 - 01000000 00000000 - ASSGN                                      *///blur_hide = blur_sd
/* 128 - 22000000 00000000 - REMOVE                                      */var blur_hide = blur_sd;
/* 129 - 2E000000 19000000 - PUSH_GLOBAL            footer_hide          *///footer_hide
/* 130 - 2E000000 05000000 - PUSH_GLOBAL            footer_sd            *///footer_sd
/* 131 - 01000000 00000000 - ASSGN                                      *///footer_hide = footer_sd
/* 132 - 22000000 00000000 - REMOVE                                      */var footer_hide = footer_sd;
/* 133 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 134 - 27000000 0000803F - PUSH_FLOAT            1.0                  *///1.0
/* 135 - 01000000 00000000 - ASSGN                                      *///br = 1.0
/* 136 - 22000000 00000000 - REMOVE                                      */var br = 1.0;
/* 137 - 2E000000 21000000 - PUSH_GLOBAL            System              *///System
/* 138 - 2F000000 00000000 - GETATTR                resolution          *///System.resolution
/* 139 - 4A000000 00000000 - GET_VECTOR_ELEMENT    0                    *///System.resolution->0
/* 140 - 26000000 D0020000 - PUSH_INT              720                  *///720
/* 141 - 0E000000 00000000 - CMPEQ                                      *///System.resolution->0 == 720
/* 142 - 3B000000 F9000000 - JUMPF                              249      */if (System.resolution->0 == 720){
/* 143 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 144 - 27000000 CDCC4C3F - PUSH_FLOAT            0.8                  *///0.8
/* 145 - 01000000 00000000 - ASSGN                                      *///br = 0.8
/* 146 - 22000000 00000000 - REMOVE                                      */ br = 0.8;
/* 147 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 148 - 2E000000 03000000 - PUSH_GLOBAL            logo_sd              *///logo_sd
/* 149 - 01000000 00000000 - ASSGN                                      *///logo = logo_sd
/* 150 - 22000000 00000000 - REMOVE                                      */ logo = logo_sd;
/* 151 - 2E000000 15000000 - PUSH_GLOBAL            blur                *///blur
/* 152 - 2E000000 04000000 - PUSH_GLOBAL            blur_sd              *///blur_sd
/* 153 - 01000000 00000000 - ASSGN                                      *///blur = blur_sd
/* 154 - 22000000 00000000 - REMOVE                                      */ blur = blur_sd;
/* 155 - 2E000000 16000000 - PUSH_GLOBAL            footer              *///footer
/* 156 - 2E000000 05000000 - PUSH_GLOBAL            footer_sd            *///footer_sd
/* 157 - 01000000 00000000 - ASSGN                                      *///footer = footer_sd
/* 158 - 22000000 00000000 - REMOVE                                      */ footer = footer_sd;
/* 159 - 2E000000 17000000 - PUSH_GLOBAL            logo_hide            *///logo_hide
/* 160 - 2E000000 00000000 - PUSH_GLOBAL            logo_hd              *///logo_hd
/* 161 - 01000000 00000000 - ASSGN                                      *///logo_hide = logo_hd
/* 162 - 22000000 00000000 - REMOVE                                      */ logo_hide = logo_hd;
/* 163 - 2E000000 18000000 - PUSH_GLOBAL            blur_hide            *///blur_hide
/* 164 - 2E000000 01000000 - PUSH_GLOBAL            blur_hd              *///blur_hd
/* 165 - 01000000 00000000 - ASSGN                                      *///blur_hide = blur_hd
/* 166 - 22000000 00000000 - REMOVE                                      */ blur_hide = blur_hd;
/* 167 - 2E000000 19000000 - PUSH_GLOBAL            footer_hide          *///footer_hide
/* 168 - 2E000000 02000000 - PUSH_GLOBAL            footer_hd            *///footer_hd
/* 169 - 01000000 00000000 - ASSGN                                      *///footer_hide = footer_hd
/* 170 - 22000000 00000000 - REMOVE                                      */ footer_hide = footer_hd;
/* 171 - 2E000000 06000000 - PUSH_GLOBAL            camera              *///camera
/* 172 - 2F000000 01000000 - GETATTR                aspect              *///camera.aspect
/* 173 - 27000000 00008040 - PUSH_FLOAT            4.0                  *///4.0
/* 174 - 27000000 00004040 - PUSH_FLOAT            3.0                  *///3.0
/* 175 - 05000000 00000000 - DIV                                        */// 4.0 / 3.0
/* 176 - 0E000000 00000000 - CMPEQ                                      *///camera.aspect == 4.0 / 3.0
/* 177 - 3B000000 D6000000 - JUMPF                              214      */ if (camera.aspect == 4.0 / 3.0){
/* 178 - 2E000000 1B000000 - PUSH_GLOBAL            sd_offset_x          *///sd_offset_x
/* 179 - 27000000 0000A03F - PUSH_FLOAT            1.25                *///1.25
/* 180 - 01000000 00000000 - ASSGN                                      *///sd_offset_x = 1.25
/* 181 - 22000000 00000000 - REMOVE                                      */ var sd_offset_x = 1.25;
/* 182 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 183 - 2E000000 1B000000 - PUSH_GLOBAL            sd_offset_x          *///sd_offset_x
/* 184 - 4D000000 02000000 - SETATTR_VECTOR_ELEMENT 0    position      *///logo.position->0 = sd_offset_x
/* 185 - 22000000 00000000 - REMOVE                                      */ logo.position->0 = sd_offset_x;
/* 186 - 2E000000 15000000 - PUSH_GLOBAL            blur                *///blur
/* 187 - 2E000000 1B000000 - PUSH_GLOBAL            sd_offset_x          *///sd_offset_x
/* 188 - 4D000000 02000000 - SETATTR_VECTOR_ELEMENT 0    position      *///blur.position->0 = sd_offset_x
/* 189 - 22000000 00000000 - REMOVE                                      */ blur.position->0 = sd_offset_x;
/* 190 - 2E000000 16000000 - PUSH_GLOBAL            footer              *///footer
/* 191 - 2E000000 1B000000 - PUSH_GLOBAL            sd_offset_x          *///sd_offset_x
/* 192 - 4D000000 02000000 - SETATTR_VECTOR_ELEMENT 0    position      *///footer.position->0 = sd_offset_x
/* 193 - 22000000 00000000 - REMOVE                                      */ footer.position->0 = sd_offset_x;
/* 194 - 2E000000 1C000000 - PUSH_GLOBAL            sd_scale            *///sd_scale
/* 195 - 27000000 0000803F - PUSH_FLOAT            1.0                  *///1.0
/* 196 - 27000000 0000003F - PUSH_FLOAT            0.5                  *///0.5
/* 197 - 27000000 0000003F - PUSH_FLOAT            0.5                  *///0.5
/* 198 - 49000000 03000000 - PUSH_VECTOR            3                    *///<1.0, 0.5, 0.5>
/* 199 - 01000000 00000000 - ASSGN                                      *///sd_scale = <1.0, 0.5, 0.5>
/* 200 - 22000000 00000000 - REMOVE                                      */ var sd_scale = <1.0, 0.5, 0.5>;
/* 201 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 202 - 2E000000 1C000000 - PUSH_GLOBAL            sd_scale            *///sd_scale
/* 203 - 31000000 03000000 - SETATTR                scale                *///logo.scale = sd_scale
/* 204 - 22000000 00000000 - REMOVE                                      */ logo.scale = sd_scale;
/* 205 - 2E000000 15000000 - PUSH_GLOBAL            blur                *///blur
/* 206 - 2E000000 1C000000 - PUSH_GLOBAL            sd_scale            *///sd_scale
/* 207 - 31000000 03000000 - SETATTR                scale                *///blur.scale = sd_scale
/* 208 - 22000000 00000000 - REMOVE                                      */ blur.scale = sd_scale;
/* 209 - 2E000000 16000000 - PUSH_GLOBAL            footer              *///footer
/* 210 - 2E000000 1C000000 - PUSH_GLOBAL            sd_scale            *///sd_scale
/* 211 - 31000000 03000000 - SETATTR                scale                *///footer.scale = sd_scale
/* 212 - 22000000 00000000 - REMOVE                                      */ footer.scale = sd_scale;
/* 213 - 39000000 F9000000 - JUMP                  249                  */} else {
/* 214 - 2E000000 1B000000 - PUSH_GLOBAL            sd_offset_x          *///sd_offset_x
/* 215 - 27000000 00000040 - PUSH_FLOAT            2.0                  *///2.0
/* 216 - 01000000 00000000 - ASSGN                                      *///sd_offset_x = 2.0
/* 217 - 22000000 00000000 - REMOVE                                      */ sd_offset_x = 2.0;
/* 218 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 219 - 2E000000 1B000000 - PUSH_GLOBAL            sd_offset_x          *///sd_offset_x
/* 220 - 4D000000 02000000 - SETATTR_VECTOR_ELEMENT 0    position      *///logo.position->0 = sd_offset_x
/* 221 - 22000000 00000000 - REMOVE                                      */ logo.position->0 = sd_offset_x;
/* 222 - 2E000000 15000000 - PUSH_GLOBAL            blur                *///blur
/* 223 - 2E000000 1B000000 - PUSH_GLOBAL            sd_offset_x          *///sd_offset_x
/* 224 - 4D000000 02000000 - SETATTR_VECTOR_ELEMENT 0    position      *///blur.position->0 = sd_offset_x
/* 225 - 22000000 00000000 - REMOVE                                      */ blur.position->0 = sd_offset_x;
/* 226 - 2E000000 16000000 - PUSH_GLOBAL            footer              *///footer
/* 227 - 2E000000 1B000000 - PUSH_GLOBAL            sd_offset_x          *///sd_offset_x
/* 228 - 4D000000 02000000 - SETATTR_VECTOR_ELEMENT 0    position      *///footer.position->0 = sd_offset_x
/* 229 - 22000000 00000000 - REMOVE                                      */ footer.position->0 = sd_offset_x;
/* 230 - 2E000000 1C000000 - PUSH_GLOBAL            sd_scale            *///sd_scale
/* 231 - 27000000 0000803F - PUSH_FLOAT            1.0                  *///1.0
/* 232 - 27000000 0000003F - PUSH_FLOAT            0.5                  *///0.5
/* 233 - 27000000 0000003F - PUSH_FLOAT            0.5                  *///0.5
/* 234 - 49000000 03000000 - PUSH_VECTOR            3                    *///<1.0, 0.5, 0.5>
/* 235 - 01000000 00000000 - ASSGN                                      *///sd_scale = <1.0, 0.5, 0.5>
/* 236 - 22000000 00000000 - REMOVE                                      */ sd_scale = <1.0, 0.5, 0.5>;
/* 237 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 238 - 2E000000 1C000000 - PUSH_GLOBAL            sd_scale            *///sd_scale
/* 239 - 31000000 03000000 - SETATTR                scale                *///scale
/* 240 - 22000000 00000000 - REMOVE                                      */ logo.scale = sd_scale;
/* 241 - 2E000000 15000000 - PUSH_GLOBAL            blur                *///blur
/* 242 - 2E000000 1C000000 - PUSH_GLOBAL            sd_scale            *///sd_scale
/* 243 - 31000000 03000000 - SETATTR                scale                *///scale
/* 244 - 22000000 00000000 - REMOVE                                      */ blur.scale = sd_scale;
/* 245 - 2E000000 16000000 - PUSH_GLOBAL            footer              *///footer
/* 246 - 2E000000 1C000000 - PUSH_GLOBAL            sd_scale            *///sd_scale
/* 247 - 31000000 03000000 - SETATTR                scale                *///scale
/* 248 - 22000000 00000000 - REMOVE                                      */ footer.scale = sd_scale;}}
/* 249 - 2E000000 17000000 - PUSH_GLOBAL            logo_hide            *///logo_hide
/* 250 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 251 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 252 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 253 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 254 - 49000000 04000000 - PUSH_VECTOR            4                    *///<0,0,0,0>
/* 255 - 31000000 04000000 - SETATTR                color                *///logo_hide.color = <0,0,0,0>
/* 256 - 22000000 00000000 - REMOVE                                      */logo_hide.color = <0,0,0,0>;
/* 257 - 2E000000 18000000 - PUSH_GLOBAL            blur_hide            *///blur_hide
/* 258 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 259 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 260 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 261 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 262 - 49000000 04000000 - PUSH_VECTOR            4                    *///<0,0,0,0>
/* 263 - 31000000 04000000 - SETATTR                color                *///blur_hide.color = <0,0,0,0>
/* 264 - 22000000 00000000 - REMOVE                                      */blur_hide.color = <0,0,0,0>;
/* 265 - 2E000000 19000000 - PUSH_GLOBAL            footer_hide          *///footer_hide
/* 266 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 267 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 268 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 269 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 270 - 49000000 04000000 - PUSH_VECTOR            4                    *///<0,0,0,0>
/* 271 - 31000000 04000000 - SETATTR                color                *///footer_hide.color = <0,0,0,0>
/* 272 - 22000000 00000000 - REMOVE                                      */footer_hide.color = <0,0,0,0>;
/* 273 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 274 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 275 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 276 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 277 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 278 - 49000000 04000000 - PUSH_VECTOR            4                    *///<br, br, br, 0>
/* 279 - 31000000 04000000 - SETATTR                color                *///logo.color = <br, br, br, 0>
/* 280 - 22000000 00000000 - REMOVE                                      */logo.color = <br, br, br, 0>;
/* 281 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 282 - 30000000 05000000 - GETATTR_KEEPOBJ        setColor            *///logo.setColor
/* 283 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 284 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 285 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 286 - 26000000 01000000 - PUSH_INT              1                    *///1
/* 287 - 49000000 04000000 - PUSH_VECTOR            4                    *///<br, br, br, 1>
/* 288 - 2E000000 10000000 - PUSH_GLOBAL            appear_start_time    *///appear_start_time
/* 289 - 3D000000 02000000 - CALL_METHOD            2                    *///logo.setColor (<br, br, br, 1>, appear_start_time)
/* 290 - 22000000 00000000 - REMOVE                                      */logo.setColor (<br, br, br, 1>, appear_start_time);
/* 291 - 2E000000 15000000 - PUSH_GLOBAL            blur                *///blur
/* 292 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 293 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 294 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 295 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 296 - 49000000 04000000 - PUSH_VECTOR            4                    *///<br, br, br, 0>
/* 297 - 31000000 04000000 - SETATTR                color                *///blur.color = <br, br, br, 0>
/* 298 - 22000000 00000000 - REMOVE                                      */blur.color = <br, br, br, 0>;
/* 299 - 2E000000 16000000 - PUSH_GLOBAL            footer              *///footer
/* 300 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 301 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 302 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 303 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 304 - 49000000 04000000 - PUSH_VECTOR            4                    *///<br, br, br, 0>
/* 305 - 31000000 04000000 - SETATTR                color                *///footer.color = <br, br, br, 0>
/* 306 - 22000000 00000000 - REMOVE                                      */footer.color = <br, br, br, 0>;
/* 307 - 2E000000 07000000 - PUSH_GLOBAL            light                *///light
/* 308 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 309 - 2F000000 02000000 - GETATTR                position            *///logo.position
/* 310 - 26000000 03000000 - PUSH_INT              3                    *///3
/* 311 - 08000000 00000000 - CSIGN                                      *///-3
/* 312 - 27000000 0000003F - PUSH_FLOAT            0.5                  *///0.5
/* 313 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 314 - 49000000 03000000 - PUSH_VECTOR            3                    *///<-3, 0.500000, 0>
/* 315 - 02000000 00000000 - ADD                                        *///logo.position + <-3, 0.500000, 0>
/* 316 - 31000000 02000000 - SETATTR                position            *///light.position = logo.position + <-3, 0.500000, 0>
/* 317 - 22000000 00000000 - REMOVE                                      */light.position = logo.position + <-3, 0.5, 0>;
/* 318 - 2E000000 07000000 - PUSH_GLOBAL            light                *///light
/* 319 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 320 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 321 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 322 - 49000000 03000000 - PUSH_VECTOR            3                    *///<0, 0, 0>
/* 323 - 31000000 04000000 - SETATTR                color                *///light.color = <0, 0, 0>
/* 324 - 22000000 00000000 - REMOVE                                      */light.color = <0, 0, 0>;
/* 325 - 2E000000 21000000 - PUSH_GLOBAL            System              *///System
/* 326 - 2F000000 06000000 - GETATTR                timer                *///System.timer
/* 327 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 328 - 2E000000 22000000 - PUSH_GLOBAL            OneShotTimer        *///OneShotTimer
/* 329 - 2E000000 10000000 - PUSH_GLOBAL            appear_start_time    *///appear_start_time
/* 330 - 2A000001 4C010000 - PUSH_FUNC              0    1    332      */System.timer[0] = new OneShotTimer(appear_start_time, function()
/* 331 - 39000000 6C010000 - JUMP                              364      */{
/* 332 - 2E000000 07000000 - PUSH_GLOBAL            light                *///light
/* 333 - 30000000 07000000 - GETATTR_KEEPOBJ        setPosition          *///light.setPosition
/* 334 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 335 - 2F000000 02000000 - GETATTR                position            *///logo.position
/* 336 - 27000000 00000000 - PUSH_FLOAT            0.0                  *///0.0
/* 337 - 27000000 0000003F - PUSH_FLOAT            0.5                  *///0.5
/* 338 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 339 - 49000000 03000000 - PUSH_VECTOR            3                    *///<0.0, 0.5, 0>
/* 340 - 02000000 00000000 - ADD                                        *///logo.position + <0.0, 0.5, 0>
/* 341 - 2E000000 09000000 - PUSH_GLOBAL            appear_duration      *///appear_duration
/* 342 - 3D000000 02000000 - CALL_METHOD            2                    *///light.setPosition ((logo.position + <0.0, 0.5, 0>), appear_duration)
/* 343 - 22000000 00000000 - REMOVE                                      */ light.setPosition ((logo.position + <0.0, 0.5, 0>), appear_duration);
/* 344 - 2E000000 07000000 - PUSH_GLOBAL            light                *///light
/* 345 - 30000000 08000000 - GETATTR_KEEPOBJ        setAttenuation      *///light.setAttenuation
/* 346 - 27000000 CDCCCC3D - PUSH_FLOAT            0.1                  *///0.1
/* 347 - 27000000 CDCCCC3D - PUSH_FLOAT            0.1                  *///0.1
/* 348 - 27000000 CDCCCC3D - PUSH_FLOAT            0.1                  *///0.1
/* 349 - 49000000 03000000 - PUSH_VECTOR            3                    *///<0.1, 0.1, 0.1>
/* 350 - 2E000000 09000000 - PUSH_GLOBAL            appear_duration      *///appear_duration
/* 351 - 3D000000 02000000 - CALL_METHOD            2                    *///light.setAttenuation (<0.1, 0.1, 0.1>, appear_duration)
/* 352 - 22000000 00000000 - REMOVE                                      */ light.setAttenuation (<0.1, 0.1, 0.1>, appear_duration);
/* 353 - 2E000000 07000000 - PUSH_GLOBAL            light                *///light
/* 354 - 30000000 05000000 - GETATTR_KEEPOBJ        setColor            *///light.setColor
/* 355 - 26000000 01000000 - PUSH_INT              1                    *///1
/* 356 - 26000000 01000000 - PUSH_INT              1                    *///1
/* 357 - 26000000 01000000 - PUSH_INT              1                    *///1
/* 358 - 49000000 03000000 - PUSH_VECTOR            3                    *///<1, 1, 1>
/* 359 - 2E000000 09000000 - PUSH_GLOBAL            appear_duration      *///appear_duration
/* 360 - 3D000000 02000000 - CALL_METHOD            2                    *///light.setColor (<1, 1, 1>, appear_duration)
/* 361 - 22000000 00000000 - REMOVE                                      */ light.setColor (<1, 1, 1>, appear_duration);
/* 362 - 23000000 00000000 - PUSH_UNDEFINED                              */
/* 363 - 3F000000 00000000 - RET                                        */}
/* 364 - 3E000000 02000000 - CALL_CONSTRUCTOR      2                    *///)
/* 365 - 36000000 00000000 - SETITEM                                    */
/* 366 - 22000000 00000000 - REMOVE                                      */);
/* 367 - 2E000000 21000000 - PUSH_GLOBAL            System              *///System
/* 368 - 2F000000 06000000 - GETATTR                timer                *///System.timer
/* 369 - 26000000 01000000 - PUSH_INT              1                    *///1
/* 370 - 2E000000 22000000 - PUSH_GLOBAL            OneShotTimer        *///OneShotTimer
/* 371 - 2E000000 11000000 - PUSH_GLOBAL            blur_start_time      *///blur_start_time
/* 372 - 2A000001 76010000 - PUSH_FUNC              0    1    374      */System.timer[1] = new OneShotTimer(blur_start_time, function()
/* 373 - 39000000 88010000 - JUMP                              392      */{
/* 374 - 2E000000 15000000 - PUSH_GLOBAL            blur                *///blur
/* 375 - 30000000 05000000 - GETATTR_KEEPOBJ        setColor            *///blur.setColor
/* 376 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 377 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 378 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 379 - 26000000 01000000 - PUSH_INT              1                    *///1
/* 380 - 49000000 04000000 - PUSH_VECTOR            4                    *///<br, br, br, 1>
/* 381 - 2E000000 0B000000 - PUSH_GLOBAL            blur_duration        *///blur_duration
/* 382 - 2E000000 1D000000 - PUSH_GLOBAL            INTERPOLATION_BEZIER *///INTERPOLATION_BEZIER
/* 383 - 27000000 CDCCCC3D - PUSH_FLOAT            0.1                  *///0.1
/* 384 - 27000000 00000000 - PUSH_FLOAT            0.0                  *///0.0
/* 385 - 27000000 CDCCCC3D - PUSH_FLOAT            0.1                  *///0.1
/* 386 - 27000000 0000803F - PUSH_FLOAT            1.0                  *///1.0
/* 387 - 49000000 04000000 - PUSH_VECTOR            4                    *///<0.1, 0.0, 0.1, 1.0>
/* 388 - 3D000000 04000000 - CALL_METHOD            4                    *///blur.setColor (<br, br, br, 1>, blur_duration, INTERPOLATION_BEZIER, <0.1, 0.0, 0.1, 1.0>)
/* 389 - 22000000 00000000 - REMOVE                                      */ blur.setColor (<br, br, br, 1>, blur_duration, INTERPOLATION_BEZIER, <0.1, 0.0, 0.1, 1.0>);
/* 390 - 23000000 00000000 - PUSH_UNDEFINED                              */
/* 391 - 3F000000 00000000 - RET                                        */}
/* 392 - 3E000000 02000000 - CALL_CONSTRUCTOR      2                    *///)
/* 393 - 36000000 00000000 - SETITEM                                    */
/* 394 - 22000000 00000000 - REMOVE                                      */);
/* 395 - 2E000000 21000000 - PUSH_GLOBAL            System              *///System
/* 396 - 2F000000 06000000 - GETATTR                timer                *///System.timer
/* 397 - 26000000 02000000 - PUSH_INT              2                    *///2
/* 398 - 2E000000 22000000 - PUSH_GLOBAL            OneShotTimer        *///OneShotTimer
/* 399 - 2E000000 12000000 - PUSH_GLOBAL            whole_start_time    *///whole_start_time
/* 400 - 2A000001 92010000 - PUSH_FUNC              0    1    402      */System.timer[2] = new OneShotTimer(whole_start_time, function()
/* 401 - 39000000 AE010000 - JUMP                              430      */{
/* 402 - 2E000000 15000000 - PUSH_GLOBAL            blur                *///blur
/* 403 - 30000000 05000000 - GETATTR_KEEPOBJ        setColor            *///blur.setColor
/* 404 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 405 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 406 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 407 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 408 - 49000000 04000000 - PUSH_VECTOR            4                    *///4
/* 409 - 2E000000 0D000000 - PUSH_GLOBAL            whole_duration      *///whole_duration
/* 410 - 2E000000 1D000000 - PUSH_GLOBAL            INTERPOLATION_BEZIER *///INTERPOLATION_BEZIER
/* 411 - 27000000 CDCCCC3D - PUSH_FLOAT            0.1                  *///0.1
/* 412 - 27000000 00000000 - PUSH_FLOAT            0.0                  *///0.0
/* 413 - 27000000 CDCCCC3D - PUSH_FLOAT            0.1                  *///0.1
/* 414 - 27000000 0000803F - PUSH_FLOAT            1.0                  *///1.0
/* 415 - 49000000 04000000 - PUSH_VECTOR            4                    *///<0.1, 0.0, 0.1, 1.0>
/* 416 - 3D000000 04000000 - CALL_METHOD            4                    *///blur.setColor (<br, br, br, 0>, whole_duration, INTERPOLATION_BEZIER, <0.1, 0.0, 0.1, 1.0>)
/* 417 - 22000000 00000000 - REMOVE                                      */ blur.setColor (<br, br, br, 0>, whole_duration, INTERPOLATION_BEZIER, <0.1, 0.0, 0.1, 1.0>);
/* 418 - 2E000000 16000000 - PUSH_GLOBAL            footer              *///footer
/* 419 - 30000000 05000000 - GETATTR_KEEPOBJ        setColor            *///footer.setColor
/* 420 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 421 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 422 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 423 - 26000000 01000000 - PUSH_INT              1                    *///1
/* 424 - 49000000 04000000 - PUSH_VECTOR            4                    *///<br, br, br, 1>
/* 425 - 2E000000 0D000000 - PUSH_GLOBAL            whole_duration      *///whole_duration
/* 426 - 3D000000 02000000 - CALL_METHOD            2                    *///footer.setColor (<br, br, br, 1>, whole_duration)
/* 427 - 22000000 00000000 - REMOVE                                      */ footer.setColor (<br, br, br, 1>, whole_duration);
/* 428 - 23000000 00000000 - PUSH_UNDEFINED                              */
/* 429 - 3F000000 00000000 - RET                                        */}
/* 430 - 3E000000 02000000 - CALL_CONSTRUCTOR      2                    *///)
/* 431 - 36000000 00000000 - SETITEM                                    */
/* 432 - 22000000 00000000 - REMOVE                                      */);
/* 433 - 2E000000 21000000 - PUSH_GLOBAL            System              *///System
/* 434 - 2F000000 06000000 - GETATTR                timer                *///System.timer
/* 435 - 26000000 03000000 - PUSH_INT              3                    *///3
/* 436 - 2E000000 22000000 - PUSH_GLOBAL            OneShotTimer        *///OneShotTimer
/* 437 - 2E000000 13000000 - PUSH_GLOBAL            fade_start_time      *///fade_start_time
/* 438 - 2A000002 B8010000 - PUSH_FUNC              0    2    440      */System.timer[3] = new OneShotTimer(fade_start_time, function()
/* 439 - 39000000 02020000 - JUMP                              514      */{
/* 440 - 2D000000 01000000 - PUSH_LOCAL            1                    *///Unamed_Variable
/* 441 - 27000000 CDCC4C3F - PUSH_FLOAT            0.8                  *///0.8
/* 442 - 27000000 00000000 - PUSH_FLOAT            0.0                  *///0.0
/* 443 - 27000000 CDCC4C3F - PUSH_FLOAT            0.8                  *///0.8
/* 444 - 27000000 0000803F - PUSH_FLOAT            1.0                  *///1.0
/* 445 - 49000000 04000000 - PUSH_VECTOR            4                    *///<0.8, 0.0, 0.8, 1.0>
/* 446 - 01000000 00000000 - ASSGN                                      *///Unamed_Variable = <0.8, 0.0, 0.8, 1.0>
/* 447 - 22000000 00000000 - REMOVE                                      */var Unamed_Variable = <0.8, 0.0, 0.8, 1.0>;
/* 448 - 2E000000 16000000 - PUSH_GLOBAL            footer              *///footer
/* 449 - 30000000 05000000 - GETATTR_KEEPOBJ        setColor            *///footer.setColor
/* 450 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 451 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 452 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 453 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 454 - 49000000 04000000 - PUSH_VECTOR            4                    *///<br, br, br, 0>
/* 455 - 2E000000 0F000000 - PUSH_GLOBAL            fade_duration        *///fade_duration
/* 456 - 2E000000 1D000000 - PUSH_GLOBAL            INTERPOLATION_BEZIER *///INTERPOLATION_BEZIER
/* 457 - 2D000000 01000000 - PUSH_LOCAL            1                    *///Unamed_Variable
/* 458 - 3D000000 04000000 - CALL_METHOD            4                    *///footer.setColor (<br, br, br, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable)
/* 459 - 22000000 00000000 - REMOVE                                      */ footer.setColor (<br, br, br, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable);
/* 460 - 2E000000 14000000 - PUSH_GLOBAL            logo                *///logo
/* 461 - 30000000 05000000 - GETATTR_KEEPOBJ        setColor            *///logo.setColor
/* 462 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 463 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 464 - 2E000000 1A000000 - PUSH_GLOBAL            br                  *///br
/* 465 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 466 - 49000000 04000000 - PUSH_VECTOR            4                    *///<br, br, br, 0>
/* 467 - 2E000000 0F000000 - PUSH_GLOBAL            fade_duration        *///fade_duration
/* 468 - 2E000000 1D000000 - PUSH_GLOBAL            INTERPOLATION_BEZIER *///INTERPOLATION_BEZIER
/* 469 - 2D000000 01000000 - PUSH_LOCAL            1                    *///Unamed_Variable
/* 470 - 3D000000 04000000 - CALL_METHOD            4                    *///logo.setColor (<br, br, br, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable)
/* 471 - 22000000 00000000 - REMOVE                                      */ logo.setColor (<br, br, br, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable);
/* 472 - 2E000000 07000000 - PUSH_GLOBAL            light                *///light
/* 473 - 30000000 07000000 - GETATTR_KEEPOBJ        setPosition          *///light.setPosition
/* 474 - 2E000000 07000000 - PUSH_GLOBAL            light                *///light
/* 475 - 2F000000 02000000 - GETATTR                position            *///light.position
/* 476 - 27000000 0000C03F - PUSH_FLOAT            1.5                  *///1.5
/* 477 - 27000000 0000C03F - PUSH_FLOAT            1.5                  *///1.5
/* 478 - 04000000 00000000 - MUL                                        *///1.5 * 1.5
/* 479 - 26000000 01000000 - PUSH_INT              1                    *///1
/* 480 - 27000000 0000C03F - PUSH_FLOAT            1.5                  *///1.5
/* 481 - 04000000 00000000 - MUL                                        *///1 * 1.5
/* 482 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 483 - 49000000 03000000 - PUSH_VECTOR            3                    *///<1.5 * 1.5, 1 * 1.5, 0>
/* 484 - 02000000 00000000 - ADD                                        *///light.position + <1.5 * 1.5, 1 * 1.5, 0>
/* 485 - 2E000000 0F000000 - PUSH_GLOBAL            fade_duration        *///fade_duration
/* 486 - 2E000000 1D000000 - PUSH_GLOBAL            INTERPOLATION_BEZIER *///INTERPOLATION_BEZIER
/* 487 - 2D000000 01000000 - PUSH_LOCAL            1                    *///Unamed_Variable
/* 488 - 3D000000 04000000 - CALL_METHOD            4                    *///light.setPosition (light.position + <1.5 * 1.5, 1 * 1.5, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable)
/* 489 - 22000000 00000000 - REMOVE                                      */ light.setPosition (light.position + <1.5 * 1.5, 1 * 1.5, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable);
/* 490 - 2E000000 07000000 - PUSH_GLOBAL            light                *///light
/* 491 - 30000000 05000000 - GETATTR_KEEPOBJ        setColor            *///light.setColor
/* 492 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 493 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 494 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 495 - 49000000 03000000 - PUSH_VECTOR            3                    *///<0, 0, 0>
/* 496 - 2E000000 0F000000 - PUSH_GLOBAL            fade_duration        *///fade_duration
/* 497 - 2E000000 1D000000 - PUSH_GLOBAL            INTERPOLATION_BEZIER *///INTERPOLATION_BEZIER
/* 498 - 2D000000 01000000 - PUSH_LOCAL            1                    *///Unamed_Variable
/* 499 - 3D000000 04000000 - CALL_METHOD            4                    *///light.setColor (<0, 0, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable)
/* 500 - 22000000 00000000 - REMOVE                                      */ light.setColor (<0, 0, 0>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable);
/* 501 - 2E000000 07000000 - PUSH_GLOBAL            light                *///light
/* 502 - 30000000 08000000 - GETATTR_KEEPOBJ        setAttenuation      *///light.setAttenuation
/* 503 - 26000000 00000000 - PUSH_INT              0                    *///0
/* 504 - 26000000 01000000 - PUSH_INT              1                    *///1
/* 505 - 26000000 04000000 - PUSH_INT              4                    *///4
/* 506 - 49000000 03000000 - PUSH_VECTOR            3                    *///<0, 1, 4>
/* 507 - 2E000000 0F000000 - PUSH_GLOBAL            fade_duration        *///fade_duration
/* 508 - 2E000000 1D000000 - PUSH_GLOBAL            INTERPOLATION_BEZIER *///INTERPOLATION_BEZIER
/* 509 - 2D000000 01000000 - PUSH_LOCAL            1                    *///Unamed_Variable
/* 510 - 3D000000 04000000 - CALL_METHOD            4                    *///light.setAttenuation (<0, 1, 4>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable)
/* 511 - 22000000 00000000 - REMOVE                                      */ light.setAttenuation (<0, 1, 4>, fade_duration, INTERPOLATION_BEZIER, Unamed_Variable);
/* 512 - 23000000 00000000 - PUSH_UNDEFINED                              */
/* 513 - 3F000000 00000000 - RET                                        */}
/* 514 - 3E000000 02000000 - CALL_CONSTRUCTOR      2                    *///)
/* 515 - 36000000 00000000 - SETITEM                                    */
/* 516 - 22000000 00000000 - REMOVE                                      */);
/* 517 - 45000000 00000000 - HALT                                        */
</syntaxhighlight>}}


{{File Formats}}<noinclude>[[Category:Main]]</noinclude>
{{File Formats}}<noinclude>[[Category:Main]]</noinclude>

Revision as of 05:29, 10 November 2014

Description

Virtual Script Machine Instructions (VSMX) file (filename extension .jsx, a .js compiled)

History:

Rcomage can compile/decompile .jsx (VSMX) <=> .JS (need to change the VSMX version at offset 0x04 to 01 (PSP?) instead of 02 (PS3?)

but it's very buggy and usually doesn't work right
  • VSMX files are used on:
    • PSP (inside RCO's from video/music UMDs, and two lftv firmware RCO's in flash0/vsh/resource/...)
    • PS3 (inside RAF's: on Coldboot.raf, PS3 themes animated) and some PS3 Games?
    • PSVita & PS4 (unknown)

VSMX Structure

Header

VSMX Header
Offset Size Example (hex)
from coldboot.jsx
Value Notes
0x00 0x04 0x56534D58 VSMX Magic
0x04 0x04 0x00000200 2.0 Mayor version.Minor version (PSP=1.0) (PS3=2.0)
0x08 0x04 0x34000000 0x34 absolute offset of OPCODE table (also, header length)
0x0C 0x04 0x30100000 0x1030 length of OPCODE table (also, number of entries = length / 8)
0x10 0x04 0x64100000 0x1064 absolute offset of STRING table
0x14 0x04 0x7A000000 0x7A length of STRING table
0x18 0x04 0x08000000 0x8 number of entries inside STRING table
0x1C 0x04 0xDE100000 0x10DE absolute offset of ATTR table
0x20 0x04 0xA2000000 0xA2 length of ATTR table
0x24 0x04 0x09000000 0x9 number of entries inside ATTR table
0x28 0x04 0x80110000 0x1180 absolute offset of GLOBAL table
0x2C 0x04 0x70010000 0x170 length of GLOBAL table
0x30 0x04 0x23000000 0x23 number of entries inside GLOBAL table
  • Table access related opcodes: (this is here by now just as an argument of why to choose this names for the tables, if there are better names please suggest/discuss or change them)
    • 0x28 PUSH_STRING
    • 0x2F GETATTR, 0x30 GETATTR_KEEPOBJ
    • 0x2E PUSH_GLOBAL

OPCODE Table

  • Instructions length: 4+4 bytes? (or 3+1+4)
  • See Pastebin (without the header) of the coldboot.
OpCode
(short)
Mnemonics
(official)
Mnemonics
(rcomage)
group Notes
0x00 NOP UNKNOWN_0 - -
0x01 ASSGN ASSIGN Assignment Operators -
0x02 ADD ADD Arithmetic Operators -
0x03 SUB SUBTRACT Arithmetic Operators -
0x04 MUL MULTIPLY Arithmetic Operators -
0x05 DIV DIVIDE Arithmetic Operators -
0x06 MOD MODULUS Arithmetic Operators -
0x07 TO_NUMBER POSITIVE - -
0x08 CSIGN NEGATE - -
0x09 NOT NOT - -
0x0A INC PRE_INCREMENT Arithmetic Operators -
0x0B DEC PRE_DECREMENT Arithmetic Operators -
0x0C POST_INC INCREMENT Arithmetic Operators -
0x0D POST_DEC DECREMENT Arithmetic Operators -
0x0E CMPEQ TEST_EQUAL Compare Operators -
0x0F CMPNEQ TEST_NOT_EQUAL Compare Operators -
0x10 CMPSEQ TEST_IDENTITY Compare Operators -
0x11 CMPSNEQ TEST_NON_IDENTITY Compare Operators -
0x12 CMPLT TEST_LESS_THAN Compare Operators -
0x13 CMPLE TEST_LESS_EQUAL_THAN Compare Operators -
0x14 CMPGE TEST_MORE_EQUAL_THAN Compare Operators -
0x15 CMPGT TEST_MORE_THAN Compare Operators -
0x16 INSTANCEOF UNKNOWN_16 - -
0x17 IN UNKNOWN_17 - -
0x18 TYPEOF TYPEOF - -
0x19 BIT_AND BINARY_AND Bitwise Operators -
0x1A BIT_XOR BINARY_XOR Bitwise Operators -
0x1B BIT_OR BINARY_OR Bitwise Operators -
0x1C BIT_NOT BINARY_NOT Bitwise Operators -
0x1D LSHIFT LSHIFT Bitwise Operators -
0x1E S_RSHIFT RSHIFT Bitwise Operators -
0x1F U_RSHIFT UNSIGNED_RSHIFT Bitwise Operators -
0x20 COPY STACK_PUSH - -
0x21 SWAP UNKNOWN_21 - -
0x22 REMOVE END_STATEMENT - -
0x23 PUSH_UNDEFINED CONST_NULL Data Types -
0x24 PUSH_NULL CONST_EMPTY_ARRAY Data Types -
0x25 PUSH_BOOL CONST_BOOL Data Types -
0x26 PUSH_INT CONST_INT Data Types -
0x27 PUSH_FLOAT CONST_FLOAT Data Types -
0x28 PUSH_STRING CONST_STRING Data Types -
0x29 PUSH_OBJECT CONST_OBJECT - -
0x2A PUSH_FUNC FUNCTION - byte 4 uses a "flag"
0x2B PUSH_ARRAY CONST_ARRAY - -
0x2C PUSH_THIS THIS_OBJECT - -
0x2D PUSH_LOCAL UNNAMED_VARIABLE - -
0x2E PUSH_GLOBAL NAME - -
0x2F GETATTR PROPERTY - -
0x30 GETATTR_KEEPOBJ METHOD - -
0x31 SETATTR SET - -
0x32 DELATTR UNSET - -
0x33 APPEND_ATTR OBJECT_ADD_ATTRIBUTE - -
0x34 GETITEM ARRAY_INDEX - -
0x35 GETITEM_KEEPOBJ UNKNOWN_35 - -
0x36 SETITEM ARRAY_INDEX_ASSIGN - -
0x37 DELITEM UNKNOWN_37 - -
0x38 APPEND_ITEM ARRAY_PUSH - -
0x39 JUMP JUMP - -
0x3A JUMPT JUMP_IF_TRUE - -
0x3B JUMPF JUMP_IF_FALSE - -
0x3C CALL_FUNC CALL_FUNCTION - -
0x3D CALL_METHOD CALL_METHOD - -
0x3E CALL_CONSTRUCTOR CALL_INBUILT / CALL_NEW - -
0x3F RET RETURN - -
0x40 THROW UNKNOWN_40 - -
0x41 TRYBLK_IN UNKNOWN_41 - -
0x42 TRYBLK_OUT UNKNOWN_42 - -
0x43 CATCH_FINALLYBLK_IN UNKNOWN_43 - -
0x44 CATCH_FINALLYBLK_OUT UNKNOWN_44 - -
0x45 HALT END_SCRIPT - -
0x46 DEBUG_FILE DEBUG_FILE - -
0x47 DEBUG_LINE DEBUG_LINE - -
0x48 GETITEM_KEEPOBJNAME UNKNOWN_48 - -
0x49 PUSH_VECTOR UNKNOWN_49 / MAKE_FLOAT_ARRAY Data Types -
0x4A GET_VECTOR_ELEMENT UNKNOWN_4a - -
0x4B GET_VECTOR_ELEMENT_KEEPVECTOR UNKNOWN_4b - -
0x4C ASSGN_VECTOR_ELEMENT UNKNOWN_4c - -
0x4D SETATTR_VECTOR_ELEMENT UNKNOWN_4d - byte 4 uses a vector identifyer ->
0x4E SETITEM_VECTOR_ELEMENT UNKNOWN_4e -

Arithmetic Operators

May be move later to PlayStation JavaScript or make it as template

Arithmetic operators are used to perform arithmetic between variables and/or values.

OpCode (VSMX) Mnemonics (VSMX) Syntax (PSJS) Description:
0x02 ADD + Addition
0x03 SUB - Subtraction
0x04 MUL * Multiplication
0x05 DIV / Division
0x06 MOD % Modulus (division remainder)
0x0A INC ++ Increment
0x0B DEC -- Decrement
0x0C POST_INC ++ Increment
0x0D POST_DEC -- Decrement

Bitwise Operators

Bit operators work on 32 bits numbers.

Any numeric operand in the operation is converted into a 32 bit number.

OpCode (VSMX) Mnemonics (VSMX) Syntax (PSJS) Description:
0x19 BIT_AND & AND
0x1B BIT_OR | OR
0x1C BIT_NOT ~ NOT
0x1A BIT_XOR ^ XOR
0x1D LSHIFT << Left Shift
0x1E S_RSHIFT >> Right Shift

Compare Operators

Comparison and Logical operators are used to test for true or false.

Comparison operators are used in logical statements to determine equality or difference between variables or values.

OpCode (VSMX) Mnemonics (VSMX) Syntax (PSJS) Description:
0x0E CMPEQ == Equality
0x10 CMPSEQ === Strict Equal value and equal type
0x0F CMPNEQ != Inequality
0x11 CMPSNEQ !== Strict not equal value or not equal type
0x15 CMPGT > Greater Than
0x14 CMPGE >= Greater Than or Equal To
0x12 CMPLT < Less Than
0x13 CMPLE <= Less Than or Equal To

Logical Operators

Comparison and Logical operators are used to test for true or false.

Logical operators are used to determine the logic between variables or values.

OpCode (VSMX) Mnemonics (VSMX) Syntax (PSJS) Description:
- || or
- && and

STRING table

ATTR Table

GLOBAL Table

VSMX Decompilation sample

This is an example of the decodification and decompilation made with the VSMX script contained inside coldboot.raf. The decompilation has been made by hand because the vsmx decompiler by ZiNgA BuRgA doesnt supports vectors and crashes, the purpose is to serve as an explain of how the opcodes works, the features that was added to VSMX v2 format for PS3, and as an overall explain of how to decompile other VSMX files

The file can be saved as .js and compiled directlly (there is no need to remove the comments), for a better view of the decompiled code without the comments in PlayStation JavaScript format see coldboot.raf page

  • Form left to right:
    • NUM - Is the opcode number (important because the JUMPS are pointers to other opcodes identifyed by his number)
    • OPCODE - The hex value that identifyes the opcode (first byte)... second byte reserved?... third byte unknown... fourth byte argument
    • VALUE - Any value, or pointer to internal VSMX tables (4 bytes)
    • OPCODE NAME - Self explanatory, is a direct conversion from the hex value to the name
    • VALUES CONVERSION - For pointers are text strings extracted from internal VSMX tables, Data types are the conversion from hex, JUMPS and FUNCTS contains also identifyers for other opcodes and arguments
    • DECOMPILED PSJS CODE - The source code in PlayStation JavaScript format ready to compile, it will generate a coldboot.jsx exactly like the one extracted from coldboot.raf by the CXML decompiler tool
Code Sample