<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gbdev.gg8.se/wiki/index.php?action=history&amp;feed=atom&amp;title=GBDK_libraries</id>
		<title>GBDK libraries - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://gbdev.gg8.se/wiki/index.php?action=history&amp;feed=atom&amp;title=GBDK_libraries"/>
		<link rel="alternate" type="text/html" href="https://gbdev.gg8.se/wiki/index.php?title=GBDK_libraries&amp;action=history"/>
		<updated>2026-05-06T07:33:48Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://gbdev.gg8.se/wiki/index.php?title=GBDK_libraries&amp;diff=625&amp;oldid=prev</id>
		<title>Caseyweederman: Initializing a library exploration page</title>
		<link rel="alternate" type="text/html" href="https://gbdev.gg8.se/wiki/index.php?title=GBDK_libraries&amp;diff=625&amp;oldid=prev"/>
				<updated>2016-06-03T12:00:23Z</updated>
		
		<summary type="html">&lt;p&gt;Initializing a library exploration page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The [[GBDK|Game Boy Development Kit]] comes bundled with a set of libraries targeting the Game Boy Z80 microprocessor and the Game Boy's unique hardware, as well as some modified C libraries.&lt;br /&gt;
&lt;br /&gt;
The libraries most immediately useful to the game developer are found in &amp;lt;code&amp;gt;gbdk/include/gb&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
How do I use these? At the top of your script, type &amp;lt;code&amp;gt;#include &amp;lt;libraryname.h&amp;gt;&amp;lt;/code&amp;gt; to be able to call any of the included functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;/include&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Broader C header files exist in the root of &amp;lt;code&amp;gt;include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[ctype.h]]&amp;lt;/code&amp;gt; contains functions to check characters and swap them between upper and lower case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[gbdk-lib.h]]&amp;lt;/code&amp;gt; includes different libraries based on the implementation of the Small Device C Compiler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[rand.h]]&amp;lt;/code&amp;gt; contains randomization functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[stdarg.h]]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[stdio.h]]&amp;lt;/code&amp;gt; contains basic input and output functions, like writing and receiving lines of text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[stdlib.h]]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[string.h]]&amp;lt;/code&amp;gt; contains generic string functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[time.h]]&amp;lt;/code&amp;gt; contains clock functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[types.h]]&amp;lt;/code&amp;gt; defines basic types used by various other libraries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;/include/gb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Libraries specific to the Game Boy exist within the &amp;lt;code&amp;gt;gb&amp;lt;/code&amp;gt; subdirectory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[cgb.h]]&amp;lt;/code&amp;gt; contains functions specifically targeting the Color Game Boy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[console.h]]&amp;lt;/code&amp;gt; contains functions handling a draw cursor's position and drawing specified letters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[drawing.h]]&amp;lt;/code&amp;gt; contains a set of functions used to draw lines and shapes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[font.h]]&amp;lt;/code&amp;gt; contains functions for changing fonts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[gb.h]]&amp;lt;/code&amp;gt; contains the base definitions and functions, from reading inputs to manipulating sprites.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[hardware.h]]&amp;lt;/code&amp;gt; contains definitions for communicating directly with the hardware.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[malloc.h]]&amp;lt;/code&amp;gt;  contains a simple implementation of the memory allocation function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[sample.h]]&amp;lt;/code&amp;gt; contains a function for playing sound samples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[sgb.h]]&amp;lt;/code&amp;gt; contains a function to check if the rom is running on the Super Game Boy.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;/include/asm ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;/include/consolez80&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:GBDK]]&lt;/div&gt;</summary>
		<author><name>Caseyweederman</name></author>	</entry>

	</feed>