Setup

This section covers the procedure for installing and uninstalling NIFF Editor and the NIFF conversion and preview tools.

Nintendo64 Developers Kit

NIFF Editor is distributed as part of the Nintendo64 Developers Kit and is automatically installed when you install the kit. The NIFF Editor and its conversion and preview tools are installed in the following directories when the Nintendo64 Developers Kit is installed in its default directory.

c:\nintendo\n64kit\niff\ |
bin\niffedit\ | NIFF Editor and Help
n64prev\niffconv.bat | Converter executable
n64prev\niffprev.bat | Preview executable
n64prev\quickprev\quickprev.bat | Quick Preview executable
nvfview\nvfconv.bat | Converter 2 executable
nvfview\nvfprev.bat | Preview 2 executable

To install only NIFF Editor for upgrade, etc., please see Installand Uninstall.

Install

To install NIFF Editor, execute the setup program (SETUP.EXE) using the following procedure.

- From the Start button menu, choose Explorer.
  From Explorer, open the directory containing NIFF Editor. Double-click SETUP.EXE. Follow the on-screen instructions to install NIFF Editor.

- Activate the MS-DOS prompt (Windows 95/98) or the command prompt (Windows NT), and change the name of the current directory to the directory containing the setup program. Input "setup".

- From the [Start] button, select the [Run] command to open the Run dialog box. Enter the filename, including the directory path. Follow the on-screen instructions to install NIFF Editor.

After successfully installing the software, refer to "Starting and Exiting" to run the program.

Uninstall

To remove NIFF Editor, follow the sequence described below using [Add/Remove] from the [Control Panel].

- From the Start button menu, choose [Settings]. From the Settings menu, choose [Control Panel] to open Control Panel.

- In Control Panel, double-click [Add/Remove Programs] to display the [Add/Remove Programs Properties] dialog box. Click the [Install/Uninstall] tab.

- From the list of applications, select [NIFF Editor], then click the [Add/Remove] button.

At the prompt, click [Yes] to remove the program.

Version Upgrades

To upgrade NIFF Editor to a newer version, follow the uninstall procedures as described above to delete the existing version of NIFF Editor. Follow the install procedures to install the new version.

Note: To upgrade to a new version of NIFF Editor you must first delete the existing version using [Add/Remove] in Control Panel.

Convert and Preview

When you choose [Convert] from the [Tools] menu, NIFF Editor outputs a NIFF file and executes a batch file that only converts (NIFFCONV.BAT). When you choose [Preview] from the [Tools] menu, NIFF Editor outputs a NIFF file and executes a batch file that converts and then executes make (NIFFPREV.BAT).

- Install exeGCC and set up the environment to run exeGCC. Normally, the directory in which exeGCC is installed is specified in the "root" environment variable in the SETUP.BAT file included with exeGCC. Please refer to the exeGCC manual for details about installation and environment settings.

- Modify MAKEFILE.WIN in the Previewer directory (C:/NINTENDO/N64KIT/NIFF/N64PREV) to match the environment of the installed exeGCC. Open MAKEFILE.WIN. using Notepad or any other text editor. Find the portion at the beginning of the file which specifies the path for exeGCC and the Include files.

      N64GCC_PATH = c:\ultra\gcc\mipse
      N64GCC_BIN = $(N64GCC_PATH)\bin
      N64GCC_INC = c:\ultra\usr\include
      CC = $(N64GCC_BIN)\gcc
      AS = $(N64GCC_BIN)\as
      LD = $(N64GCC_BIN)\ld

- Modify this portion to match the environment of the installed exeGCC. If there are no conflicts, then no additional changes are necessary.

- When a NIFF file is converted into a display list, NIFF Editor calls NIFFCON.BAT and the settings in this batch file are carried out. Open NIFFCON.BAT using Notepad or any other text editor to display the following settings.

      echo off
      set root=c:\ultra
      set gccdir=%ROOT%\gcc
      path %gccdir%\mipse\bin;%root%\sbin;%path%
      set gccsw=-mips3 -mgp32 -mfp32 -D_LANGUAGE_C -D_ULTRA64 -D__EXTENSIONS__
      set n64align=on
      niff2gfx -header model.h niffconv.nif model.c
      if errorlevel 1 goto error
      goto done
      :error
      pause
      :done
      echo on

- The first through sixth line set the environment for exeGCC. If these same settings are already included in the AUTOEXEC.BAT file, delete the six lines here, or comment them out with a REM statement.

  The 7th line calls NIFF2GFX.EXE and converts the NIFF file into a display list. NIFF Editor outputs the currently read NIFF file to a temporary file called NIFFCONV.NIF. Therefore, do not change the name of the NIFF file that is sent to NIFF2GFX.EXE. The other output filenames and the options can be freely changed. For details about NIFF2GFX.EXE please see the NIFF2GFX User's Manual.

