VIConfigure

C Specification

#include <revolution/vi.h>
#include <revolution/gx/GXStruct.h>
void VIConfigure(const GXRenderModeObj* rm)

Arguments

rm Render Mode
The following is a description of members of the structure handled by VIConfigure.
viTVMode Screen Mode
VI_TVMODE_NTSC_DS sets the NTSC double-strike mode.
VI_TVMODE_NTSC_INT sets the NTSC interlaced mode.
VI_TVMODE_NTSC_PROG sets the NTSC progressive mode.
VI_TVMODE_PAL_DS sets the PAL double-strike mode.
VI_TVMODE_PAL_INT sets the PAL interlaced mode.
VI_TVMODE_EURGB60_DS sets the EURGB60 double-strike mode.
VI_TVMODE_EURGB60_INT sets the EURGB60 interlaced mode.
VI_TVMODE_EURGB60_PROG sets the EURGB60 progressive mode.
VI_TVMODE_MPAL_DS sets the MPAL double-strike mode.
VI_TVMODE_MPAL_INT sets the MPAL interlaced mode.
VI_TVMODE_MPAL_PROG sets the MPAL progressive mode.
viXOrigin The on-screen X position in pixels
viYOrigin The on-screen Y position in pixels
viWidth The screen width in pixels.
xFBmode The external frame buffer mode
Takes one of the following values:
VI_XFBMODE_DF sets the double-field frame buffer mode.
VI_XFBMODE_SF sets the single-field frame buffer mode.
xfbHeight The height of the external frame buffer (XFB)
fbWidth The width of the external frame buffer (XFB)

Return Values

None.

Description

This function configures the TV screen and external frame buffer. The following members of the GXRenderModeObj structure are used in this function.

viTVmode, viXOrigin, viYOrigin, viWidth, fbWidth, xfbHeight, xFBmode

viXOrigin and viYOrigin specify a position on the TV screen. viWidth specifies the size of the screen in the x-direction. viTVmode sets the screen to NTSC, PAL, EURGB60, or MPAL and the mode to double-strike, interlaced, or progressive. fbWidth and xfbHeight specify the size of external frame buffer. xFBmode specifies whether the frame buffer is set for single-field or double-field. Here, the term 'single-field frame buffer' indicates that the frame buffer contains the image of a single field, whereas the term 'double-field buffer' indicates that the buffer contains the images of two consecutive fields.

Be aware that the height of the screen need not be specified. This information is included in xfbHeight and xFBmode. If xFBmode is double-field, the height of the screen is the same as xfbHeight. If xFBmode is single-field, the height of the screen is twice that of xfbHeight.

The change does not take effect until VIFlush is called. See the VIFlush function manual for more details on when changes take effect.

Note that pan information is cleared when VIConfigure is called. Call VIConfigurePan if it is necessary for pan settings to remain in effect.

Due to hardware restrictions, at least two fields need to elapse to switch modes safely when viTVmode has been changed. When using VIConfigure to change modes (especially to the TV mode), call VIWaitForRetrace twice after calling VIConfigure to make sure changes are made safely.

A list of argument restrictions is given below.

Note: NTSC and MPAL are compatible. For example, if you make a game for NTSC and NTSC was specified for VIConfigure in the game, MPAL will operate properly using VI functionality. What happens here is that when NTSC/MPAL has been specified, VIConfigure checks if the Revolution system is NTSC or MPAL and configures the system accordingly.

See Also

VIConfigurePan, VIFlush, VIWaitForRetrace

Revision History

2006/08/15 Added EURGB60 and MPAL progressive modes.
2006/03/01 Initial version.


CONFIDENTIAL