\section{cgb.h File Reference}
\label{cgb.h}\index{cgb.h@{cgb.h}}
Support for Color Game\-Boy. 


\subsection*{Defines}
\begin{CompactItemize}
\item 
\label{cgb.h_a0}
\index{RGB@{RGB}!cgb.h@{cgb.h}}\index{cgb.h@{cgb.h}!RGB@{RGB}}
\#define {\bf RGB} (r, g, b) 
\begin{CompactList}\small\item\em Macro to create a palette entry out of the color components.\item\end{CompactList}

\item 
\label{cgb.h_a1}
\index{RGB_RED@{RGB\_\-RED}!cgb.h@{cgb.h}}\index{cgb.h@{cgb.h}!RGB_RED@{RGB\_\-RED}}
\#define {\bf RGB\_\-RED}
\begin{CompactList}\small\item\em Common colors based on the EGA default palette.\item\end{CompactList}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\label{cgb.h_a21}
\index{set_bkg_palette@{set\_\-bkg\_\-palette}!cgb.h@{cgb.h}}\index{cgb.h@{cgb.h}!set_bkg_palette@{set\_\-bkg\_\-palette}}
void {\bf set\_\-bkg\_\-palette} ({\bf UINT8} first\_\-palette, {\bf UINT8} nb\_\-palettes, {\bf UINT16} $\ast$rgb\_\-data) NONBANKED
\begin{CompactList}\small\item\em Set bkg palette(s).\item\end{CompactList}

\item 
\label{cgb.h_a22}
\index{set_sprite_palette@{set\_\-sprite\_\-palette}!cgb.h@{cgb.h}}\index{cgb.h@{cgb.h}!set_sprite_palette@{set\_\-sprite\_\-palette}}
void {\bf set\_\-sprite\_\-palette} ({\bf UINT8} first\_\-palette, {\bf UINT8} nb\_\-palettes, {\bf UINT16} $\ast$rgb\_\-data) NONBANKED
\begin{CompactList}\small\item\em Set sprite palette(s).\item\end{CompactList}

\item 
\label{cgb.h_a23}
\index{set_bkg_palette_entry@{set\_\-bkg\_\-palette\_\-entry}!cgb.h@{cgb.h}}\index{cgb.h@{cgb.h}!set_bkg_palette_entry@{set\_\-bkg\_\-palette\_\-entry}}
void {\bf set\_\-bkg\_\-palette\_\-entry} ({\bf UINT8} palette, {\bf UINT8} entry, {\bf UINT16} rgb\_\-data)
\begin{CompactList}\small\item\em Set a bkg palette entry.\item\end{CompactList}

\item 
\label{cgb.h_a24}
\index{set_sprite_palette_entry@{set\_\-sprite\_\-palette\_\-entry}!cgb.h@{cgb.h}}\index{cgb.h@{cgb.h}!set_sprite_palette_entry@{set\_\-sprite\_\-palette\_\-entry}}
void {\bf set\_\-sprite\_\-palette\_\-entry} ({\bf UINT8} palette, {\bf UINT8} entry, {\bf UINT16} rgb\_\-data)
\begin{CompactList}\small\item\em Set a sprite palette entry.\item\end{CompactList}

\item 
void {\bf cpu\_\-slow} (void)
\begin{CompactList}\small\item\em Set CPU speed to slow operation.\item\end{CompactList}

\item 
void {\bf cpu\_\-fast} (void)
\begin{CompactList}\small\item\em Set CPU speed to fast operation.\item\end{CompactList}

\item 
\label{cgb.h_a27}
\index{cgb_compatibility@{cgb\_\-compatibility}!cgb.h@{cgb.h}}\index{cgb.h@{cgb.h}!cgb_compatibility@{cgb\_\-compatibility}}
void {\bf cgb\_\-compatibility} (void)
\begin{CompactList}\small\item\em Set defaults compatible with normal Game\-Boy.\item\end{CompactList}

\end{CompactItemize}
\vspace{0.4cm}\hrule\vspace{0.2cm}
\subsection*{Detailed Description}
Support for Color Game\-Boy.\vspace{0.4cm}\hrule\vspace{0.2cm}
\subsection*{Function Documentation}
\label{cgb.h_a25}
\index{cgb.h@{cgb.h}!cpu_slow@{cpu\_\-slow}}
\index{cpu_slow@{cpu\_\-slow}!cgb.h@{cgb.h}}
\subsection{\setlength{\rightskip}{0pt plus 5cm}void cpu\_\-slow (void)}

Set CPU speed to slow operation.

Make sure interrupts are disabled before call.

\begin{Desc}
\item[{\bf See also: }]\par
{\bf cpu\_\-fast}() {\rm (p.~\pageref{cgb.h_a26})} \end{Desc}
\label{cgb.h_a26}
\index{cgb.h@{cgb.h}!cpu_fast@{cpu\_\-fast}}
\index{cpu_fast@{cpu\_\-fast}!cgb.h@{cgb.h}}
\subsection{\setlength{\rightskip}{0pt plus 5cm}void cpu\_\-fast (void)}

Set CPU speed to fast operation.

Make sure interrupts are disabled before call.

\begin{Desc}
\item[{\bf See also: }]\par
{\bf cpu\_\-slow}() {\rm (p.~\pageref{cgb.h_a25})} \end{Desc}