- Finally, set up NIFFPREV.BAT which is called from NIFF Editor when a NIFF file is to be previewed. Open NIFFPREV.BAT with Notepad or any other text editor to display the following settings.

      echo off
      set root=c:\ultra
      set gccdir=%ROOT%\gcc
      path %gccdir%\mipse\bin;%root%\sbin;%path%
      set gccsw=-mips3 -mgp32 -mfp32 -D_LANGUAGE_C -D_ULTRA64 -D__EXTENSIONS__
      set n64align=on
      niff2gfx -header model.h niffprev.nif model.c
      if errorlevel 1 goto error
      make -f makefile.win
      if errorlevel 1 goto error
      "C:\Program Files\Intelligent Systems\IS-VIEWER64\PROGRAM\nload" -n -v -s0x200000 "quickprev\clean.bin"
      if errorlevel 1 goto error
      "C:\Program Files\Intelligent Systems\IS-VIEWER64\PROGRAM\nload" -n -v nuprev.n64
      if errorlevel 1 goto error
      goto done
      :error
      pause
      :done
      echo on

- This setting is nearly identical to NIFFCONV.BAT, which is used for converting. The only differences are the name of the file that NIFF Editor outputs and that make is executed.

  The first six lines set the environment for exeGCC. If these same settings are already included in the AUTOEXEC.BAT file, delete the six lines here, or comment them out with a REM statement.

  The 7th line calls NIFF2GFX.EXE and converts the NIFF file into a display list. NIFF Editor outputs the currently read NIFF file to a temporary file called NIFFCONV.NIF. Therefore, do not change the name of the NIFF file sent to NIFF2GFX.EXE. The other output filenames and the options can be freely changed. For details about NIFF2GFX.EXE please see the NIFF2GFX User's Manual.

  Line 9 executes make, and lines 11 and 13 send the files to IS-Viewer64. There will normally be no need to change these lines.

Quick Preview

Quick Preview is run by executing the QUICKPREV.BAT file included in the N64 Previewer. Please set up this file following the steps shown below so that it will execute correctly.

- The contents of the default QUICKPREV.BAT file are as follows:

      echo off
      "C:\Program Files\Intelligent Systems\IS-VIEWER64\PROGRAM\nload" -n -v quickprev.n64
      if errorlevel 1 goto error
      ..\niff2gfx -b quickprev.nif model.bin
      if errorlevel 1 goto error
      "C:\Program Files\Intelligent Systems\IS-VIEWER64\PROGRAM\nload" -n -v -s0x200000 model.bin
      if errorlevel 1 goto error
      goto done
      :error
      pause
      :done
      echo on

- In line 2, NLOAD.EXE reads the Previewer's quickprev.n64 file into IS-VIEWER64. In line 4, niff2gfx.exe converts quickprev.nif, which is the temporary file output by NIFF Editor, into a binary file. In line 6, this converted file is read by NLOAD.EXE into IS-VIEWER64.

- Finally, specify the name of the temporary NIFF file that NIFF Editor will output for quick preview, as well as the path for quickprev.bat. These can be set from the [Quick Preview] tab in Options from the Tools menu.

Convert 2 and Preview 2

To perform conversion and previewing using the niff2nvf convertor and nvfview previewer included with the Nintendo64 Developers Kit. NIFF Editor performs conversion and previewing by executing nvfconv.bat and nvfprev.bat. To use Convert2 and Preview2, use the following setup procedures.

- The content of the default NVFCONV.BAT for performing NVF conversions is as follows:

      echo off
      niff2nvf nvfconv.nif model.nvf
      if errorlevel 1 goto error
      goto done
      :error
      pause
      :done
      echo on

- Line 2 converts the NIFF file to an NVF file using NIFF2NVF.EXE

- The content of the default NVFPREV.BAT file for converting to NVF and previewing is as follows:

      echo off
      niff2nvf nvfprev.nif model.nvf
      if errorlevel 1 goto error
      nvf2bin scene.nvf model.nvf nvfview.bin
      if errorlevel 1 goto error
      "C:\Program Files\Intelligent Systems\IS-VIEWER64\PROGRAM\nload" -n -e nvfview.N64
      if errorlevel 1 goto error
      "C:\Program Files\Intelligent Systems\IS-VIEWER64\PROGRAM\nload" -n -s 0x200000 nvfview.bin
      if errorlevel 1 goto error
      goto done
      :error
      pause
      :done
      echo on

- Line 2 converts the NIFF file to an NVF file using NIFF2NVF.EXE. Line 4 converts the NVF file to a binary file. And lines 4 and 6 load the Previewer and the resulting binary file into IS-Viewer64.