SPONSORED LINKS
Bookshelf Contents Previous Next Glossary Index Search

Nintendo 64


Converting to Nintendo 64 Source

This section describes how to use the interface of the Nintendo 64-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.

Availability

The Nintendo 64 plug-in and its documentation are available to Nintendo-certified developers only.

The part number of the Nintendo 64 translator is PA-NU64N. To receive the translator you must request it from Alias|Wavefront and show that you are a certified Nintendo 64 developer.

Nintendo 64 Translator

The Nintendo 64 translator converts Alias wire models to C source code for use with the Nintendo 64.

Special Features

Limitations

Installing

To install the Nintendo 64 translator:

Run the InstallGame script to install the Nintendo-specific libraries (see Installing Platform Specific Libraries on page 6).

See Testing the Output on page 29 for information on installing the sample viewer program on your Nintendo developer system.

File Layout

/usr/aw/alias/ODS/Games/
	bin/<shell scripts>
	Dtplugins/<translator>
	source/Nintendo/
		src/<translator source code>
		viewer/<viewer source code>
		f3dex/<new F3DEX viewer source code>

Using the Nintendo 64 Translator

Options

When you run the translator from MakeGame, the Nintendo 64 Translator window appears. Use this window to set the options described below, then click Go to start converting.

Normals

ON = store normals on the vertices.

OFF = store color data only.

Note: if you output a model with normals, make sure it is lit, and that the Lights Translated slider is greater than zero.

Reverse Vertices

reverse the order of vertices in every triangle in the model.

Volume Culling

generate volume culling code for each group in the model.

Note: this option is not currently available.

Float Matrices

include the floating point representations of the transformation matrices as comments.

DMA Transfer

generate code to do DMA transfers of animation transformations into the display list.

Transparency Order

sort the groups so transparent groups are rendered after opaque groups. This is necessary for correct Z-buffering for models with both transparent and opaque groups.

Instances

translate instances in the wire model intelligently (use the display list in the output code to simulate instances).

Network Output

output MetaCycle information and source code.

Double-Sided Polys ON = use the information in the Render Stats window to determine double-sided and single-sided groups.

OFF = translate all polygons as single-sided (with appropriate back-culling code).

Start Frame

End Frame

start and end frames of animation.

Note: these frame numbers are relative to the start frame you entered in the MakeGame window. For example, if you entered frame 65 as the start frame in the MakeGame window, then frame 0 here will refer to frame 65 of the original Alias animation.

Feedback Level

number from 0 to 9 specifying the level of messages and updates to provide during translation.

Level 0 means the translator will only print error messages. Messages above level 3 are only of interest to developers.

Lights Translated

maximum number of lights to translate into model code.

If you are outputting normals, set this number higher than zero. If you are using surface colors instead of normals, set this number to 0.

If you output normals, but set this number to 0, the model will appear brightly lit in a rainbow of colors (because the Nintendo 64 treats the normals as colors).

Geometry Scale

the translator will scale the whole model by this factor before conversion.

Note: this is in addition to scaling applied by MakeGame or DtExport.

2.0E compatibility

turn off other options in the window that don't work with earlier versions of the Nintendo 64 microcode.

gSP2Triangles

use a new microcode command to render two triangles with one command.

Output Lines/Triangles

ON = output lines and/or triangles

OFF = output triangles only

The lines are the edges of the triangles that would be output otherwise. the translator does not output NURBS curves.

Vertex Cache Size

choose from various default values corresponding to F3DEX microcode versions, or enter a custom value.

Files

path and stub name (without any extension) of output files. You can use standard SGI drag-and-drop into the icon drop pocket on the left.

Script File

a script or executable to run after translation. The translator passes two arguments to the script: the directory containing the output files. and the stem name (see below).

Alias|Wavefront supplies a script (nin_endscript) for automatically downloading and testing output code on a Nintendo development system. See Testing the Output on page 29.

Options File

file containing GetNintendo settings (values for all the settings above). This file is read when the GetNintendo window opens, and saved when you click Save or OK.

Directory Path

path to the directory where output files will be created. (This is the same as the directory path you specified in the MakeGame window).

Stem

the base name of all output files. Suffixes are added to this name to create the different types of output. (This is the same as the directory path you specified in the MakeGame window).

Output
Filename Contents
<scene>.c Top-level display list.
<scene>.h External declarations of common data structures.
<scene>_vertices.c Vertex arrays for model geometry.
<scene>_polygons.c Display lists to load and display model geometry as triangles.
<scene>_tris.c Display lists to load and display model geometry as lines.
<scene>_material.c Display lists to change material data, Display lists to load textures. Texture data.
<scene>_light.c Display lists to set up RSP lighting data.
<scene>_xfm.c Array of all matrices in the model.
<scene>_xfm_static.c Array of animated matrices for use in animation.
<scene>.raw Binary image of animated matrices for use in animation.
<scene>_code.c Code for updating animated data and lights.

Setting Nintendo 64 Properties in Alias

To open the Ultra 64 shading options window:

  1. Make sure you have assigned shading and textures to your model.

    In the Tool Palette, select Object Edit Ultra64-:

  2. Change the texture attributes using the Xres, Yres, TileX, or TileY boxes, or choose from the standard Format options.

    The Size buttons are available according to the Format you choose.

Testing the Output

Installing the Demo Viewer

The Nintendo 64 Demo Viewer is in the source tree, in the Games area of the standard Alias installation. You can use the Demo viewer with the Indy development system and the Partner 64 systems.

This section assume the Partner 64 system is installed correctly in /usr/local/partner.

When using the Partner-N64 system, make sure the Partner hardware and software are properly installed. In particular, make sure your .cshrc file sets the $PTHOST environment variable to the correct network name of the development system (for example: setenv PTHOST n64_dev1).

You need to do two things to install the Demo Viewer:

  1. Copy the viewer source files to a working directory.
  2. Customize the shell script the translator uses to start the Viewer.

Copying the source

You need to copy the sources from the Alias installation (which is owned by root) to a working directory in your home directory.

  1. Type the following commands into a shell:
    cd
    
    mkdir -p n64/demo
    
    cp /usr/aw/alias/ODS/Games/source/Nintendo/f3dex/* n64/demo
    
  2. Change the MakeGame/Nintendo translator settings to output to ~/n64/demo.

Modifying the script

The Alias installation includes the nin_endscript shell script, which automatically compiles and downloads the translator output to a development board. You can modify this script to set the following options:

Other Installation

To use a Partner 64 system on a remote machine, your system administrator must make the following changes on the remote system:

Development System Types

Alias|Wavefront currently supports the following development systems:

Downloading to a Development Machine

nin_endscript and nin_endscriptWrapper build a ROM from the viewer code and download it to a Nintendo 64 development console.

These scripts are run automatically by MakeGame and DtExport when you convert a model.

If the files are located on a remote machine, the scripts will use rsh to run the ROM building process. Using this feature, several users can create and translate models, and share one development workstation for viewing their output.

If nothing is visible in the demo viewer after the model downloads, press the "L" button on the console's control pad to show the onscreen menu and make sure the download was successful.

Using the Nintendo 64 Demo Viewer

Use the Nintendo 64 controller to view the model in the Demo Viewer:
Center Joystick Rotate/move model.
Z trigger Change joystick mode (scale, rotate, move).
L button (left top button) Show/hide on-screen menus.
Direction pad Use on-screen menus.
C arrow buttons Show MetaCycle snippets (if MetaCycle information was converted).
.



Bookshelf Contents Previous Next Glossary Index Search

aliasdocs@aw.sgi.com
Copyright © 1998, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved.