This section describes how to use the interface of the Sony PlayStation-specific Direct Translator. For information on how to run the translator, see Using the MakeGame Plug-in on page 9 and Using Translators from the Command Line on page 15. |
Download the PlayStation translator and documentation from the Sony web site or the Sony developer CD.
Sony distributes the PlayStation translator as a non-encrypted tar file containing the translator, TIM image module, source code and Makefile.
GetPlayStation converts Alias wire models to PlayStation file formats.
The translator archive is a non-encrypted, compressed tar file.
To install the PlayStation translator:
InstallGame -e -f <path to tar file>
When you run the translator from MakeGame, the Sony PlayStation Export window appears. Use this window to set the options described below, then click OK to start converting.
Output the RSD group (PLY, MAT, GRP, and RSD files) for all geometry in the scene.
Output the TMD file for all geometry in the scene. Choose the TMD file format from the pop-up menu.
Standard - output a TMD file for the specified frames of animation.
Difference - output a VDF and NDF file for the specified animation frames for MIME animation.
Sequence - output a sequence of TMD files for the specified frames.
Output a TOD file for animation (only available if the scene contains animation). Choose the TOD file format from the pop-up menu.
Rot Std - transfer Alias rotation matrices directly (more accurate).
Rot Opt - same as Rot Std, but optimized (do not output data for objects that have "identity" matrices or TRS components).
TRS Std - decompose Alias rotation matrices into TRS values.
TRS Opt - same as above, but optimized (do not output data for objects that have "identity" matrices or TRS components).
This option is not implemented in this version. The option is included for use with a custom-written translator.
This option is not implemented in this version. The option is included for use with a custom-written translator.Choose from Binary, PC ASCII text, or UNIX ASCII text.
ON - output a NET file containing MetaCycle information.
OFF - output the specified range of animation frames.
Tiled - tile the texture if the UV coordinates for the texture are outside the 0.0 - 1.0 range. Texture size is maintained.
Not Tiled - do not tile the texture if the UV coordinates are outside the 0.0 - 1.0 range. The UV coordinates are clipped.
By material - output the texture according to the materials assigned in Alias.
Flat - convert all materials to flat shading.
Gouraud - convert all materials to Gouraud shading.
Click to open the Video RAM Mapper window. This window lets you load textures into the video RAM of the PlayStation. See Video RAM Mapper on page 38.
The translator will scale the whole model by this factor before conversion.
Replace lights with a material that simulates the light source.
Triangulate all polygons in the scene.
Turn on backfacing in the MAT file.
Write all messages to STDERR (the shell or the console window) during the conversion.
Enter a filename for the TMD and TOD files.
This option is not implemented in this version. The option is included for use with a custom-written translator.
Start and end frames of animation to convert.
The Video RAM Mapper, also called the VMapper, allows you to place the textures used in the scene into the video RAM of the PlayStation development system. PlayStation video RAM is made up of 32 pages (numbered 0 to 31), represented in the VMapper by two rows of vertical bars.
To load a texture into video RAM
The texture appears in the texture swatch area.
A rectangle appears. This rectangle represents the size (in memory) of the texture.
The light blue rectangles represent the active video area (the part of memory reserved for the visible display). You cannot place textures in this area. The amount of space taken by the active video area reflects the screen size. |
horizontal resolution of the PlayStation video screen.
vertical resolution of the PlayStation video screen.
Changing these options changes the size of the active video area (the part of memory reserved for the visible display). You cannot place textures in this area.
Click to load a saved video RAM configuration.
Textures that were saved in a previous session but are not available now will appear as unmovable black rectangles.
If the Reload option (in the MakeGame window) was turned off, the texture swatch may not update. However, the textures will output correctly.
Click to save a video RAM configuration to disk.
The Textures section displays the PlayStation video RAM information for the selected texture.
Page of video RAM in which the texture resides.
Lock the position of the texture in video RAM.
Horizontal and vertical offset of the texture in the page.
Color depth of the converted texture.
Changing the color depth affects the size of the texture in memory.
Four bit (16 color) textures have a yellow outline. Eight bit (256 color) textures have a green outline. Sixteen bit (65536 color) textures have a blue outline.
horizontal and vertical location of the color look-up table in Video RAM.
Turn on the transparency (STP) bit for color (non-black) pixels.
Turn on the transparency (STP) bit for black pixels.
Dither when generating a palette mapped image.
Try to use the original TIM file from the Alias shader as the texture. The original TIM file is copied to the output directory and the VRAM display is updated.
This option is not implemented in this version. The option is included for use with a custom-written translator.
If you turn the GUI checkbox off in the MakeGame window, enter these options in the Option field to control the conversion:
If you do not use the GUI (and the video RAM mapper tool), the translator will not output texture information. |
Most of the command line options duplicate controls in the GUI window. See Options on page 36 for a description of the GUI interface.
The directory where exported files are created. This is the same as the Export directory field of the MakeGame window.
Parameters: a valid path to a directory
Default: '.' (the current working directory)
Enables the translator to output files with DOS-compatible filenames of the form DTF#dddd (where dddd is a 4-digit number) whenever filenames exceed the 8- and 3- character DOS name and type limits. There is no easy way to match these numbers to the original filenames.
A shell script to run before conversion (for example, /usr/aw/alias/ODS/Games/bin/psx_begscript).
Parameters: a valid path to a directory
A shell script to run after conversion (for example, /usr/aw/alias/ODS/Games/bin/psx_endscript).
Parameters: a valid path to a directory
The pathname of the DTL-H1500 loader program. If this variable is set, the psx_endscript script will use the DTL-H1500 to view the converted model.
Parameters: a valid path to a directory
The default directory for the Replace Texture button.
Parameters: a valid path to a directory
The directory for loading and saving vrm files.
Parameters: a valid path to a directory
Sets the limit of tolerance for determining if a polygon is degenerate. (If set < 0.0, then polygons will never be found to be degenerate, even if they actually are.)
Parameters: a floating point value (units = degrees)
Sets a flag to enable output of difference matrix/TRS components instead of absolute matrices. This output is not fully implemented in the current translator.
Default: outputs absolute matrix/TRS values
Adds the texture page offset to the texture UV values (included for backwards compatibility with an older version of the translator).
You can type environment variable names in Alias text boxes (such as the MakeGame Options field). The text box will replace the variable with its value. |
The demo Viewer batch file requires that the output files be named test (test.tmd, test.tod, test.net, and *.tim). |
Alias|Wavefront supplies demo viewers for three different types of PlayStation developer configuration:
The viewers are based on the provided PlayStation demo viewer source code.
On a PC with the DTL-2000 PlayStation Card
To test your PlayStation output, you must download the output to a PC on the network running the development environment and the Alias|Wavefront Demo Viewer. This process can be automated with the supplied shell scripts, but first you must install the Demo Viewer on the development PC.
To install the demo viewer on a development PC:
cd <hard drive letter>:\
mkdir awgames
cd awgames
mkdir bin
mkdir psx
cd psx
xcopy \\<sgimachinename>\usr\aw\alias\ODS\Games\source\PlayStation\tools\PC\*
copy chk_bios.com ..\bin
copy netv.bat ..\bin
copy rerun.bat ..\bin
front-end batch file for netv.cpe (loads the TMD/TIM/TOD/NET files to the expected memory locations and runs netv.cpe).
batch file, watches the user-specified directory, and runs netv.bat when new test files are saved. Use this batch file on the PC to automatically view models on the PlayStation when they are converted.
example executable Demo Viewer.
source code for the Demo Viewer.
PC makefile for the Demo Viewer.
utility needed by the Demo Viewer (checks the development machine for the presence of the dex BIOS).
secondary batch file needed by the Demo Viewer (checks if the dex BIOS is loaded and resets the PlayStation development console if necessary).
On an SGI Workstation with the DTL-H1500 Stand-alone box
To use the H1500 viewer, set the $DT_PSX_H1500_LOADER variable to the pathname of the H1500 viewer executable on your SGI workstation:
setenv DT_PSX_H1500_LOADER /usr/aw/alias/ODS/Games/bin/PSXloader
When the sample psx_endscript script checks that the variable is set, it will run the demo viewer on the development PlayStation.
When you install the PlayStation translator, the H1500 version of the demo viewer is installed in the Dtplugins directory. It is a CPE executable.
The H1500 development environment must be set up, with the utilities (such as psbload and psrun) in your $PATH. |
On an SGI Workstation with the DTL-H3050 Serial Cable
To use the DTL-H3050 serial cable, you must load the files onto the development machine with the sbload program, then run the code with the srun program. The PSXloader program checks for the following environment variables:
The path of the SGI executable to use to download a file through the 3050 serial cable (usually sbload).
The path of the SGI executable to use to send the run command to the development system through the 3050 serial cable (usually srun).
sbload and srun are available from the PSX development web site. |
sbload and srun download only .exe files (not CPE files). The files supplied by Alias are currently in cpe format and |
They will download .EXE files only (not CPE format), The Alias supplied files are currently in CPE format and cannot be downloaded directly. You must convert them to .EXE format with tools supplied by Sony. |
To download and test from UNIX, use the shell scripts psx_begscript and psx_endscript:
setenv DT_PSX_BEGSCRIPT /usr/aw/alias/ODS/Games/bin/psx_begscript
setenv DT_PSX_ENDSCRIPT /usr/aw/alias/ODS/Games/bin/psx_endscript
Running the Demo Viewer on the PC
netv <test dir>
Where test dir is a directory containing the output files (for example, h:\GET\download).
shownetw <test dir>
The Demo Viewer batch file requires that the output files be named test (test.tmd, test.tod, test.net, and *.tim). |