gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
docs/api/docs_example_programs.html
1 <!-- HTML header for doxygen 1.8.14-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="cache-control" content="max-age=86400"/>
6 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
7 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
8 <meta name="generator" content="Doxygen 1.9.2"/>
9 <meta name="viewport" content="width=device-width, initial-scale=1"/>
10 <title>GBDK 2020 Docs: Example Programs</title>
11 <link href="tabs.css" rel="stylesheet" type="text/css"/>
12 <script type="text/javascript" src="jquery.js"></script>
13 <script type="text/javascript" src="dynsections.js"></script>
14 <link href="navtree.css" rel="stylesheet" type="text/css"/>
15 <script type="text/javascript" src="resize.js"></script>
16 <script type="text/javascript" src="navtreedata.js"></script>
17 <script type="text/javascript" src="navtree.js"></script>
18 <link href="search/search.css" rel="stylesheet" type="text/css"/>
19 <script type="text/javascript" src="search/searchdata.js"></script>
20 <script type="text/javascript" src="search/search.js"></script>
21 <link href="doxygen.css" rel="stylesheet" type="text/css" />
22 <link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
23 <link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
24 <link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
25 <!-- BEGIN: doxygen-awesome-css -->
26 <script type="text/javascript" src="doxygen-awesome-darkmode-toggle.js"></script>
27 <script type="text/javascript">
28 DoxygenAwesomeDarkModeToggle.init()
29 </script>
30 <script type="text/javascript" src="doxygen-awesome-paragraph-link.js"></script>
31 <script type="text/javascript">
32 DoxygenAwesomeParagraphLink.init()
33 </script>
34 <!-- END: doxygen-awesome-css -->
35 </head>
36 <body>
37 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
38 <div id="titlearea">
39 <table cellspacing="0" cellpadding="0">
40 <tbody>
41 <tr style="height: 56px;">
42 <td id="projectalign" style="padding-left: 0.5em;">
43 <div id="projectname">GBDK 2020 Docs
44  <span id="projectnumber">4.5.0</span>
45 </div>
46 <div id="projectbrief">API Documentation for GBDK 2020</div>
47 </td>
48 </tr>
49 </tbody>
50 </table>
51 </div>
52 <!-- end header part -->
53 <!-- Generated by Doxygen 1.9.2 -->
54 <script type="text/javascript">
55 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
56 var searchBox = new SearchBox("searchBox", "search",'Search','.html');
57 /* @license-end */
58 </script>
59 <script type="text/javascript" src="menudata.js"></script>
60 <script type="text/javascript" src="menu.js"></script>
61 <script type="text/javascript">
62 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
63 $(function() {
64 initMenu('',true,false,'search.php','Search');
65 $(document).ready(function() { init_search(); });
66 });
67 /* @license-end */
68 </script>
69 <div id="main-nav"></div>
70 </div><!-- top -->
71 <div id="side-nav" class="ui-resizable side-nav-resizable">
72 <div id="nav-tree">
73 <div id="nav-tree-contents">
74 <div id="nav-sync" class="sync"></div>
75 </div>
76 </div>
77 <div id="splitbar" style="-moz-user-select:none;"
78 class="ui-resizable-handle">
79 </div>
80 </div>
81 <script type="text/javascript">
82 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
83 $(document).ready(function(){initNavTree('docs_example_programs.html',''); initResizable(); });
84 /* @license-end */
85 </script>
86 <div id="doc-content">
87 <!-- window showing the filter options -->
88 <div id="MSearchSelectWindow"
89 onmouseover="return searchBox.OnSearchSelectShow()"
90 onmouseout="return searchBox.OnSearchSelectHide()"
91 onkeydown="return searchBox.OnSearchSelectKey(event)">
92 </div>
93
94 <!-- iframe showing the search results (closed by default) -->
95 <div id="MSearchResultsWindow">
96 <iframe src="javascript:void(0)" frameborder="0"
97 name="MSearchResults" id="MSearchResults">
98 </iframe>
99 </div>
100
101 <div><div class="header">
102 <div class="headertitle"><div class="title">Example Programs </div></div>
103 </div><!--header-->
104 <div class="contents">
105 <div class="textblock"><p >GBDK includes several example programs both in C and in assembly. They are located in the examples directory, and in its subdirectories. They can be built by typing <code>make</code> in the correnponding directory.</p>
106 <h1><a class="anchor" id="autotoc_md193"></a>
107 banks (various projects)</h1>
108 <p >There are several different projects showing how to use ROM banking with GBDK.</p>
109 <h1><a class="anchor" id="autotoc_md194"></a>
110 comm</h1>
111 <p >Illustrates how to use communication routines.</p>
112 <h1><a class="anchor" id="autotoc_md195"></a>
113 crash</h1>
114 <p >Demonstrates how to use the optional GBDK crash handler which dumps debug info to the Game Boy screen in the event of a program crash.</p>
115 <h1><a class="anchor" id="autotoc_md196"></a>
116 colorbar</h1>
117 <p >The colorbar program, written by Mr. N.U. of TeamKNOx, illustrates the use of colors on a Color GameBoy.</p>
118 <h1><a class="anchor" id="autotoc_md197"></a>
119 dscan</h1>
120 <p >Deep Scan is a game written by Mr. N.U. of TeamKNOx that supports the Color GameBoy. Your aim is to destroy the submarines from your boat, and to avoid the projectiles that they send to you. The game should be self-explanatory. The following keys are used: </p><pre class="fragment">RIGHT/LEFT : Move your boat
121 A/B : Send a bomb from one side of your boat
122 START : Start game or pause game
123
124 When game is paused:
125
126 SELECT : Invert A and B buttons
127 RIGHT/LEFT : Change speed
128 UP/DOWN : Change level
129 </pre><h1><a class="anchor" id="autotoc_md198"></a>
130 filltest</h1>
131 <p >Demonstrates various graphics routines.</p>
132 <h1><a class="anchor" id="autotoc_md199"></a>
133 fonts</h1>
134 <p >Examples of how to work with the built in font and printing features.</p>
135 <h1><a class="anchor" id="autotoc_md200"></a>
136 galaxy</h1>
137 <p >A C translation of the space.s assembly program.</p>
138 <h1><a class="anchor" id="autotoc_md201"></a>
139 gb-dtmf</h1>
140 <p >The gb-dtmf, written by Osamu Ohashi, is a Dual Tone Multi-Frequency (DTMF) generator.</p>
141 <h1><a class="anchor" id="autotoc_md202"></a>
142 gbdecompress</h1>
143 <p >Demonstrates using gbdecompress to load a compressed tile set into VRAM.</p>
144 <h1><a class="anchor" id="autotoc_md203"></a>
145 irq</h1>
146 <p >Illustrates how to install interrupt handlers.</p>
147 <h1><a class="anchor" id="autotoc_md204"></a>
148 large map</h1>
149 <p >Shows how to scroll with maps larger than 32 x 32 tiles using <a class="el" href="sms_8h.html#set_bkg_submap">set_bkg_submap()</a>. It fills rows and columns at the edges of the visible viewport (of the hardware Background Map) with the desired sub-region of the large map as it scrolls.</p>
150 <h1><a class="anchor" id="autotoc_md205"></a>
151 metasprites</h1>
152 <p >Demonstrates using the metasprite features to move and animate a large sprite.</p><ul>
153 <li>Press A button to show / hide the metasprite</li>
154 <li>Press B button to cycle through the metasprite animations</li>
155 <li>Press SELECT button to cycle the metasprite through Normal / Flip-Y / Flip-XY / Flip-X</li>
156 <li>Up / Down / Left / Right to move the metasprite</li>
157 </ul>
158 <h1><a class="anchor" id="autotoc_md206"></a>
159 lcd isr wobble</h1>
160 <p >An example of how to use the LCD ISR for visual special effects.</p>
161 <h1><a class="anchor" id="autotoc_md207"></a>
162 paint</h1>
163 <p >The paint example is a painting program. It supports different painting tools, drawing modes, and colors. At the moment, it only paints individual pixels. This program illustrates the use of the full-screen drawing library. It also illustrates the use of generic structures and big sprites. </p><pre class="fragment">Arrow keys : Move the cursor
164 SELECT : Display/hide the tools palette
165 A : Select tool
166 </pre><h1><a class="anchor" id="autotoc_md208"></a>
167 rand</h1>
168 <p >The rand program, written by Luc Van den Borre, illustrates the use of the GBDK random generator.</p>
169 <h1><a class="anchor" id="autotoc_md209"></a>
170 ram_fn</h1>
171 <p >The ram_fn example illustrates how to copy functions to RAM or HIRAM, and how to call them from C.</p>
172 <h1><a class="anchor" id="autotoc_md210"></a>
173 rpn</h1>
174 <p >A basic RPN calculator. Try entering expressions like 12 134* and then 1789+.</p>
175 <h1><a class="anchor" id="autotoc_md211"></a>
176 samptest</h1>
177 <p >Demonstration of playing a sound sample.</p>
178 <h1><a class="anchor" id="autotoc_md212"></a>
179 sgb (various)</h1>
180 <p >A collection of examples showing how to use the Super Game Boy API features.</p>
181 <p ><a class="anchor" id="examples_sound_sample"></a></p>
182 <h1><a class="anchor" id="autotoc_md213"></a>
183 sound</h1>
184 <p >The sound example is meant for experimenting with the sound generator of the GameBoy (to use on a real GameBoy). The four different sound modes of the GameBoy are available. It also demonstrates the use of bit fields in C (it's a quick hack, so don't expect too much from the code). The following keys are used: </p><pre class="fragment">UP/DOWN : Move the cursor
185 RIGHT/LEFT : Increment/decrement the value
186 RIGHT/LEFT+A : Increment/decrement the value by 10
187 RIGHT/LEFT+B : Set the value to maximum/minimum
188 START : Play the current mode's sound (or all modes if in control screen)
189 START+A : Play a little music with the current mode's sound
190 SELECT : Change the sound mode (1, 2, 3, 4 and control)
191 SELECT+A : Dump the sound registers to the screen
192 </pre><h1><a class="anchor" id="autotoc_md214"></a>
193 space</h1>
194 <p >The space example is an assembly program that demonstrates the use of sprites, window, background, fixed-point values and more. The following keys are used: </p><pre class="fragment">Arrow keys : Change the speed (and direction) of the sprite
195 Arrow keys + A : Change the speed (and direction) of the window
196 Arrow keys + B : Change the speed (and direction) of the background
197 START : Open/close the door
198 SELECT : Basic fading effect
199 </pre><h1><a class="anchor" id="autotoc_md215"></a>
200 templates</h1>
201 <p >Two basic template examples are provided as a starting place for writing your GBDK programs. </p>
202 </div></div><!-- contents -->
203 </div><!-- PageDoc -->
204 </div><!-- doc-content -->
205 <!-- start footer part -->
206 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
207 <ul>
208 <li class="navelem"><a class="el" href="index.html">General Documentation</a></li>
209 <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
210 </ul>
211 </div>
212 </body>
213 </html>
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.