al - Audio Library Functions gDP - DP GBI Macros gdSP - General GBI Macros gSP - SP GBI Macros gt - Turbo Microcode RDP gu - Graphics Utilities Math - Math Functions nuSys - NuSystem os - N64 Operating System sp - Sprite Library Functions uh - Host to Target IO 64DD - N64 Disk Drive
|
osViSetModeSyntax#include <ultra64.h> /* os.h */ void osViSetMode(OSViMode *mode); Argument
Return Value
Explanation
The 56 modes are indicated by 5 switches, viz., high/low resolution, 16/32-bit color pixels, anti-aliasing/point sampling, filter/non-filter processing, and NTSC/PAL/MPAL/FPAL format. The defined symbol names for these modes are in <os.h>. For example, "OS_VI_NTSC_LPN1" indicates that low-resolution, point sampling, non-interlace, and 16-bit color pixels are supported, while "OS_VI_PAL_LPN1" indicates that the same content are supported in PAL format. The last 4 characters of the symbol name (LPN1, etc.) comprise the following codes.
Of the possible combinations of the above codes, the following 14 modes are each supported in NTSC/PAL/FPAL/MPAL:
LPN1, LPF1, LAN1, LAF1, LPN2, At low resolution (320 pixels x 240 lines in PAL/MPAL/NTSC modes, 320 pixels x 288 lines in FPAL mode), non-interlaced mode and interlaced mode can be selected. Non-interlaced mode repeats the same frame in each field (scan). In contrast, interlaced mode interpolates between adjacent lines. First, in the first field, the upper line is weighted 75% and the lower line is weighted 25%. Then, interpolation is performed in the next in the next field, by weighting the upper line 25% and weighting the lower line 75%. In this case, there is no flicker because there is not high blanking frequency. At high resolution (640 pixels x 480 lines in PAL/MPAL/NTSC modes, 640 pixels x 576 lines in FPAL mode), normal interlaced mode and de-flickered interlaced mode can be selected. The register settings for these 56 modes are in the VI mode table osViModeTable, which is defined as an external variable. osViSetMode overwrites all VI registers with data referenced by mode (the pointer to osViModeTable) at the timing of the next vertical retrace. All previous settings (XY scale, gamma correction, etc.) will be reset. The VI mode table is an array of 56 OSViMode structures, but each mode is individually defined in <os.h> as an external variable in the OS source file. For instance, there are two ways, as shown below, to write it when registering NTSC, low-resolution, anti-aliasing, non-interlaced processing, and 16-bit mode in the VI. osViSetMode(&osViModeNtscLan1); Since the latter method is linked to data, which are not used, it uses a lot of memory. It is recommended that the former method be used. * Please See "Reference (VI Mode Type List)" for the VI mode types.
Cautions
References VI Mode Type List
Example
See Also
Revision History
|