1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>G2_SetBG1Control</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">G2_SetBG1Control <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1> 15<H2>Syntax</H2> 16 17<dl> 18 <dd> 19 <PRE> 20<CODE>#include <nitro/gx/gx_bgcnt.h><BR> 21void G2_SetBG1Control( 22 GXBGScrSizeText screenSize, 23 GXBGColorMode colorMode, 24 GXBGScrBase screenBase, 25 GXBGCharBase charBase, 26 GXBGExtPltt bgExtPltt 27);</CODE></PRE> 28 </dd></dl><h2>Arguments</h2><TABLE border="1" width="100%"><TBODY> 29 <TR><TD width="300"><em><strong><font face="Courier New">screenSize</font></strong></em></TD><TD width="700">Screen size</TD></TR> 30 <TR><TD><em><strong><font face="Courier New">colorMode</font></strong></em></TD><TD>Color mode</TD></TR> 31 <TR><TD><em><strong><font face="Courier New">screenBase</font></strong></em></TD><TD>Screen base block</TD></TR> 32 <TR><TD><em><strong><font face="Courier New">charBase</font></strong></em></TD><TD>Character base block</TD></TR> 33 <TR><TD><em><strong><font face="Courier New">bgExtPltt</font></strong></em></TD><TD>Selects the BG Extended palette slot</TD></TR> 34 </TBODY></TABLE><h2>Return Values</h2><p>None.</p><H2>Description</H2> 35<P>This function sets BG1.<BR> <B>Note:</B> When VRAM banks are allocated to the BG extended palette with the <CODE><A href="../gx/GX_SetBankForBGExtPltt.html">GX_SetBankForBGExtPltt</A></CODE> function, the BG extended palette will be referenced if 256-color mode is used. The standard palette is referenced in all other cases. 36</P> 37<TABLE border="1"> 38 <TBODY> 39 <TR> 40 <TD width="30%"><CODE>GX_BG_SCRSIZE_TEXT_256x256</CODE></TD> 41 <TD width="70%">Sets screen size to 256x256 pixels (2 kilobytes)</TD> 42 </TR> 43 <TR> 44 <TD width="30%"><CODE>GX_BG_SCRSIZE_TEXT_512x256</CODE></TD> 45 <TD width="70%">Sets screen size to 512x256 pixels (4 kilobytes)</TD> 46 </TR> 47 <TR> 48 <TD width="30%"><CODE>GX_BG_SCRSIZE_TEXT_256x512</CODE></TD> 49 <TD width="70%">Sets screen size to 256x512 pixels (4 kilobytes)</TD> 50 </TR> 51 <TR> 52 <TD width="30%"><CODE>GX_BG_SCRSIZE_TEXT_512x512</CODE></TD> 53 <TD width="70%">Sets the screen size to 512x512 pixels (8 kilobytes)</TD> 54 </TR> 55 </TBODY> 56</TABLE> 57<P></P> 58<TABLE border="1"> 59 <COL span="1" width="30%"> 60 <COL span="1" width="70%"> 61 <TBODY> 62 <TR> 63 <TD width="30%"><CODE>GX_BG_COLORMODE_16</CODE></TD> 64 <TD width="70%">16-color mode</TD> 65 </TR> 66 <TR> 67 <TD width="30%"><CODE>GX_BG_COLORMODE_256</CODE></TD> 68 <TD width="70%">256-color mode</TD> 69 </TR> 70 </TBODY> 71</TABLE> 72<P></P> 73<TABLE border="1"> 74 <TBODY> 75 <TR> 76 <TD width="30%"><CODE>GX_BG_SCRBASE_0xnnnn</CODE></TD> 77 <TD width="70%">Specifies the screen base block for BG1. Refer to the <CODE><A href="../gx/GX_SetBGScrOffset.html">GX_SetBGScrOffset</A></CODE> function.</TD> 78 </TR> 79 </TBODY> 80</TABLE> 81<P></P> 82<TABLE border="1"> 83 <TBODY> 84 <TR> 85 <TD width="30%"><CODE>GX_BG_CHARBASE_0xnnnnn</CODE></TD> 86 <TD width="70%">Specifies the character base block for BG1. Refer to the <CODE><A href="../gx/GX_SetBGCharOffset.html">GX_SetBGCharOffset</A></CODE> function.</TD> 87 </TR> 88 </TBODY> 89</TABLE> 90<P></P> 91<TABLE border="1"> 92 <TBODY> 93 <TR> 94 <TD width="30%"><CODE>GX_BG_EXTPLTT_01</CODE></TD> 95 <TD width="70%">Uses slot 1 when using the BG Extended palette.</TD> 96 </TR> 97 <TR> 98 <TD width="30%"><CODE>GX_BG_EXTPLTT_23</CODE></TD> 99 <TD width="70%">Uses slot 3 when using the BG Extended palette.</TD> 100 </TR> 101 </TBODY> 102</TABLE> 103<P>The following describes the enumerated type definitions of the arguments.</P> 104<PRE><CODE>typedef enum 105{ 106 GX_BG_SCRSIZE_TEXT_256x256 = 0, 107 GX_BG_SCRSIZE_TEXT_512x256 = 1, 108 GX_BG_SCRSIZE_TEXT_256x512 = 2, 109 GX_BG_SCRSIZE_TEXT_512x512 = 3 110} 111GXBGScrSizeText; 112 113typedef enum 114{ 115 GX_BG_COLORMODE_16 = 0, 116 GX_BG_COLORMODE_256 = 1 117} 118GXBGColorMode; 119 120typedef enum 121{ 122 GX_BG_SCRBASE_0x0000 = 0, 123 GX_BG_SCRBASE_0x0800 = 1, 124 GX_BG_SCRBASE_0x1000 = 2, 125 GX_BG_SCRBASE_0x1800 = 3, 126 GX_BG_SCRBASE_0x2000 = 4, 127 GX_BG_SCRBASE_0x2800 = 5, 128 GX_BG_SCRBASE_0x3000 = 6, 129 GX_BG_SCRBASE_0x3800 = 7, 130 GX_BG_SCRBASE_0x4000 = 8, 131 GX_BG_SCRBASE_0x4800 = 9, 132 GX_BG_SCRBASE_0x5000 = 10, 133 GX_BG_SCRBASE_0x5800 = 11, 134 GX_BG_SCRBASE_0x6000 = 12, 135 GX_BG_SCRBASE_0x6800 = 13, 136 GX_BG_SCRBASE_0x7000 = 14, 137 GX_BG_SCRBASE_0x7800 = 15, 138 GX_BG_SCRBASE_0x8000 = 16, 139 GX_BG_SCRBASE_0x8800 = 17, 140 GX_BG_SCRBASE_0x9000 = 18, 141 GX_BG_SCRBASE_0x9800 = 19, 142 GX_BG_SCRBASE_0xa000 = 20, 143 GX_BG_SCRBASE_0xa800 = 21, 144 GX_BG_SCRBASE_0xb000 = 22, 145 GX_BG_SCRBASE_0xb800 = 23, 146 GX_BG_SCRBASE_0xc000 = 24, 147 GX_BG_SCRBASE_0xc800 = 25, 148 GX_BG_SCRBASE_0xd000 = 26, 149 GX_BG_SCRBASE_0xd800 = 27, 150 GX_BG_SCRBASE_0xe000 = 28, 151 GX_BG_SCRBASE_0xe800 = 29, 152 GX_BG_SCRBASE_0xf000 = 30, 153 GX_BG_SCRBASE_0xf800 = 31 154} 155GXBGScrBase; 156 157typedef enum 158{ 159 GX_BG_CHARBASE_0x00000 = 0, 160 GX_BG_CHARBASE_0x04000 = 1, 161 GX_BG_CHARBASE_0x08000 = 2, 162 GX_BG_CHARBASE_0x0c000 = 3, 163 GX_BG_CHARBASE_0x10000 = 4, 164 GX_BG_CHARBASE_0x14000 = 5, 165 GX_BG_CHARBASE_0x18000 = 6, 166 GX_BG_CHARBASE_0x1c000 = 7, 167 GX_BG_CHARBASE_0x20000 = 8, 168 GX_BG_CHARBASE_0x24000 = 9, 169 GX_BG_CHARBASE_0x28000 = 10, 170 GX_BG_CHARBASE_0x2c000 = 11, 171 GX_BG_CHARBASE_0x30000 = 12, 172 GX_BG_CHARBASE_0x34000 = 13, 173 GX_BG_CHARBASE_0x38000 = 14, 174 GX_BG_CHARBASE_0x3c000 = 15 175} 176GXBGCharBase; 177 178typedef enum 179{ 180 GX_BG_EXTPLTT_01 = 0, 181 GX_BG_EXTPLTT_23 = 1 182} 183GXBGExtPltt;</CODE></PRE> 184<h2>See Also</h2> 185<P><A href="G2_GetBG1Control.html">G2_GetBG0Control</A></P> 186<H2>Revision History</H2> 187<P>2004/02/09</P> 188<UL> 189 <LI>Added a note. 190</UL> 191<P>2004/01/19 Initial version.</P> 192<hr><p>CONFIDENTIAL</p></body></html> 193