------------------------------------------------------------------ This document explains the sample programs. Please note the following points when executing make for these sample programs: Executing make for these programs without arguments creates a ROM image file that contains debugging information. This ROM image file runs on the debugger and not on the Nintendo 64 Control Deck. To create the ROM image file in a format that runs on Nintendo 64, execute make with the argument FINAL=YES (i.e., "make FINAL=YES"). However, when this is done, the ROM image file does not contain debug information, so it will not run normally on some debuggers, including PARTNER-N64. This argument is invalid for sample programs such as "hostio" which are meant to run on a debugger. The following sample programs depend on files located in the Texture/ directory. Please be careful when moving these sample programs. blockmonkey ddspgame ground lights mipmap spgame texlight threadmonkey The following is an explanation of the functions and features of each sample program: autofill: This is a simple sample program that measures the performance of painting out the screen. It paints out the screen using a polygon with different aspect ratio with size, and measures the speed automatically. It is possible to see the measurement data using gnuplot. For details, refer to README in the autofill sample program. blockmonkey: This is an application that measures a simple performance. A user can change the size of a display list or parameters, and confirm the effect when rendering. Operation instructions for the Controller are displayed on the host screen when the application is executed. The graph of performance measurement on the lower screen shows the time needed to render a polygon. The CPU processing time needed to create a display list is not calculated. This is not to slow down the animation even when it cannot catch up with the next frame. bumpmap: This is a sample program of bump mapping. For details, refer to the README in the bump map sample program. chrome: This is a sample program for the reflection mapping function. ci8fb: This sample program is similar to autofill. Rendering is processed using 8bit color index. For details, refer to the README for the ci8fb sample program. This sample program changes the number and size of all triangles displayed on screen at the same time. If compiled with no arguments attached to make, the following five values are shown with osSyncPrintf(): * The area of the displayed triangle * The size of the triangle along the x-axis relative to its size in the y direction. * The number of triangles rendered in one frame * The time to render one triangle (usec) * The number of pixels that can be rendered in one second When "#define PERFORM_CHECK" is defined with fill.c, the triangles are rendered without changing their number and size. If compiled with no arguments attached to make, the following three values are shown with osSyncPrintf(): * The time to render 10 triangles * The time to render the background * The sum of the two above times Since a large quantity of character strings are displayed in this case, PARTNER-N64 may hang up. ddspgame: An N64 Disk Drive sample program. It calls Disk functions while displaying on screen, displaying the results of function errors and the corresponding error messages using 64DD internal ROM fonts. ddspgame can be run by executing 1 (debugging information file name) in the Partner-N64 Command window after compiling. The default setting is to start ddspgame from Disk. To start it from a Game Pak, use make as follows: make START_FROM_CASSETTE=YES. ddspgame is created in conformance with the error handling sequences described in Chapter 10 of 64DD Programming Manual. If an "abnormal termination" error occurs during a sequence, subsequent processing is not performed. Numbers displayed in the lower portion of the screen during and after command execution indicate the error number. Although these numbers should not be displayed by the game program, they are displayed in the sample program to allow monitoring of the types of errors issued in this program. Please also see ddspgame/README for a description of this program. detail: This is a sample program which explains how to use the multi tiling texture. This demonstrates the detail texture and MIP map texture as well. eeptest: A simple program to test EEPROM (4k or 16k). When "DEBUG_EEPROM=YES" is specified when executing make, a read/write to 16k areas are performed even for 4k EEPROM. fault: A sample program to process CPU interrupts with the application using OS_EVENT_FAULT events. When PARTNER-N64 reads the debug information file fault.out, the interrupt is trapped and reading is suspended at that point. In order to run this sample program normally, please set PARTNER-N64 to only read the ROM image file fault.n64. To do this, use the PARTNER-N64 rd command as follows: >rd fault.n64,0xb0000000 >reset >g If the debug information file is read before the above is executed, then the debug information will become valid and the program will not operate normally. In this case, even executing the INIT command will not help, and you will have to exit PARTNER-N64, start it up again and then read the ROM image file. flash: This program executes tests for 1M Flash ROM. The basic controls are as follows: Control Pad Up/Down: Select command A Button: Execute command C Button Unit: Change each parameter The following are the definition of each command. FLASH CHANGE : Switches the Flash being used Can specify from 0 to 3 READ ID : Reads Flash ID READ STATUS : Reads the status of Flash CLEAR STATUS : Clears the status of Flash ALL ERASE : Deletes all the data of Flash SECTOR ERASE : Deletes a certain sector of Flash. The deleted sector is a sector which contains the page specified by page number. READ ARRAY(DMA) : Reads a specific page of Flash with DMA. The page to be read is the page length from the page specified by page number. WRITE BUFFER : Writes Flash buffer. WRITE ARRAY : Writes each page of Flash from Flash buffer. The page to be read is the page specified by page number. FILL WRITE DATA : Creates the write data pattern of a page length (1 PAGE) for the page specified by page number. Page numbers are inserted in the last 4 bytes of the data. CLEAR ALL : Deletes the data in the read buffer of the test READ DATA program. CLEAR ALL : Deletes the data in the write buffer of the WRITE DATA test program. ALL ERASE & : Deletes, creates write data and writes the FILL & WRITE entire area of Flash. ALL READ : Reads data from the entire area of Flash. Data is read per page. ALL COMPARE : Compares the entire content of the read buffer and the write buffer of the test program. REGION COMPARE : Compares the content of the specified area of the read buffer and the write buffer of the test program. The area to be compared is the page length from the page specified number. ALL TEST : Executes ALL ERASE -> ALL FILL -> ALL WRITE -> ALL COMPARE as many times as specified. PAGE LENGTH : Specifies page length. Other than motion experiment, specify 1 in principle. PAGE NUMBER : Specifies page number. fogworld: This is a sample program which shows how to use the fog process and the volume culling process. This program enables you to output information such as clock speed of RCP or CPU and total available DRAM capacity. gbpak: A simple sample program for N64 Transfer Pak. Reads data from Game Boy Game Pak (compatible with MBC1 only), and if an error occurrs, a corresponding message is displayed on the screen. By default, a game name and a company code are not included. Please rewrite COMPANY_CODE that is defined by siproc.h with GAME_TITLE and use it. Please note that by default, when COMPANY_CODE is not defined, game name and company code are not checked. And, when it is desired to change the size of data to be read, please rewrite the value of DATA_SIZE (by default, 0x8000) which is defined by main.h. Though there is a place called "compatible game" in the message that is displayed on the screen, please display the specific game name for the actual game application. If make LANG_ENGLISH=YES is entered when executing make, the messages displayed on the screen will appear in English. ginv: This is a simple sample program which outputs such information as clock speed of RCP and CPU, and the total amount of available DRAM. gl: This is a game loader for Partner-N64. ROM image can be read from command lines and executed. See README.txt for details. ground: This is a sample program which performs the clipping of a large ground plane accurately. gs2dex: This is a sample program which explains how to use the sprite micro code S2DEX. lights: This expresses specular highlight effect which uses RSP texture, and shadows (shades) falsely. By using inputs from the Controller, it controls the location and size. The background is processed with MIP map. mipmap: This demonstrates MIP mapping. It is possible to verify by comparing with other texture processing or changing MIP map parameters. morphcube: CPU calculates each vertex for morphing. CPU and the graphics pipeline execute 2 frames consecutively in parallel. Tiling of a large MIP map texture is processed with a capacity that is stored in a texture memory. morphfaces: Morphing of two dimensional images. CPU processes the morphing of vertex, and blending is performed using 2 cycle mode. For details, refer to NOTES in the morphfaces sample program. motortest: A sample Rumble Pak program. For more information, see the accompanying README file. nosPak: A sample program for the Controller Pak menu using N64 font data. To execute make, please run the batch file makenos.bat. onetri: A simple sample program for rendering 1 polygon without Z buffer. When executed using "gload -a -t", simple texture mapping is possible. onetri-fpal: A PAL version of onetri. FPAL mode is used for full-screen display of video in PAL format. overlay: A sample program that overlays onetri code (2 different segments containing code or data share the same memory area). pfs: A sample program for the Controller Pak. You can experiment with checking, creating and deleting game notes. The control operations are expained below: Control Pad L/R ... Select game note to create C Up ... Check the file system C Down ... Delete game note C Left ... Create game note C Right ... Format the Controller Pak A ... Game note read test B ... Game note write test START ... Reread & display This sample program differs from the Controller Pak menu provided with the application. For a sample Controller Pak menu, see the provided nosPak sample program. Please keep the following points in mind when using this sample program with a Controller Pak that contains game notes created with an actual game: 1) Game notes may be destroyed by a write test or deletion, and 2) katakana (Japanese script) is not supported; thus any portion of a note name rendered in katakana will not be displayed. playseq: A sample program using the sequence player. In the header file playseq.h, the following two types of MAX_VOICES are defined (inserted with #ifdef VOICES_16 - #else - #endif): #define MAX_VOICES 16; #define MAX_VOICES 32; MAX_VOICES indicates the number of physical voices of the synthesizer and the number of virtual voices of the sequence player. The greater the number of voices, the greater the number of sounds that can be played simultaneously. But this also increases the amount of processing by the CPU and the RSP. Please test both definitions to check the effect of the number of voices. If compiled without any changes, the number of virtual voices becomes 32. playseq.naudio: The sample program playseq modified to support n_audio. polyline: This renders by switching polygon and line microcodes. reboot: A sample restart sequence program. The program topgun, which is loaded on Game Pak, starts onetri, which has been written to Disk. Executing make creates the files dwrite, topgun.n64, reboot.out, onetri.n64, hello.n64, and fat in the directory reboot/. fat contains information on the size and storage location of the started game, dwrite is a batch file for writing Disk data, and reboot.out is a debugging information file for topgun.n64. After writing data to Disk by entering