Copyright (C) 1999, Nintendo of America Inc.
Copyright (C) 1998, NINTENDO Co,Ltd.
Copyright (C) 1998, MONEGI CORPORATION.
RSP |
---|
RDP |
---|
VI |
---|
MISC |
---|
Menu Rendering Mode |
Near/Far-plane Clipping Values |
Unsupported Combine Modes |
Performance Meter |
Parameters that ccbl Cannot Set |
This program was created as a means of easily learning about the Nintendo 64 RDP feature block, particularly the ColorCombiner and Blender features.
ccbl is typically started by the Windows application dptest. Work performed in ccbl cannot be saved or loaded. However, ccbl can be run by downloading it to the debugging target as a normal N64 application. It also can be run by writing it to a flash ROM Pak.
Although two Controllers are normally used, the program can be operated with only one Controller if necessary.
Control Stick | Rotates model. |
Z Button+Control Stick UP/DOWN | Changes camera position. |
R Button | Turns menu ON/OFF. |
Control Pad | Moves cursor. |
A Button | Opens next window. Determines menu. |
B Button | Closes window. |
C Buttons | Change parameters. |
Hexadecimal Display Parameters (e.g. changing *_COLOR ) | |
---|---|
C | Decreases value by 1. |
C | Increases value by 1. |
C | Decreases value by 0x10. |
C | Increases value by 0x10. |
L+C | Sets to minimum value. |
L+C | Sets to maximum value. |
Decimal Display Parameters (change FogPosition) | |
C | Decreases by the specified number of decimal places. |
C | Increases by the specified number of decimal places. |
Changing the ON/OFF parameter | |
C | Changes the ON/OFF (/~) Parameter. |
L Button* | Processes menu screen dump with osSyncPrintf(). |
R Button | Uses RM_VISCVG to visualize cover values. See> Programming Manual, section 15.7.11. |
A Button* | Processes settings parameters in GBI format (gSP*,gDP*) with osSyncPrintf(). |
B Button* | Processes settings parameters in GBI format (gsSP*,gsDP*) with osSyncPrintf(). |
* | Not supported in programs created using make DPTEST=1 and make FINAL=1. |
RSP | Changes RSP parameters. |
---|
GEO_MODE | ||
---|---|---|
Changes the geometry mode and enables reflection mapping. |
||
|
LIGHT_COL | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Changes the light color. ccbl uses all 8 of the lights that can be used in N64. ON/OFF can be implemented by setting the light color to (RGB=[0,0,0]), although RSP processing speed will vary slightly. The position of a light cannot be changed. The position and direction of the lights are as follows:
|
||||||||||||||||
|
FOG_POS | ||
---|---|---|
Changes the Fog position. A restriction of g*SPFogPosition() is that min must be less than max. Thus min cannot be set to a value greater than max nor max to a value less than min (min != max is OK). |
||
|
RDP | Changes RDP parameters. |
---|
CYCLE_TYPE | ||
---|---|---|
Changes the RDP cycle type. |
||
|
CL_COMBINER->COMBINE_MD | |||||
---|---|---|---|---|---|
Changes the Color Combiner setting. When the cycle type is G_CYC_1CYCLE, the parameter for the second cycle cannot be changed. The fields in the bottom two lines of the Configuration menu were provided to enable quick selection of the same settings as those of the Combine mode macros defined in gbi.h. |
|||||
|
|||||
|
CL_COMBINER->ENV_COLOR | ||
---|---|---|
Changes the ambient color used as an input source for the Color Combiner. |
||
|
CL_COMBINER->PRIM_COLOR | ||
---|---|---|
Changes the Primitive color used as an input source for the Color Combiner. |
||
|
BLENDER->RENDER_MODE | ||
---|---|---|
Changes the Render mode setting. As with COMBINE_MD, when the cycle type is G_CYC_1CYCLE, the parameter for the second cycle cannot be changed. The fields in the bottom two lines of the Configuration menu enable quick selection of the same settings as those of the Render mode macros defined in gbi.h. |
||
|
||
|
BLENDER->BL_COLOR | ||
---|---|---|
Changes the Blend Color used as an input source for Blender. |
||
|
BLENDER->FOG_COLOR | ||
---|---|---|
Changes the Fog Color used as an input source for Blender. |
||
|
BLENDER->CD AD AC | ||||||
---|---|---|---|---|---|---|
Changes the settings for color dithering, alpha dithering, and alpha comparison. |
||||||
|
TEX_FILTER | ||
---|---|---|
Changes the texture filter settings. |
||
|
VI | Changes the VI parameters. |
---|
SPECIAL FEATURES | ||
---|---|---|
Changes the settings for VI gamma correction, gamma dithering, divot filtering, and dither filtering. Although these parameters are not directly related to the Color Combiner or Blender, they do play a large role in the N64 screen display. Thus ccbl was designed to also enable changes in these parameters. VI does not operate completely independently. N64 does not display the original pixel values that Blender writes to the frame buffer. Rather, VI creates and displays the final colors based on the original color and cover values. Thus, where display is concerned, VI cannot be ignored. |
||
|
MISC | Sets the other settings. |
---|
MODEL | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Changes the display model.
|
TEXTURE | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Changes the texture applied to the model.
Except for BRICK_MM, all textures are 3232 pixel images. gDPTextureLoadblock() transfers them to texture memory and sets tiling to 0. Texture wrapping is set by specifying st with G_TX_WRAP (wrapping). Except in the case of BRICK_MM, gSPTexture() is given the following arguments. gSPTexture(glistp++,0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON); When BRICK_MM is specified, gSPTexture(glistp++,0x8000, 0x8000, 5, G_TX_RENDERTILE, G_ON); is used. However, when reflection mapping is enabled, gSPTexture() is forcibly set to gSPTexture(glistp++,(32<<6),(32 <<6), 0, G_TX_RENDERTILE, G_ON); |
BG_COLOR |
---|
Changes the background color. Actually writes the specified color when the frame buffer is cleared. When IMAGE1,2 is specified, a 16-bit RGBA-format image is copied to clear the frame buffer rather than a color value. |
BG_MODEL | ||||||
---|---|---|---|---|---|---|
Displays the model, unaffected by the ccbl parameters. Render mode uses G_RM_AA_ZB_OPA_SURF.
|
Cycle mode is set to 1 cycle unless otherwise indicated.
Default parameter values are used unless otherwise indicated.
The * symbol indicates settings that are required to view the effect with ccbl.
Primitive color |
---|
Displays an object using the primitive color. Set the Combine mode to PRIMITIVE.*
[RDP]->CL_COMBINE->COMBINE_MODE->CYCLE1: PRIMITIVE Try changing the primitive color and see the results. [RDP]->CL_COMBINE->PRIM_COLOR |
Texture Decal |
---|
Applies a texel color unchanged. Sets Combine mode to DECALRGB. * [RDP]->CL_COMBINE->COMBINE_MODE->CYCLE1: DECALRGB |
Writing | |
---|---|
Sets to a display with writing. Set the Geometry mode. Settings for [RSP]->GEO_MODE are as follows.
Settings for Combine mode are as follows.* [RDP]->CL_COMBINE->COMBINE_MODE->CYCLE1: SHADE Try changing the light color and see the results. [RSP]->LIGHT_COL Using MODULATERGB for Combine mode enables a light to be applied to a textured object. |
Reflection Map | |
---|---|
Performs reflection mapping. Set the Geometry mode. [RSP]->The GEO_MODE setting is as follows.
The Combine mode setting is as follows.* [RDP]->CL_COMBINE->COMBINE_MODE->CYCLE1: DECALRGB Note: If reflection mapping is enabled without performing only the ccbl settings, the settings performed internally will be insufficient. |
Specular Highlight | ||||
---|---|---|---|---|
Uses reflection mapping to simulate specular highlighting. TORUS2 is used as the model so that the effect is readily seen. Select IA8 HIGHLIGHT for the texture. The Geometry mode settings used are the same as for reflection mapping.* Because reflection mapping is used, the light is assumed be located at the viewpoint. Thus, only DIF1 is used. Light color settings are as follows.*
The Combine mode setting is as follows.* [RDP]->CL_COMBINE->COMBINE_MODE->CYCLE1: HILIGHTRGB The primitive color is set to the same color as the light color.*
The primitive color becomes the light color.
|
Fog | ||
---|---|---|
Uses Fog. Set the Geometry mode. [RSP]->GEO_MODE settings are as follows.
The cycle type is set to 2 cycles.* [RDP]->CYCLE_TYPE->G_CYC_2CYCLE To make the effect readily visible, select DECALRGB as the Combine mode, CUBE as the model, and BRICK as the texture. In addition, specify the following Combine mode settings.
[RDP]->CL_COMBINE->COMBINE_MODE->CYCLE1: DECALRGB Set the Rendering mode.*
[RDP]->BLENDER->RENDER_MODE->CYCLE1: FOG_SHADE_A Select the Fog color.* [RDP]->BLENDER->FOG_COLOR settings are as follows.
Set the BG color to a color close to that of the Fog. [MISC]->BG_COLOR->GRAY The positions of the Fog threshold and Fog color saturation can be changed by changing the Fog position ([RSP]->FOG_POS). |
Trilinear MIP Mapping | ||
---|---|---|
Set the cycle type to 2 cycles.* [RDP]->CYCLE_TYPE->G_CYC_2CYCLE Set the Combine mode.*
[RDP]->CL_COMBINE->COMBINE_MODE->CYCLE1: TRILERP Set the Rendering mode.*
[RDP]->BLENDER->RENDER_MODE->CYCLE1: PASS Set the texture.* [MISC]->TEXTURE->RGBA16 BRICK_MM
|
Antialiasing |
---|
Antialiasing in N64 is ultimately performed by VI. Blender writes the antialiasing data (cover values) to the frame buffer when it writes the pixel values to that buffer. Using the G_RM_VISCVG, ccbl enables cover values to be visualized. Try changing the Blender settings and using this feature to see the types of cover values generated. The result will likely be many very interesting discoveries. |
Transparent Surface |
---|
Combine mode is set as follows.* [RDP]->CL_COMBINE->COMBINE_MODE->CYCLE1: PRIM Blender mode is set as follows.* [RDP]->BLENDER->RENDER_MODE->CYCLE1: AA_ZB_XLU_SURF Change BG_COLOR so that the effect is easily seen. [MISC]->BG_COLOR->IMAGE2 Try changing the alpha for the primitive color and see the results. [RDP]->CL_COMBINER->PRIM_COLOR->ALPHA |
Texture Edge Mode |
---|
The model and texture are set as follows.
[MISC]->MODEL->CUBE Combine mode is set as follows.* [RDP]->CL_COMBINE->COMBINE_MODE->CYCLE1: DECALRGBA Rendering mode is set as follows.* [RDP]->BLENDER->RENDER_MODE->CYCLE1: AA_ZB_TEX_EDGE |
Decal surface |
---|
The model is set as follows.* [MISC]->MODEL->TRIANGLE Rendering mode is set as follows.* [RDP]->BLENDER->RENDER_MODE->CYCLE1: AA_ZB_OPA_DECAL The BG model is set as follows.* [MISC]->BG_MODEL->PLANE |
Interpenetration Mode |
---|
The model is set as follows.* [MISC]->MODEL->TETRA Rendering mode is set as follows.* [RDP]->BLENDER->RENDER_MODE->CYCLE1: AA_ZB_OPA_INTER The BG model is set as follows.* [MISC]->BG_MODEL->PLANE Try visualizing the cover values and see how they change when the Rendering mode is AA_ZB_OPA_SURF. |
Particle Effects | ||
---|---|---|
Rendering mode is set as follows.* [RDP]->BLENDER->RENDER_MODE->CYCLE1: AA_ZB_PCL_SURF Alpha comparison is set as follows.* [RDP]->BLENDER->CD AD AC->G_AC_DITHER
A common bug is to set the alpha comparison after the rendering mode, so that even if G_RM_*_PCL_SURF is specified as the rendering mode, it is subsequently overwritten with the alpha comparison setting. |
Menu Rendering Mode |
---|
The menu rendering mode used is G_RM_XLU_SURF. |
Near/Far-Plane Clipping Values |
---|
ccbl sets the near-plane clipping value to 500 and the far-plane clipping value to 20,000. These are not necessarily recommended values. |
Unsupported Combine Modes | ||||
---|---|---|---|---|
The Combine mode macro settings shown below are not supported. In addition, parameters for these settings have been omitted. The Color Combiner parameters can be set directly.
|
Performance Meter |
---|
The nuDebTaskPerfBar1() function of NuSystem is used as the performance meter. For information on the performance meter, see the NuSysytem documentation. |
Parameters that ccbl Cannot Set |
---|
ccbl cannot be used to set items that are not closely related to Color Combiner and Blender. |