-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathReadme_for_PS3SDK.txt
323 lines (240 loc) · 13.5 KB
/
Readme_for_PS3SDK.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
PLAYSTATION(R)3 COLLADA Package
Copyright (C) 2009 Sony Computer Entertainment Inc.
All Rights Reserved.
==============================================================================
Contents of COLLADA Package
==============================================================================
This package includes the COLLADA DOM and the COLLADA Viewer. Everything in
this package can be built to run on either PS3 or a Windows PC. For additional
information on tools and plugins that support COLLADA, or to get help from the
Internet community of COLLADA users, please visit www.collada.org
The COLLADA DOM is a set of libraries for loading and saving COLLADA documents
that can contain 2D, 3D, physics and other types of content. It allows developers
to create applications that can exchange COLLADA documents with commercial content
creation tools such as Maya, Max or Softimage.
The COLLADA Viewer is a general purpose 3D viewer for COLLADA documents. It is
provided as sample code to show how to use the COLLADA DOM and to demonstrate
the kinds of content that can be stored in a COLLADA document. The included
sample COLLADA documents can be loaded into the Viewer to demonstrate these
features. The COLLADA Viewer and its sample documents replace all the
hard coded COLLADA demos that were included with older PS3 releases.
+--dom The DOM library for Parsing COLLADA Documents
| +--CodeGen
| +--external-libs Open source libraries used by DOM
| +--include
| +--license
| +--make
| +--projects Project files for PS3, Windows and Mac OS X target
| +--release
| +--src
| +--...
|
+--fx The COLLADA effect loader library for Cg shaders
| +--build
| +--include
| +--license
| +--make
| +--projects Project files for PS3, Windows and Mac OS X target
| +--src
| +--...
|
+--License_Folder Licenses for open source software included in COLLADA Viewer
| +--other
| +--license_e.txt
|
+--rt The Runtime Rendering library that uses OpenGL ES or PSGL
| +--build
| +--external-libs Open source libraries used by rt module
| +--include
| +--make
| +--projects Project files for PS3, Windows and Mac OS X target
| +--src
| +--...
|
+--viewer
| +-bin The application binary that uses all software libraries above to make a COLLADA document viewer
| +-samples.zip Compressed art assets and shaders used by COLLADA Viewer
| +-samples.doc Description of COLLADA sample documents
|
| +-make
| +-common.mk
| +-rules.mk
| +-viewer.mk
|
| +-projects
| +-VC8-PS3 Visual Studio 2005 project files and platform-specific source code for PS3 COLLADA Viewer
| +-VC8-Win Visual Studio 2005 project files and platform-specific source code for Windows native COLLADA Viewer
| +-VC9-PS3 Visual Studio 2008 project files and platform-specific source code for PS3 COLLADA Viewer
| +-VC9-Win Visual Studio 2008 project files and platform-specific source code for Windows native COLLADA Viewer
| +--...
|
| +-license.txt
| +-Makefile
|
+--Makefile Makefile (for Linux and MSYS) to build COLLADA Viewer and the necessary libraries
+--Readme_e.txt This file
=============================
Requirements to build for PS3
=============================
[Windows host/MSYS]
MinGW (Minimalist GNU for Windows)
MSYS with GNU make version 3.81
PS3 SDK toolchain
FW sample framework (prebuilt)
[Windows host/Visual Studio]
Visual Studio 2005 or Visual Studio 2008
PS3 SDK toolchain
ProDG Visual Studio integration
FW sample framework (prebuilt)
[Linux]
GNU make version 3.81
PS3 SDK toolchain
FW sample framework (built)
=================================
Requirements to build for Windows
=================================
[Windows native]
Visual Studio 2005 or Visual Studio 2008
Cg 2.0 Toolkit
==========================================================================
Building the COLLADA package and running the COLLADA Viewer sample for PS3
==========================================================================
These instructions will build the entire contents of the COLLADA package including
libraries and samples for the PS3. To build for the PS3, the PS3 SDK must
be installed. The build instructions include running the COLLADA Viewer
which can be used to view any of the included sample COLLADA documents.
[Windows host/MSYS]
1) Execute make utility at root level of package by typing 'make'
viewer.self will be in viewer\bin for release build (conf=release, this is the default build)
viewer.self will be in viewer\bin for debug build (conf=debug)
2) Unzip samples.zip, extract its content to viewer\bin\
3) Use ProDG Target Manager or Debugger to load viewer.self
Optionally, specify a COLLADA document (cage.dae) as command line argument when loading viewer executable
[Windows host/Visual Studio]
Project files for Visual C++ 8 (VS 2005) and Visual C++ 9 (VS 2008) are both provided. If you are using Visual C++ 9,
substitute "vc9" for "vc8" for the following instructions.
1) Open Visual Studio Solution at \viewer\projects\vc8-PS3\viewer.sln
2) Select "PS3 debug" or "PS3 release" configuration to build PS3 target
3) Unzip samples.zip, extract its content to viewer\bin\
4) Use ProDG Target Manager or Debugger to load viewer.ppu.self (release) or viewer-d.ppu.self in \viewer\bin
Optionally, specify a COLLADA document (cage.dae) as command line argument when loading viewer executable
[Linux]
1) Execute make utility at root level of package by typing 'make'
viewer.self will be in viewer/bin for release build (conf=release, this is the default build)
viewer.self will be in viewer/bin for debug build (conf=debug)
2) Unzip samples.zip, extract its content to viewer/bin/
3) Change directory to where the COLLADA Viewer executable is, type the following commands to load it, replace
the IP address with your PS3 IP address.
> bedbg -prepare
> dtpon -d 10.98.12.34
> bedbg -nodebug viewer.self
Type the following commands to terminate COLLADA Viewer
> bedbg -T
> dtpoff -d 10.98.12.34
==============================================================================
Building the COLLADA package and running the COLLADA Viewer sample for Windows
==============================================================================
These instructions will build the entire contents of the COLLADA package including
libraries and samples for Windows. All the libraries needed to build for Windows
are included in this package or come with Visual Studio. The instructions include
running the COLLADA Viewer which can be used to view any of the included sample
COLLADA documents.
Project files for Visual C++ 8 (VS 2005) and Visual C++ 9 (VS 2008) are both provided. If you are using Visual C++ 9,
substitute "vc9" for "vc8" for the following instructions.
1) Open Visual Studio Solution at \viewer\projects\vc8-Win\viewer.sln
2) Select "Debug" or "Release" configuration to build Windows executable
3) viewer.exe (release) or viewer-d.exe(debug) will be in \viewer\bin
4) Unzip samples.zip, extract its content to \viewer\bin\
5) Open up a DOS Shell window, change directory to \viewer\bin, type "viewer.exe duck.dae" to view COLLADA document "duck.dae"
===========================
COLLADA Viewer button usage
===========================
[PS3]
Up Navigate the document browser upward
Down Navigate the document browser downward
Cross Load the document browser selected COLLADA document
Select Next camera view
L1 Zoom out, move camera away from the focus point
L2 Zoom in, move camera closer to the focus point
L3 Toggle Browser thumbnail display
R3 Toggle wireframe display
Left analog stick Move camera and focus point up, down, left, right
Right analog stick Rotate camera up, down, left right
[Windows native]
Keybroad:
Tab Next camera
M Increase key press and mouse responsiveness by a factor of 25%
N Decrease key press and mouse responsiveness by a factor of 25%
Note: M & N key presses affect the responsiveness of W/S/A/D/X/Space keys, left mouse click, right mouse click and mouse wheel
Q Toggle Wireframe
K Show node hierarchy with lines
L Toggle Lighting mode
P Toggle animation
F1 Toggle full screen
W Move camera closer to the focus point, zoom in
S Move camera away from the focus point, zoom out
A Move camera and focus point to the left
D Move camera and focus point to the right
Space Move camera and focus point to the up
X Move camera and focus point to the down
F Change triangle/quad culling setting; rotate between frontface-culling/no-culling/backface-culling
Mouse:
Wheel Up Move camera closer to the focus point, zoom in
Wheel Down Move camera away from the focus point, zoom out
Left Click Move Rotate camera up, down, left and right
Right Click Move Move camera and focus point up, down, left, right
Middle Click Next camera
====================================
How To use SPU-Optimized Bullet 2.73
====================================
By default, the PS3 COLLADA viewer does not run with physics simulation. You could enable the SPU-optimized physics simulation on PS3
with the following changes:
1) Download and install the Bullet package
a. Download open source bullet-2.73-*.zip from http://code.google.com/p/bullet/downloads/list
b. Unzip bullet-2.73 in ${YOUR_BULLET_PATH} - any destination directory of your choice
c. Download spubullet-2.73-*.zip from https://ps3.scedev
d. Unzip spubullet-2.73-*.zip in the same directory of step (b)
e. Refer to SPU_Optimized_Bullet-Quick_Start_Guide_e.pdf in the download package to build Bullet libraries and sample app
2) In 'rt' and 'viewer' projects, add SPU_BULLET to the Preprocessor Definitions field in the Preprocessor tab for the C/C++ project configuration settings.
3) In the 'rt' and 'viewer' projects, add the following line to the Additional Include Directories field in the General tab for the C/C++ project configuration settings:
${YOUR_BULLET_PATH}\src
4) In the 'viewer' project, add the following lines to the Additional dependencies field in the Input tab for the Linker project configuration settings
${YOUR_BULLET_PATH}\src\Physics\TaskUtil\libtaskutild.a
${YOUR_BULLET_PATH}\out\debug8_ps3\libs\libBulletcollision_d.a
${YOUR_BULLET_PATH}\out\debug8_ps3\libs\libBulletdynamics_d.a
${YOUR_BULLET_PATH}\out\debug8_ps3\libs\libBulletmath_d.a
${YOUR_BULLET_PATH}\out\debug8_ps3\libs\libBulletmultithreaded_d.a
${YOUR_BULLET_PATH}\msvc_ps3\8\PS3_PPU_Debug\PS3_SpuDispatch.lib
-lspurs_stub
5) Right click 'viewer' project, add the following Existing items to the project to link with the Bullet SPU modules:
${YOUR_BULLET_PATH}\out\debug8_ps3\libs\PS3_SPURS_BulletCD_spu.ppu.obj
Note: COLLADA viewer can be configured to run SPU-optimized collision detection, but not the SPU version of physics effects constraint solver.
=============================================
Release notes for COLLADA package, April 2009
=============================================
- Memory leak fixes in COLLADA 'fx' and 'rt' libraries
- Upgrade Bullet library to version 2.73 for Windows target
- Allow PS3 COLLADA Viewer to use SPU-optimized Bullet 2.73
- COLLADA DOM library name suffix changed from 2.1 to 2.2
- Added Windows x64 target for COLLADA Viewer
- COLLADA sample error correction (dominos.dae and morph.dae)
- New test case added to 'domTest' project
- Added 'samples.doc' to describe features of sample COLLADA documents
============
Known issues
============
- To keep the COLLADA Viewer sample code simple and portable across OS's, some user generated OS/windowing events are handled in modal way
that suspends running the core code of the Viewer. When this happens, animations will stop utill the event is over, then will run very fast
for a short time as they catch up to the current realtime. This is usually only noticable when dragging the Viewer window to a new location
in Microsoft Windows but may also occur briefly on other events such as windows being covered/uncovered.
- For PS3 debug build, when unloading COLLADA document with large number of nodes, such as demo.dae and dominos.dae,
a debug exception is raised due to stack overflow.
The COLLADA Viewer uses Cell SDK framework, which sets the main PPU thread priority and stack size in its code base.
Currently there is no way to override this stack size setting without generating a linker warning on Windows host or
an error on Linux host. See below:
linker warning "L0019: symbol '__sys_process_param' multiply defined" is generated.
To get around this problem, one can modify the Cell SDK framwork code in the following way:
In <SDKROOT>\samples\fw\src\cell\FWCellMain.cpp, modify the line from
SYS_PROCESS_PARAM( 1001, 0x10000 ); // priority = 1001, stack size = 64K
to
SYS_PROCESS_PARAM( 1001, 0x18000 ); // priority = 1001, increase stack size to 96K, or other setting to suit your need