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>G2S_SetBG0Control</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">G2S_SetBG0Control <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<CODE>#include &lt;nitro/gx/gx_bgcnt.h&gt;</CODE><BR>
20  <PRE><CODE>void G2S_SetBG0Control(
21    GXBGScrSizeText screenSize,
22    GXBGColorMode colorMode,
23    GXBGScrBase screenBase,
24    GXBGCharBase charBase,
25    GXBGExtPltt bgExtPltt
26);</CODE></PRE>
27  </dd>
28</dl><h2>Arguments</h2>
29<TABLE border="1" width="100%">
30  <TBODY>
31    <TR>
32      <TD width="300"><em><strong><font face="Courier New">screenSize</font></strong></em></TD>
33      <TD width="700">Screen size</TD>
34    </TR>
35    <TR>
36      <TD><em><strong><font face="Courier New">colorMode</font></strong></em></TD>
37      <TD>Color mode</TD>
38    </TR>
39    <TR>
40      <TD><em><strong><font face="Courier New">screenBase</font></strong></em></TD>
41      <TD>Screen base block</TD>
42    </TR>
43    <TR>
44      <TD><em><strong><font face="Courier New">charBase</font></strong></em></TD>
45      <TD>Character base block</TD>
46    </TR>
47    <TR>
48      <TD><em><strong><font face="Courier New">bgExtPltt</font></strong></em></TD>
49      <TD>Selects the BG Extended palette slot</TD>
50    </TR>
51  </TBODY>
52</TABLE>
53<h2>Return Values</h2>
54<p>None.</p>
55<H2>Description</H2>
56<P>This function sets the sub 2D Engine's BG0.<BR><BR> <B>Note:</B> When VRAM banks are allocated to the BG Extended palette with the <CODE><A href="../gx/GX_SetBankForSubBGExtPltt.html">GX_SetBankForSubBGExtPltt</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.
57</P>
58<TABLE border="1">
59  <TBODY>
60    <TR>
61      <TD width="30%"><CODE>GX_BG_SCRSIZE_TEXT_256x256</CODE></TD>
62      <TD width="70%">Sets screen size to 256x256 pixels (2 kilobytes)</TD>
63    </TR>
64    <TR>
65      <TD width="30%"><CODE>GX_BG_SCRSIZE_TEXT_512x256</CODE></TD>
66      <TD width="70%">Sets screen size to 512x256 pixels (4 kilobytes)</TD>
67    </TR>
68    <TR>
69      <TD width="30%"><CODE>GX_BG_SCRSIZE_TEXT_256x512</CODE></TD>
70      <TD width="70%">Sets screen size to 256x512 pixels (4 kilobytes)</TD>
71    </TR>
72    <TR>
73      <TD width="30%"><CODE>GX_BG_SCRSIZE_TEXT_512x512</CODE></TD>
74      <TD width="70%">Sets the screen size to 512x512 pixels (8 kilobytes)</TD>
75    </TR>
76  </TBODY>
77</TABLE>
78<P></P>
79<TABLE border="1">
80  <TBODY>
81    <TR>
82      <TD width="30%"><CODE>GX_BG_COLORMODE_16</CODE></TD>
83      <TD width="70%">16-color mode</TD>
84    </TR>
85    <TR>
86      <TD width="30%"><CODE>GX_BG_COLORMODE_256</CODE></TD>
87      <TD width="70%">256-color mode</TD>
88    </TR>
89  </TBODY>
90</TABLE>
91<P></P>
92<TABLE border="1">
93  <TBODY>
94    <TR>
95      <TD width="30%"><CODE>GX_BG_SCRBASE_0xnnnn</CODE></TD>
96      <TD width="70%">This specifies BG0 screen base block.</TD>
97    </TR>
98  </TBODY>
99</TABLE>
100<P></P>
101<TABLE border="1">
102  <TBODY>
103    <TR>
104      <TD width="30%"><CODE>GX_BG_CHARBASE_0xnnnnn</CODE></TD>
105      <TD width="70%">Specifies the BG0 character base block.</TD>
106    </TR>
107  </TBODY>
108</TABLE>
109<P></P>
110<TABLE border="1">
111  <TBODY>
112    <TR>
113      <TD width="30%"><CODE>GX_BG_EXTPLTT_01</CODE></TD>
114      <TD width="70%">Uses slot 0 when using the BG Extended palette.</TD>
115    </TR>
116    <TR>
117      <TD width="30%"><CODE>GX_BG_EXTPLTT_23</CODE></TD>
118      <TD width="70%">Uses slot 2 when using the BG Extended palette.</TD>
119    </TR>
120  </TBODY>
121</TABLE>
122<P>The following describes the enumerated type definitions of the arguments.</P>
123<PRE><CODE>typedef enum
124{
125    GX_BG_SCRSIZE_TEXT_256x256 = 0,
126    GX_BG_SCRSIZE_TEXT_512x256 = 1,
127    GX_BG_SCRSIZE_TEXT_256x512 = 2,
128    GX_BG_SCRSIZE_TEXT_512x512 = 3
129}
130GXBGScrSizeText;
131
132typedef enum
133{
134    GX_BG_COLORMODE_16 = 0,
135    GX_BG_COLORMODE_256 = 1
136}
137GXBGColorMode;
138
139typedef enum
140{
141    GX_BG_SCRBASE_0x0000 = 0,
142    GX_BG_SCRBASE_0x0800 = 1,
143    GX_BG_SCRBASE_0x1000 = 2,
144    GX_BG_SCRBASE_0x1800 = 3,
145    GX_BG_SCRBASE_0x2000 = 4,
146    GX_BG_SCRBASE_0x2800 = 5,
147    GX_BG_SCRBASE_0x3000 = 6,
148    GX_BG_SCRBASE_0x3800 = 7,
149    GX_BG_SCRBASE_0x4000 = 8,
150    GX_BG_SCRBASE_0x4800 = 9,
151    GX_BG_SCRBASE_0x5000 = 10,
152    GX_BG_SCRBASE_0x5800 = 11,
153    GX_BG_SCRBASE_0x6000 = 12,
154    GX_BG_SCRBASE_0x6800 = 13,
155    GX_BG_SCRBASE_0x7000 = 14,
156    GX_BG_SCRBASE_0x7800 = 15,
157    GX_BG_SCRBASE_0x8000 = 16,
158    GX_BG_SCRBASE_0x8800 = 17,
159    GX_BG_SCRBASE_0x9000 = 18,
160    GX_BG_SCRBASE_0x9800 = 19,
161    GX_BG_SCRBASE_0xa000 = 20,
162    GX_BG_SCRBASE_0xa800 = 21,
163    GX_BG_SCRBASE_0xb000 = 22,
164    GX_BG_SCRBASE_0xb800 = 23,
165    GX_BG_SCRBASE_0xc000 = 24,
166    GX_BG_SCRBASE_0xc800 = 25,
167    GX_BG_SCRBASE_0xd000 = 26,
168    GX_BG_SCRBASE_0xd800 = 27,
169    GX_BG_SCRBASE_0xe000 = 28,
170    GX_BG_SCRBASE_0xe800 = 29,
171    GX_BG_SCRBASE_0xf000 = 30,
172    GX_BG_SCRBASE_0xf800 = 31
173}
174GXBGScrBase;
175
176typedef enum
177{
178    GX_BG_CHARBASE_0x00000 = 0,
179    GX_BG_CHARBASE_0x04000 = 1,
180    GX_BG_CHARBASE_0x08000 = 2,
181    GX_BG_CHARBASE_0x0c000 = 3,
182    GX_BG_CHARBASE_0x10000 = 4,
183    GX_BG_CHARBASE_0x14000 = 5,
184    GX_BG_CHARBASE_0x18000 = 6,
185    GX_BG_CHARBASE_0x1c000 = 7,
186    GX_BG_CHARBASE_0x20000 = 8,
187    GX_BG_CHARBASE_0x24000 = 9,
188    GX_BG_CHARBASE_0x28000 = 10,
189    GX_BG_CHARBASE_0x2c000 = 11,
190    GX_BG_CHARBASE_0x30000 = 12,
191    GX_BG_CHARBASE_0x34000 = 13,
192    GX_BG_CHARBASE_0x38000 = 14,
193    GX_BG_CHARBASE_0x3c000 = 15
194}
195GXBGCharBase;
196
197typedef enum
198{
199    GX_BG_EXTPLTT_01 = 0,
200    GX_BG_EXTPLTT_23 = 1
201}
202GXBGExtPltt;</CODE></PRE>
203<h2>See Also</h2>
204<P><A href="G2_GetBG0Control.html">G2S_GetBG0Control</A></P>
205<H2>Revision History</H2>
206<P>2004/02/09 Initial version.</P>
207<hr><p>CONFIDENTIAL</p></body>
208</html>
209