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_SetBG1Control</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">G2S_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 &lt;nitro/gx/gx_bgcnt.h&gt;<BR>
21void G2S_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 the sub 2D Engine's BG1.<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.
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  <TBODY>
60    <TR>
61      <TD width="30%"><CODE>GX_BG_COLORMODE_16</CODE></TD>
62      <TD width="70%">16-color mode</TD>
63    </TR>
64    <TR>
65      <TD width="30%"><CODE>GX_BG_COLORMODE_256</CODE></TD>
66      <TD width="70%">256-color mode</TD>
67    </TR>
68  </TBODY>
69</TABLE>
70<P></P>
71<TABLE border="1">
72  <TBODY>
73    <TR>
74      <TD width="30%"><CODE>GX_BG_SCRBASE_0xnnnn</CODE></TD>
75      <TD width="70%">Specifies BG1 screen base block.</TD>
76    </TR>
77  </TBODY>
78</TABLE>
79<P></P>
80<TABLE border="1">
81  <TBODY>
82    <TR>
83      <TD width="30%"><CODE>GX_BG_CHARBASE_0xnnnnn</CODE></TD>
84      <TD width="70%">Specifies BG1 character base block.</TD>
85    </TR>
86  </TBODY>
87</TABLE>
88<P></P>
89<TABLE border="1">
90  <TBODY>
91    <TR>
92      <TD width="30%"><CODE>GX_BG_EXTPLTT_01</CODE></TD>
93      <TD width="70%">Uses slot 1 when using the BG Extended palette.</TD>
94    </TR>
95    <TR>
96      <TD width="30%"><CODE>GX_BG_EXTPLTT_23</CODE></TD>
97      <TD width="70%">Uses slot 3 when using the BG Extended palette.</TD>
98    </TR>
99  </TBODY>
100</TABLE>
101<P>The following describes the enumerated type definitions of the arguments.</P>
102<PRE><CODE>typedef enum
103{
104    GX_BG_SCRSIZE_TEXT_256x256 = 0,
105    GX_BG_SCRSIZE_TEXT_512x256 = 1,
106    GX_BG_SCRSIZE_TEXT_256x512 = 2,
107    GX_BG_SCRSIZE_TEXT_512x512 = 3
108}
109GXBGScrSizeText;
110
111typedef enum
112{
113    GX_BG_COLORMODE_16 = 0,
114    GX_BG_COLORMODE_256 = 1
115}
116GXBGColorMode;
117
118typedef enum
119{
120    GX_BG_SCRBASE_0x0000 = 0,
121    GX_BG_SCRBASE_0x0800 = 1,
122    GX_BG_SCRBASE_0x1000 = 2,
123    GX_BG_SCRBASE_0x1800 = 3,
124    GX_BG_SCRBASE_0x2000 = 4,
125    GX_BG_SCRBASE_0x2800 = 5,
126    GX_BG_SCRBASE_0x3000 = 6,
127    GX_BG_SCRBASE_0x3800 = 7,
128    GX_BG_SCRBASE_0x4000 = 8,
129    GX_BG_SCRBASE_0x4800 = 9,
130    GX_BG_SCRBASE_0x5000 = 10,
131    GX_BG_SCRBASE_0x5800 = 11,
132    GX_BG_SCRBASE_0x6000 = 12,
133    GX_BG_SCRBASE_0x6800 = 13,
134    GX_BG_SCRBASE_0x7000 = 14,
135    GX_BG_SCRBASE_0x7800 = 15,
136    GX_BG_SCRBASE_0x8000 = 16,
137    GX_BG_SCRBASE_0x8800 = 17,
138    GX_BG_SCRBASE_0x9000 = 18,
139    GX_BG_SCRBASE_0x9800 = 19,
140    GX_BG_SCRBASE_0xa000 = 20,
141    GX_BG_SCRBASE_0xa800 = 21,
142    GX_BG_SCRBASE_0xb000 = 22,
143    GX_BG_SCRBASE_0xb800 = 23,
144    GX_BG_SCRBASE_0xc000 = 24,
145    GX_BG_SCRBASE_0xc800 = 25,
146    GX_BG_SCRBASE_0xd000 = 26,
147    GX_BG_SCRBASE_0xd800 = 27,
148    GX_BG_SCRBASE_0xe000 = 28,
149    GX_BG_SCRBASE_0xe800 = 29,
150    GX_BG_SCRBASE_0xf000 = 30,
151    GX_BG_SCRBASE_0xf800 = 31
152}
153GXBGScrBase;
154
155typedef enum
156{
157    GX_BG_CHARBASE_0x00000 = 0,
158    GX_BG_CHARBASE_0x04000 = 1,
159    GX_BG_CHARBASE_0x08000 = 2,
160    GX_BG_CHARBASE_0x0c000 = 3,
161    GX_BG_CHARBASE_0x10000 = 4,
162    GX_BG_CHARBASE_0x14000 = 5,
163    GX_BG_CHARBASE_0x18000 = 6,
164    GX_BG_CHARBASE_0x1c000 = 7,
165    GX_BG_CHARBASE_0x20000 = 8,
166    GX_BG_CHARBASE_0x24000 = 9,
167    GX_BG_CHARBASE_0x28000 = 10,
168    GX_BG_CHARBASE_0x2c000 = 11,
169    GX_BG_CHARBASE_0x30000 = 12,
170    GX_BG_CHARBASE_0x34000 = 13,
171    GX_BG_CHARBASE_0x38000 = 14,
172    GX_BG_CHARBASE_0x3c000 = 15
173}
174GXBGCharBase;
175
176typedef enum
177{
178    GX_BG_EXTPLTT_01 = 0,
179    GX_BG_EXTPLTT_23 = 1
180}
181GXBGExtPltt;</CODE></PRE>
182<h2>See Also</h2>
183<P><A href="G2_GetBG1Control.html"><CODE>G2S_GetBG1Control</CODE></A></P>
184<H2>Revision History</H2>
185<P>2004/02/09 Initial version.</P>
186<hr><p>CONFIDENTIAL</p></body></html>
187